Page 1 of 1

which User initiated command

Posted: Friday 18 August 2017 14:51
by anoriel
Hi everyone,

I'm trying to find which User initiated a command.

For the moment I've got one switch by user to tell who has click on the button but I would like to get the user as it is in the log:

2017-08-18 09:00:50.686 User: philippe initiated a switch command (203/Portail/Off)
2017-08-18 12:17:14.628 User: Admin initiated a switch command (203/Portail/Off)

Is there any way (lua/blocky,python/other...) ?

The only thing I think about is a daemon looking at the log to find the command itialized and get the user, then do an action...

I hope someone already did this...

Please tell me I'm not alone...

Anoriel.

Re: which User initiated command

Posted: Tuesday 22 August 2017 10:00
by anoriel
Well... it seems that I'm really alone in the dark...
:o

Re: which User initiated command

Posted: Tuesday 22 August 2017 10:14
by Egregius
What do you want to do with the username? Send it to a text sensor? A notification?
If you create your own interface, like I did with PHP Floorplan for Domoticz you can do everything you want.

Re: which User initiated command

Posted: Tuesday 22 August 2017 10:53
by anoriel
Hi Egregius,

Thanks for your reply.

Yes I want to send notifications.

For example, 'User A' has activate the gate so I know 'User A' is at home.

I will have a look at PHP Floorplan for Domoticz.

Re: which User initiated command

Posted: Thursday 31 August 2017 15:55
by anoriel
Hi Egregius,

I had a look at your floorplan program but I didn't find how to get the user who actually set an action in domoticz.

You only send deviceName and deviceValue to Pass2PHP so you can't know who had switched on or off a switch...

Am I wrong ?