So, I have a simple ZigBee Network in my Astronomical Observatory where the various devices are essentially independent. I just use the network to turn Smart Plugs on/off leading to specific equipment that I what to control from my own Control program or where I need the capability to remotely reboot equipment when there’s a glitch. I successfully do this using REST API calls. Similarly, I use REST API calls to get the open/close status of certain openable items like the Observatory door and Dome’s Shutter. I don’t use Scenes, Stored Rules or Groups as I haven’t found a need for them up to now (where there are logic rules like Dehumidifier shouldn’t be on when Door or Shutter are open) I control this using my own Control program where I have access to other information not in the Network.
Now I’ve ordered a 4 button zigbee smart remote controller (NEDIS ZBRC10WT) that I’m hoping I can utilise for sending particular Commands through to my Control Program, that for example might move the Observatory from one mode of operation to another without having to log onto a computer or tablet to effect the change.
- I’m trusting/hoping that Phoscon will accept the 4 -button controller to the Network (but no guarantee, it’s not on the Verified Device list). I think it will go in as a sensor with type ZHASwitch, but that’s a guess at this stage.
- I accept that I might need to cheat by linking the buttons temporarily to my Auxillary Light & maybe create a dummy scene or something.
- I realise that I will need to establish what button event code numbers correspond to the buttons using a sniffing program or by some try and error (most system seem to use numbers like 1001, 2001 etc)
- After that I’m really totally clueless on how I would use REST API calls to establish whether a button had been pressed and which one. With my existing REST API calls I’m pulling data from deCONZ to get the current on/off or open/closed states. But with Button Events the events are in a way pushed out and around the network. Do I need to have some form of socket to receive the events ? Or can the events me made to somehow set virtual CLIP Sensors within the network from where I can pull the info that a ‘button’ was pressed and its ‘lastupdated’ time. With these two pieces of data I can establish if the button press is recent and is one that my program hasn’t yet responded to and then act.
If anyone can offer some firm examples where they’ve had to do something like this or have some suggestions, I would be grateful for the assistance.