DA Bridge can now push ("proactively report") the status of certain device types to Amazon Alexa. This is particualarly useful with door contacts and motion sensors because it allows you to trigger a routine for instance if a door opens or a sensor detects motion.

Although for most tasks it makes more sense to let Domoticz handle it, there are some things Domoticz can't do for you, like play music, speak a voice announcement and control any devices you may have that are not controlled by Domoticz.

TLDR: To enable proactive reporing of devices:

Not seeing the script? Make sure you are logged in first!

Note that the Alexa app does not allow all types of devices to trigger a routine. E.g., you can not trigger a routine by switching a lamp on or off. If you want to use a device to trigger an event and the Alexa app does not let you, you can work around that by creating a door contact in Domoticz and use that as a trigger in the Alexa app. You can make the door contact follow the lamp (or whatever it is you want to trigger on) using the Domoticz event system.

But there is more. If you proactively report the status of lights, Alexa wil exactly know how long your lights have been switched on, and can keep track of the energy usage. In order to make that work, enter "power: 10" on a seperate line in the description field in domoticz. "10" being the power consumption of that particular device in Watts. Do a device discovery, copy/paste the newly generated script into domoticz, operate all relevant lamps/switches at least once and do a discovery again. Yes, that should be easier. Working on it :)

Domoticz will automatically execute the script every time the status of a device changes. The script itself will make sure not all status changes are reported to DA Bridge, but only the for the devices you need. More specifically: Only motion sensors, door contacts, and switchable devices if you specified the power consumption for that device in the description. Any status changes of other devices will be silently ignored and will not be reported to DA Bridge and/or Amazon Alexa.

After copy/pasteing and enabling the script, make sure to trigger all sensors at least once, then let Alexa discover new devices. Only after your Domoticz has reported the state of a device DA Bridge knows that you are proactively reporting it. If you let Alexa discover devices, DA Brige will report which devices are proactively reported and which are not. Note that Alexa will not report any new devices when you do the second device discovery. Although this is correct (there are no new devices, just existing devices with new capabilities), it might not be what you expect.

If you add or remove devices you want to be proactively reported, you will need to install a new version of the script as well. A new version will be automatically genergated when you let Alexa discover devices. You need to copy/paste it manually into Domoticz, or new devices will not be proactively reported.

Please note that this functionality is currently beta. It won't break your setup, but it might not work completely as expected. Any feedback is appreciated, it helps me to improve DA Bridge.

Last but not least: Don't share this script with anyone! It is automatically generated specifically for you and it contains your prd_key!

Please log in to see the script!