Quick and Dirty, Light toggling

I am so happy since I started using the Harmony remote for the control of the Kodi installation in the living room. It works great and I do not need my smartphone for the control any more. But for switching off the light when we start watching a movie I still needed the smartphone, so I decided to fix this problem as well:)!

Toggling the state using the Harmony remote

This is the Python script I wrote, not nice but it works.
I first gather the state of the lamps using the Domoticz JSON API. After that I toggle switching off the lamps, or if everything is off I switch the 3 lamps on (using a scene with ID 6).

I then mapped the Key o to this in keyboard.xml of my Kodi setup.

After that using MHGUI I mapped the Red button to the key o.


That's it, quick and dirty.

Happy Hacking!!

RSS Home

Updated: 2021-04-21 Wed 20:30 License: CC BY-SA 4.0