Logbook showing service names instead of automations?

I am also updated to 2021.4.5, and I still have the same issue. I only see things like turned off by service light.turn_off , or the name of a script, never an automation name. Many times it says nothing at all. I just used my Magic Cube to turn on a light, and in the logbook I see the event of the cube firing, and then Kitchen Light turned on. It doesn’t tell me anything at all about which automation was used, or even which script the automation called to turn the light on.

I wondered if it might be because I use packages and have my automations broken up into one per file a la Frenck, but I tried making an automation using the UI and it doesn’t behave any differently. Searched GitHub for open issues but I don’t see any.

@SteveDinn @anon43302295 @Markus99 @finity @jeffreykog @mang0 @Anwen

I think I found the problem. In my recorder integration I have included domains. I had automations instead of automation. Now I’ve taken the ‘s’ off ‘automations’ and restarted, the logbook is displaying the automation that triggered the event.

Hopefully that is the fix for you all as well :+1:t2:

4 Likes

Oh that is probably what’s going on! I don’t have automations included at all :woman_facepalming:

I feel like an idiot. Why didn’t it occur to me that automations were not included in my recorder! :woman_facepalming: Thanks @AJStubbsy

1 Like

Nice! I had the same exclusion, and it fixed it for me as well for automations.

When toggling lights from the web interface or mobile app i still see “light was turned off by service light.turn_off”. I’m unsure if this is also setup-related, or intended behavior. I expect it to show the user name, but i’m not sure if that matches the actual behavior. Do you know what is intended here? At least i have an direction to search into now, thanks

1 Like

The service call log is certainly intended behaviour and I suppose it depends how your integrations and lovelace cards are set up but I don’t know about specifying the user that initiated it. I remember reading a request for this but I can’t find anything that would enable that in the logbook or recorder integrations.

If you do find out I’d be grateful to know how :+1:

You’re a scholar and a gentleman, good sir. I also had automations excluded in the recorder. My first test after removing that exclusion proved successful.

Thankyou!

1 Like

@jeffreykog you’re right. If I toggle something like an input_boolean it does say turned on by and then the user that did it. Maybe this is because it’s a direct control instead of a service call. Would be worth testing with a switch you have and check that integration is properly included in recorder.

Hmm thanks for the confirmation. I removed all logbook, history and recorder config (leaving only the ‘logbook:’, ‘history:’ and ‘recorder:’ tags), and i still see no user history. I have also done a full purge and repack (Service recorder.purge with repack: yes), with no luck.

I store my history in PostgreSQL. Maybe that is related. I could maybe try dumping the entire database and recreating it from scratch. I will report back when i know more