which User initiated command

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
anoriel
Posts: 8
Joined: Friday 18 August 2017 14:43
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

which User initiated command

Post 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.
anoriel
Posts: 8
Joined: Friday 18 August 2017 14:43
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: which User initiated command

Post by anoriel »

Well... it seems that I'm really alone in the dark...
:o
User avatar
Egregius
Posts: 2582
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: which User initiated command

Post 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.
anoriel
Posts: 8
Joined: Friday 18 August 2017 14:43
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: which User initiated command

Post 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.
anoriel
Posts: 8
Joined: Friday 18 August 2017 14:43
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: which User initiated command

Post 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 ?
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests