Hi, I’m working on an node.js module for heating control in our house. Now it is working with a “polling” concept where all relevant items (thermostats, temp sensors, etc) are checked every minute.
I’ve started to add event driven actions - and subscribing to item events is pretty much straight forward with "/rest/events?topics=smarthome/items/{itemName}
The next step is to subscribe to events from all members of a group (eg. all temp sensors and thermostats), but I am not able to find out how to do this trough the REST API. What I am looking for is something like the “Member of {groupName} changed” in the built in rules engine.
You have to subscribe to the group item and then you should get the corresponding events through the API.
Probably you have to subscribe to the group members as well …
After some more investigation, I found the following:
A group which is defined without itemtype (and function) will not emit any events.
After I defined the aThermostat group like this:
“Group:Number:SUM gThermostats”, a group event is emitted when the sum of values for all group items are changed