Trying to ON/OFF device through shell command in Domoticz
Posted: Sunday 17 June 2018 14:19
Hello,
I have recently installed for the first time Domoticz, and I am trying to turn on/off a Xiaomi Air Purifier 2, where I am already able to read and send commands through OS shell (debian 8), and now I am trying to add a switch botton on Domoticz to execute those commands on Domoticz GUI, but I am a bit lost on it.
The commands that I am trying to set for now are:
And I have add a dummy hardware and then a sensor device, where there I was able to add a switch, on action and off action options, seems like I have to add a direct path for a script in each action
.
How can I accomplish this without having to create a script for each command?
Thanks!
I have recently installed for the first time Domoticz, and I am trying to turn on/off a Xiaomi Air Purifier 2, where I am already able to read and send commands through OS shell (debian 8), and now I am trying to add a switch botton on Domoticz to execute those commands on Domoticz GUI, but I am a bit lost on it.
The commands that I am trying to set for now are:
Code: Select all
python3.6 MyAir.py '192.168.1.81' 'e7cad3a10ea385ee2b9ce3c55f9e2696' --power ON
python3.6 MyAir.py '192.168.1.81' 'e7cad3a10ea385ee2b9ce3c55f9e2696' --power OFF

How can I accomplish this without having to create a script for each command?
Thanks!