how to differentiate a manual action from the dashboard and an action controlled by a script?  [Solved]

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

Moderator: leecollings

Post Reply
User avatar
papoo
Posts: 126
Joined: Friday 22 January 2016 22:14
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10
Location: France
Contact:

how to differentiate a manual action from the dashboard and an action controlled by a script?

Post by papoo »

hello

is there a command to differentiate a manual action from the dashboard and an action commanded by a script?
I want to update the state of a shutter which can be ordered by dz via the dashboard and another independent system. the action via dz acts on the third-party system and reverses the dz command (impulse command)
I just want to use the silent () command in the exclusive case of an order initiated by the third system without sending a new command to the third system.
the third-party system updates to a push on button called '$impulsion volet douche'
the dasboard blind command is named 'volet douche'
i test lastupdate 'volet douche' but don't work correctly in this case

-if the shutter is activated directly by the third-party system, update of the corresponding device, without the command via the return of the third-party system $ impulse ...
- if the shutter is controlled by dz, no action the device has already changed position via the dashboard
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: how to differentiate a manual action from the dashboard and an action controlled by a script?

Post by waaren »

papoo wrote: Tuesday 31 March 2020 13:43 is there a command to differentiate a manual action from the dashboard and an action commanded by a script?
With current domoticz this can only be done using dummy switch(es) which trigger a script. The script can keep an administration in (global) persistent data and control the real switch based on the evaluation of the variable from the persistent data.
@gizmocuz implemented the user field for some device types in recent beta's in the LightingLog table but that system cannot be used by dzVents yet. dzVents has no direct access to this information and the table is not updated on the same moment the device update is passed to the event system.
It is on the wishlist :D
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
User avatar
papoo
Posts: 126
Joined: Friday 22 January 2016 22:14
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10
Location: France
Contact:

Re: how to differentiate a manual action from the dashboard and an action controlled by a script?  [Solved]

Post by papoo »

thanks waaren, i trie with persitent data
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest