Interfacing Alarm with Openhab. Risco - MyElas Panel , MQTT Bridge App

For those who need to interface their alarm system that Openhab I created this app in Node.js

Feel to report any issues to me.


1 Like

I’ve try it !

Communication is correct but app.js stop repport data after a few hour.
Are there not a LWT ?
How to run it at boot time ?

Here is my riscopanel.items (for sample)

Switch 	RiscoPanel_armstatus		"Risco: Activation [%s]" 								<switch>
	{ mqtt="<[broker:riscopanel/armstatus:state:MAP(]" }
Switch 	RiscoPanel_isonalarm		"Risco: Alarme [%s]" 									<siren>		(gAlarm)
	{ mqtt="<[broker:riscopanel/isonalarm:state:MAP(]" }
String	RiscoPanel_lastevent		"Risco: Evenement [%s]"									<zoom>
	{ mqtt="<[broker:riscopanel/eventhistory/lastevent:state:default]" }
Number	RiscoPanel_count			"Risco: Active Zone [%s]" 								<group>
	{ mqtt="<[broker:riscopanel/dects/count:state:default]" }

String	RiscoPanel_dects1_name		"Risco: Device 1 Name [%s]"								<camera>
	{ mqtt="<[broker:riscopanel/dects/0:state:JSONPATH($.name)]" }
Switch	RiscoPanel_dects1_state		"Risco: Device 1 State [%s]"
	{ mqtt="<[broker:riscopanel/dects/0/status:state:MAP(]" }

String	RiscoPanel_dects2_name		"Risco: Device 2 Name [%s]"								<camera>
	{ mqtt="<[broker:riscopanel/dects/1:state:JSONPATH($.name)]" }
Switch	RiscoPanel_dects2_state		"Risco: Device 2 State [%s]"
	{ mqtt="<[broker:riscopanel/dects/1/status:state:MAP(]" }

String	RiscoPanel_dects3_name		"Risco: Device 3 Name [%s]"								<camera>
	{ mqtt="<[broker:riscopanel/dects/2:state:JSONPATH($.name)]" }
Switch	RiscoPanel_dects3_state		"Risco: Device 3 State [%s]"
	{ mqtt="<[broker:riscopanel/dects/2/status:state:MAP(]" }

String	RiscoPanel_dects4_name		"Risco: Device 4 Name [%s]"								<camera>
	{ mqtt="<[broker:riscopanel/dects/3:state:JSONPATH($.name)]" }
Switch	RiscoPanel_dects4_state		"Risco: Device 4 State [%s]"
	{ mqtt="<[broker:riscopanel/dects/3/status:state:MAP(]" }

String	RiscoPanel_dects5_name		"Risco: Device 5 Name [%s]"								<camera>
	{ mqtt="<[broker:riscopanel/dects/4:state:JSONPATH($.name)]" }
Switch	RiscoPanel_dects5_state		"Risco: Device 5 State [%s]"
	{ mqtt="<[broker:riscopanel/dects/4/status:state:MAP(]" }

String	RiscoPanel_dects6_name		"Risco: Device 6 Name [%s]"								<camera>
	{ mqtt="<[broker:riscopanel/dects/5:state:JSONPATH($.name)]" }
Switch	RiscoPanel_dects6_state		"Risco: Device 6 State [%s]"
	{ mqtt="<[broker:riscopanel/dects/5/status:state:MAP(]" }

String	RiscoPanel_dects7_name		"Risco: Device 7 Name [%s]"								<camera>
	{ mqtt="<[broker:riscopanel/dects/6:state:JSONPATH($.name)]" }
Switch	RiscoPanel_dects7_state		"Risco: Device 7 State [%s]"
	{ mqtt="<[broker:riscopanel/dects/6/status:state:MAP(]" }

String	RiscoPanel_dects8_name		"Risco: Device 8 Name [%s]"								<camera>
	{ mqtt="<[broker:riscopanel/dects/7:state:JSONPATH($.name)]" }
Switch	RiscoPanel_dects8_state		"Risco: Device 8 State [%s]"
	{ mqtt="<[broker:riscopanel/dects/7/status:state:MAP(]" }

String	RiscoPanel_dects9_name		"Risco: Device 9 Name [%s]"								<camera>
	{ mqtt="<[broker:riscopanel/dects/8:state:JSONPATH($.name)]" }
Switch	RiscoPanel_dects9_state		"Risco: Device 9 State [%s]"
	{ mqtt="<[broker:riscopanel/dects/8/status:state:MAP(]" }

String	RiscoPanel_dects10_name		"Risco: Device 10 Name [%s]"							<camera>
	{ mqtt="<[broker:riscopanel/dects/9:state:JSONPATH($.name)]" }
Switch	RiscoPanel_dects10_state		"Risco: Device 10 State [%s]"
	{ mqtt="<[broker:riscopanel/dects/9/status:state:MAP(]" }

String	RiscoPanel_dects11_name		"Risco: Device 11 Name [%s]"							<camera>
	{ mqtt="<[broker:riscopanel/dects/10:state:JSONPATH($.name)]" }
Switch	RiscoPanel_dects11_state		"Risco: Device 11 State [%s]"
	{ mqtt="<[broker:riscopanel/dects/10/status:state:MAP(]" }

Here is my transform


Here is a sample of sitemap

	Frame {

		Text label="Risco" icon="siren" {
			Text item=RiscoPanel_armstatus	label="State"
			Text item=RiscoPanel_isonalarm	label="Alarm"
			Text item=RiscoPanel_lastevent	label=""
			Text item=RiscoPanel_count		label="Zone"
			Text item=RiscoPanel_dects1_name	label=""	valuecolor=[RiscoPanel_dects1_state=="ON"="green", RiscoPanel_dects1_state=="OFF"="red"]
			Text item=RiscoPanel_dects2_name	label=""	valuecolor=[RiscoPanel_dects2_state=="ON"="green", RiscoPanel_dects2_state=="OFF"="red"]
			Text item=RiscoPanel_dects3_name	label=""	valuecolor=[RiscoPanel_dects3_state=="ON"="green", RiscoPanel_dects3_state=="OFF"="red"]
			Text item=RiscoPanel_dects4_name	label=""	valuecolor=[RiscoPanel_dects4_state=="ON"="green", RiscoPanel_dects4_state=="OFF"="red"]
			Text item=RiscoPanel_dects5_name	label=""	valuecolor=[RiscoPanel_dects5_state=="ON"="green", RiscoPanel_dects5_state=="OFF"="red"]
			Text item=RiscoPanel_dects6_name	label=""	valuecolor=[RiscoPanel_dects6_state=="ON"="green", RiscoPanel_dects6_state=="OFF"="red"]
			Text item=RiscoPanel_dects7_name	label=""	valuecolor=[RiscoPanel_dects7_state=="ON"="green", RiscoPanel_dects7_state=="OFF"="red"]
			Text item=RiscoPanel_dects8_name	label=""	valuecolor=[RiscoPanel_dects8_state=="ON"="green", RiscoPanel_dects8_state=="OFF"="red"]
			Text item=RiscoPanel_dects9_name	label=""	valuecolor=[RiscoPanel_dects9_state=="ON"="green", RiscoPanel_dects9_state=="OFF"="red"]
			Text item=RiscoPanel_dects10_name	label=""	valuecolor=[RiscoPanel_dects10_state=="ON"="green", RiscoPanel_dects10_state=="OFF"="red"]
			Text item=RiscoPanel_dects11_name	label=""	valuecolor=[RiscoPanel_dects11_state=="ON"="green", RiscoPanel_dects11_state=="OFF"="red"]

With this status of alarm, I can now make a rules to control my temperature or make blinking RGB strip when I leave my home.

To Do startup boot script and relaunch when app hang.

Thanks for your work

You can use i.e. PM2 (i use this)…

anyway my app doesn’t stop, even if run alone … probably there are some issues .

Can you send me logs on /logs folder ?



I’m having trouble arming my alarm trough MQTT, i use MQTT-spy for testing.
I use the this topic “riscopanel/armstatus/SET” and i send “armed”, but nothing happens.

the npm log says:

17-11-2018 23:06:00 info: message from mqtt arrived:riscopanel/armstatus/SET/armed
17-11-2018 23:06:00 info: arm/disarm command arrived
17-11-2018 23:06:00 debug: user code is expired? : false
17-11-2018 23:06:00 debug: arm command result ok

If I send a “disarmed” i works, so the connection to my alarmsystem is OK

Another thing.
I can’t see the status of the alarm in the topic “riscopanel/armstatus” even if I disarm the system from MQTT-spy nothing is written, but i dose disarm the system.

If I use my Myelas app to arm/disarm my system it shows in the npm log, but nothing is send trough MQTT

17-11-2018 23:19:42 debug: ...Control Panel State taken and overview not empty... OK
17-11-2018 23:19:42 debug: Polled...counter:  128
17-11-2018 23:19:42 debug: newarmstatus emitted
17-11-2018 23:19:42 debug: no new status
17-11-2018 23:19:42 info: Status panel infos arrived

Hi, i’ll investigate on it and send you a feedback…


Which panel do you have ? Myelas or Risco ?

I need additionals info…

I am not quite sure what you are meaning, isn’t Risco and myelas the same?
I use the MyELAS app and my alarm is a Infinite iConnect 2-Way

In some areas (probably in Europe) they sell as Risco, in other countries as MyElas… The product is the same and the cloud too… but i’ve no tested it with myelas yet… Can you send me config.js (without your credential,obviously)and lg files ?

In case open a request on my github project

I did create an issue on your github page.
I did attach my logfiles and and config.js

I can log in on both websites with my login

Hope this helps

Hi any news on my arm/disarm issue

Refer to issue on github