Does lua script trigger devicechanged?

Moderator: leecollings

Post Reply
darrepac
Posts: 133
Joined: Tuesday 04 February 2014 21:31
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Isère, France
Contact:

Does lua script trigger devicechanged?

Post by darrepac »

Hi

I don't remember if a LUA script could trigger a devicechanged of a device:
if I change a value in a LUA script (in my case, I change the setpoint of a thermostat like this: commandArray['UpdateDevice'] = idx .. '|0|' .. consigneECSbas), does it trigger the devicechanged of this device. Cause I have an other script that effectively send the command on my device when the devicechanged. It works well when I change manually the setpoint of the device but not when I change it through a script... may-be it is normal!

thx
User avatar
jvdz
Posts: 2333
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: Does lua script trigger devicechanged?

Post by jvdz »

darrepac wrote: Thursday 11 February 2021 11:41 ... may-be it is normal!
Yes it is normal as you are already in a script triggering the Thermostat to update, so you can also handle the rest of the required logic.
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
darrepac
Posts: 133
Joined: Tuesday 04 February 2014 21:31
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Isère, France
Contact:

Re: Does lua script trigger devicechanged?

Post by darrepac »

thanks
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest