Re: Script with virtual sensor send error
Posted: Thursday 06 May 2021 16:02
That is only possible if the hardware device can report it's state back to the script. Then you can make a dzVents or lua script that update the state in Domoticz.
Then you also better do the on/off switching in that dzVents or lua script.
So if you switch the device on with the virtual switch the dzVents script will be triggered and send the command to your hardware.
dzVents later (after for example 30 sec) will ask the hardware what its state is (on/off) and will modify the state of the device. If the state is different you can send a notification or log an error in the logfile.
See for info about dzVents scripting:
https://www.domoticz.com/wiki/DzVents:_ ... _scripting
Then you also better do the on/off switching in that dzVents or lua script.
So if you switch the device on with the virtual switch the dzVents script will be triggered and send the command to your hardware.
dzVents later (after for example 30 sec) will ask the hardware what its state is (on/off) and will modify the state of the device. If the state is different you can send a notification or log an error in the logfile.
See for info about dzVents scripting:
https://www.domoticz.com/wiki/DzVents:_ ... _scripting