See where request for action came from?

A year ago when I started it was simple. I had 3 bulbs and that was it. Now here I stand with multiple bulbs, switches, a garage door opener, trackers and the list goes on. With so many users and devices sometimes it gets hard to debug and diagnose. It would be great if I know what’s causing what issue locally so I can fix my problems. ie lights come on because someone requested it but don’t know why it was requested.

So, I’m just saying. If computer A requests lights off/on can we log that? I have some random things happen (lights on/off for no reason) and it would be great to find out so I can tweak my install to keep it from happening again.

Thanks!

Wouldn’t increasing the log level to debug give you that info?

I haven’t messed with it but I just assumed that it wouldn’t since increasing mostly gives you errors, warnings, and such… I just want

ip 192.168.1.130 requested switch.bedroom_lights to off

AFAIK logging will not tell you this

You could build the logging into your automations, like this for example.

I don’t really understand what’s going on there?

In the past I’ve added a notification platform (like pushover) near the end of my action, with a message identifying which action was called, then added the log book component as well. Both of these helped figure out what was going on.
Also, when something triggers, like the light in your example, it helps to step through the automation and figure out why it triggered.

I think what’s he interested in - or maybe it’s more what I’m interested in, is a little different than just logging automations. Say a light turns on. The question is: did someone click the interface? Did someone give Alexa a voice command? Did someone trigger a scene?

It’s unclear how to go from the state change back to the root cause.

That’s pretty much what I want. I’ve got 4 users in my house, each with the ability via multiple devices (phone, voice, tablet, computer) to toggle lights, automatons and scenes. I just want to be able to see when a light is turned on,

  • Who turned it on
  • What time maybe
  • what user &/or device the action was called from

It would help because If user A does a voice command and a light comes on on the other side of the house it would be nice to be able to narrow down the issue instead of just sticking your head out of the room and saying “Did you turn my lights on and off?” and then wondering what happened because everyone says no. Obviously something triggered it, it’s visible in the logbook, but seeing where it came from and figuring out what they said or did to trigger the action isn’t available right now.