Nice to know the user of an action, but better....

Use this forum to discuss possible implementation of a new feature before opening a ticket.
A developer shall edit the topic title with "[xxx]" where xxx is the id of the accompanying tracker id.
Duplicate posts about the same id. +1 posts are not allowed.

Moderators: leecollings, remb0

Post Reply
EddyG
Posts: 1042
Joined: Monday 02 November 2015 5:54
Target OS: -
Domoticz version:

Nice to know the user of an action, but better....

Post by EddyG »

It is nice to know which user activated a switch etc...
A lot of those users are

Code: Select all

EventSystem//home/pi/domoticz/dzVents/runtime/dzVents.lua
It is nice to know that a dzVents script triggered the action, but I rather would like to know WHICH script initiated the action.

Would that be possible?
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Nice to know the user of an action, but better....

Post by waaren »

EddyG wrote: Sunday 28 June 2020 19:22 A lot of those users are

Code: Select all

EventSystem//home/pi/domoticz/dzVents/runtime/dzVents.lua
It is nice to know that a dzVents script triggered the action, but I rather would like to know WHICH script initiated the action.
Would that be possible?
This will not be possible. The user that triggered the switch action is determined by the main domoticz process and from the perspective of that process it's dzVents.lua that triggered the action. A dzVents user script is a function of this main script and domoticz does not see that function.

Besides that this (relatively new) user field in the log cannot be trusted yet.
see this forum post and this github issue
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
EddyG
Posts: 1042
Joined: Monday 02 November 2015 5:54
Target OS: -
Domoticz version:

Re: Nice to know the user of an action, but better....

Post by EddyG »

So if dzVents gave back to Domoticz, with a parameter, which script initiated the action my problem would/could be solved?
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Nice to know the user of an action, but better....

Post by waaren »

EddyG wrote: Monday 29 June 2020 9:48 So if dzVents gave back to Domoticz, with a parameter, which script initiated the action my problem would/could be solved?
Because of the way the domoticz event system interacts with dzVents (via commandArray and API), I don't think that will ever happen. If you really want to log this kind of information, a dzVents shared_ helper function that writes this in a separate logfile could be the next best thing.
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: No registered users and 1 guest