I have made a simple python script that will return "LOCKED" or "UNLOCKED" on my door using Verisure's API (a swedish security company). How do I implement it in domoticz so that the virtual switch changes state depending on the JSON value? My script looks like this:
Is it possible to use the script I have in my main post for Domoticz? If so, how and where do I implement it? The plugin you shared has a lot more in it than I will probably ever use, I only have a doorlock, the first scirpt I posted returns "LOCKED" or "UNLOCKED" and the second script just needs to be ran to toggle the lock state of the door.
I have solved it in a different way, I made my python script post the on/off json to the virtual switch depending on the state, and putting the python script inside Windows Task Scheduler so that it updates every 5 seconds, the only problem now is that I need to add the "on/off action" to my script. How do I trigger a python script on a Windows Machine via the "on action" and "off action"?
LordMax wrote: ↑Thursday 21 October 2021 15:29
Hi again,
I have solved it in a different way, I made my python script post the on/off json to the virtual switch depending on the state, and putting the python script inside Windows Task Scheduler so that it updates every 5 seconds, the only problem now is that I need to add the "on/off action" to my script. How do I trigger a python script on a Windows Machine via the "on action" and "off action"?
Thanks beforehand!
Best regards Max
Put it in the scripts folder I suppose. But I guess you tried this and it is not working..... What error do you get in the log file if you switch on/off. Most likely that will give a hint.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar