Tuesday, May 15, 2018

Displaying a common device status

Once everything is merged, the challenge will be to make sure all devices are reported to the correct status. There are 2 main stores of device state in my setup;

  • Domoticz
  • Fibaro
Basically we want Domoticz to know the state of the Fibaro devices and also Fibaro to be able to know the state of the domoticz devices.

There shouldn't be 2 different master sources of data. As Domoticz seems to be the master controller and other devices, e.g. Philips hue is capable of updating the status in domoticz automatically and homebridge uses the domoticz plugin, I'm going with Domoticz as the master status and everything will just query domoticz for the state.

To do this, there need to be a virtual device for each appliance that will be have it's state reported. Domotics support all sorts of virtual device, the more common ones we will use is 
  • Switches
    • Sockets (On/Off)
    • Motion Sensor
    • Contact Sensors
    • Lamps/Dimmer
  • Temperature
The full list is located here. https://github.com/PatchworkBoy/homebridge-edomoticz. Most devices will use the standard sockets device, i.e. On or Off. 

The "Ping test"  hardware devices that can be added to domoticz if you wish to check the status of the NAS or the TV or other ping-able device. Note that this does not apply to mobiles or iPhones which need a separate script to update the device status.

HomeBridge Updates

Add the device to the Homekit room and the device will automatically appear in Apple Home. I did not add a ping test device to homebridge directly, but add the actual virtual control device to homebridge and on the backend, use the ping test device to update the actual device.

For devices that I think needed to be on all the time, I can add notifications to when the ping goes down, e.g. if your NAS was turned off instead rather than have an extra icon in Apple Home.


Fibaro Updates

Once the devices are added to Domoticz, in Domoticz go to;

Setup > More Options > Data Push > Fibarolink
https://www.domoticz.com/wiki/FibaroLink

This will allow you to send a device state to a Fibaro label. It does not help update the global variable. You will need to create a Fibaro virtual device with a bunch of labels and name it correctly. These labels will be updated with the status of the Domoticz virtual device, e.g. On/Off.

This is probably the easiest way to be able back reporting if you prefer to use the Fibaro app which is much prettier than the domoticz app at this time. If you also like control buttons in Fibaro app, refer to the post on Fibaro virtual devices controlling Domoticz using HTTP commands.

Note, it's also possible to update Fibaro global variables where needed, this can't be done via FibaroLink, but should be easy enough to put into the On/Off action of the virtual device to call a script:/// to use the Fibaro API to update accordingly. I've not done this yet as so far, I haven't found a need for it.


No comments:

Splitting the home network

Who wouldn't want to separate the traffic at home for security reasons. The more common ones include wireless guest and wireless users. ...