Enhancement request - home automation integration

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Enhancement request - home automation integration

SteveG
Could the gateway firmware be enhanced so that a MQTT message is publish each time a zone is triggered whether the alarm is armed or not. I'm using OpenHab2 for home automation and would like to subscribe to these messages so that I can reuse the alarm PIRs and other sensors to provide presence information.
Reply | Threaded
Open this post in threaded view
|

Re: Enhancement request - home automation integration

vysocan
Administrator
Hello Steve,

we have to be careful here. MQTT packet via Ethernet takes long time to produce. On the other way alarm thread needs to be fast, as it supposed to check tens of zones every 250ms. It can be done, but it needs to be tested how responsive the gateway is.

There is feature called trigger. OHS is able to switch remote relay that is connected to it, when PIR is detected. And turn it off when PIR ceases, immediately or after specified time period.
Reply | Threaded
Open this post in threaded view
|

Re: Enhancement request - home automation integration

SteveG
Just done a quick read through the code and it appears that when a trigger fires (on or off event) an MQTT event is published. It should therefore be possible to configure an alarm sensor to fire a trigger and so publish an MQTT message. One issues however is that a trigger requires a physical node for the to_address for this to work. Is it possible to setup a dummy or virtual node?
Reply | Threaded
Open this post in threaded view
|

Re: Enhancement request - home automation integration

vysocan
Administrator
Trigger actually does not produce MQTT event. Publishing for MQTT is now only done for all Sensors, Inputs and Groups.

Trigger on zone or sensor is able to create push message to another node. Or/and is able to push event to log. Logger then issues trigger alter, that is email, sms, page.

Dummy to_node is something I want to do for clearness. But is can be done even now I hope, you just select Pass as Off. That is the value is not to be passed to another node, assuming you only need Logging On to issue alert.

I'm not saying that MQTT publish cannot be done for zones. It just have to be tested.

My concerns are about Ethernet library. I had to add disable interrupt commands into it, because the RFM69 library is not following SPI sharing. Basically it interrupts Ethernet chip in the middle of SPI communication. This is the only thing that generally bothers me.
My future plans is to get rid of this RFM69 library and use, or create library that will follow the SPI transaction standards. I have seen attempts to add the SPI transaction to this otherwise nice library, but they do not work properly in RTOS environment.

Reply | Threaded
Open this post in threaded view
|

Re: Enhancement request - home automation integration

Fillipsonn
Hello Adam,

This theme is interesting for me too.
I think, that automation just needs the presence detection in zones, not every PIR trigger event.
So the presence in zone is activated during the first triggering, then each following trigger in this zone just resets the timer, which switch off presence when counts to 0.

Just idea. ;)

Another way, which I'm thinking about, is connectig the RPi with RS485 to the OHS bus and create plugin to Hass.io.

Thaks and Regards
Filip
Reply | Threaded
Open this post in threaded view
|

Re: Enhancement request - home automation integration

vysocan
Administrator
Hi,

I will put it on my ToDo list. That is to make some test how will GW be flexible when doing MQTT on PIR event.