Determine if script trigger is node update vs other script update

Easy to use, 100% Lua-based event scripting framework.

Moderator: leecollings

Post Reply
lastofthejediknights
Posts: 24
Joined: Tuesday 27 March 2018 14:17
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Location: uk
Contact:

Determine if script trigger is node update vs other script update

Post by lastofthejediknights »

Hi,

Is it possible to determine the source of the update of a device's value?
i.e. in a script, activated upon a device update, can I determine whether the change was due to an INCOMING data update, as opposed to a change to the device from another script for example?
User avatar
waltervl
Posts: 5902
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Determine if script trigger is node update vs other script update

Post by waltervl »

For a switch you can check the device log.
For a sensor I think the easiest way is to check the domoticz log file.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Determine if script trigger is node update vs other script update

Post by waaren »

lastofthejediknights wrote: Sunday 14 February 2021 21:46 Is it possible to determine the source of the update of a device's value?
A similar question was answered here
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Post Reply

Who is online

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