I'm using a script to poll my Daikin airco unit to retrieve the settings from it. Those values are sent to the different target setpoint and selector switches. Those in turn trigger a device event which will send the values to the airco unit. This gives some undesired side effects.
Is there a way to update a device and not trigger any further events?
The devices in question are a selector switch, thermostat and light switch.
I set the values the following way:
Setting light switch:
commandArray[deviceName] = '' .. targetValue
Setting selector switch:
commandArray[deviceName] = 'Set Level: ' .. targetPercentage
Setting thermostat:
commandArray['UpdateDevice'] = '' .. deviceIdx .. '|0|' .. targetValue
The script which sends the settings to the airco unit starts with:
if (devicechanged['Slaapkamer Mode']) or (devicechanged['Slaapkamer Target']) or (devicechanged['Slaapkamer FRate'])
... do stuff ....
send settings to airco using curl
end
To summarize: I want the last event script not to trigger or a way to detect the settings have been changed from outside (not from the UI). Is this possible?
Update device without triggering further events
Moderator: leecollings
- lonebaggie
- Posts: 86
- Joined: Tuesday 31 January 2017 13:21
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: England
- Contact:
Re: Update device without triggering further events
does this help ?
viewtopic.php?f=28&t=15822
or
viewtopic.php?f=6&t=16899
You could trigger your final event to run on the value of a user variable. i use one master event script that updates a user variable . This then trigger another event that only runs when the user variable has changed to a certain value. Care has be taken not to cause loopback and endlessly running script
viewtopic.php?f=28&t=15822
or
viewtopic.php?f=6&t=16899
You could trigger your final event to run on the value of a user variable. i use one master event script that updates a user variable . This then trigger another event that only runs when the user variable has changed to a certain value. Care has be taken not to cause loopback and endlessly running script

Who is online
Users browsing this forum: Google [Bot] and 1 guest