How can I tell what automation turned on a light?

Hi, I may be missing something, but is there an easy way to see what executed a device command? As far as I can tell, events and logs just list that a device 'turned on' but not what triggered it?

I'm trying to troubleshoot what is turning on a light. In ST this (used to be) pretty easy I could look at the device event history and see what automation etc caused the light/switch etc to turn on/off- i.e 'Webcore Hallway Motion Lights sent on command to hallway light' etc.

Is there anything similar in Hubitat? Many thanks for your help :slight_smile:


I'm not sure if there is anything captured as part of the device events or logs. What I would suggest is turning on logging options for each of the automations that control the device . To do this, open the device, scroll to the bottom and look at the "In Use By" section, follow those links and turn on any logging you think may help.


Thanks, I'll do that then. Though it would be great to see this easily in device event logs - perhaps in a future update @bobbyD ?

Actually, events are just changes in states, not necessarily when a command is run, so I wouldn't expect anything to appear there. I would think it would rely on logging by the device driver within the command, unless HE can capture separate logs for any device command call.

Also, a change in state can be driven by the physical device, i.e. via Z-radio comm's, so command execution wouldn't be the full picture.

It's just one of those things that made it so fast to troubleshoot in 'Classic App' Smartthings, click on the device and imediately see what triggered an action. It would be great to see something similar in Hubitat if it is possible in any way...

My current issue is that a Hue light just randomly came on at 19.26pm this eve, logs and device events just show the 'source' as 'device' it would be brilliant if 'source' could actually show what triggered the event, i.e. 'simple automation rules' etc


The device page should tell you all the applications that use a particular device. You could turn on logging for all those applications - some of them, like Rule Machine, provide exquisite detail.


I can appreciate it would be nice to control this from the device though, it would be more convenient and align with where your focus is in a situation like this. A feature request for some general command logging option for all devices may be worthwhile.

The reason you're seeing "device" in the events may be that state changes for the light may rely on the light reporting it's status, rather than being driven by a command being triggered.


The problem, as I see it, is the HE design. Enable/disable the rules (some folks have 100+ rules so ...) which is painstaking and wrong for 1/2 the needs as it's tied to rule debugging - legacy really. There needs more thought from the user perspective - there should be an 'enable/disable command source' or some such at the DEVICE so that it's not a crap shoot which would ID the source and expedite debug problems. Then, when a device acts up, you get logging specific to a device, not a rule or automation. What seems blatantly logical to me, seems to always upset the community tho.


It doesn't upset the community at all. It's simply that everyone of us has a different thought process then everyone else. The dev's will usually chime in with, "Sounds like a good idea", "You can already do that this way", or "that doesn't make sense and here is why". Then there is the issue of implementation of a request. What seems extremely simple often is not based on the frame work of existing code. What would it take to implement said feature request? Lots of times it could take a whole rewrite of the application sometimes it's a matter of only a few lines added. All of that too has to be weighed against what they are working on and where they want to get to.

A really good example of this is Thread. I would love to see Thread implemented into HE because that would open up a wide array of product for us that would be locally controlled. I suspect though that to implement it smoothly would take a major rewrite of the base code for HE, not just some plug in. How would that affect their current code writing, would anything have to be done hardware wise? The fact is that @bravenel, @bcopeland, and @mike.maxwell and everyone else at HE have a better handle on any of that than we ever will because it's THEIR product and they have more intimate knowledge of the code base than we do. They're pretty transparent about stuff too. As to the rest of us, we can point out options and work arounds and the more experienced can a lot of time point out the why's. Individuals in this community are usually smart enough to understand and accept reasons and comments with grace. Some not so much.

1 Like

It's the one feature from SmartThings (Classic) that I wish Hubitat would add.


I would also like to see this added.

Occasionally a light will turn on or off unexpectedly. I have info logging enabled for all devices and see the log entry for the light turning on or off. But nothing to indicate what triggered it.


Agreed. Ps. good to see some old ST regulars on these forums :+1:t2:

You might be mistaking a difference of opinion for getting โ€œupset.โ€

1 Like

Back to the OP - have you checked Alexa and/or Google for hints turned on?

Thanks @jameslslate but we don't even have these features in the UK yet, i.e. Hunches, Alexa Guard etc

I know this topic is old but I had a similar issue with my bathroom fan turning on in the middle of the night. The switch that I use for my bathroom fan was formally the light switch for my closet. I had the "Hubitat Safety Monitor" set up to turn on the closet light if there was an intrusion. I forgot to update that when I moved the switch from the light to the fan. Months went by before I discovered the issue. To resolve the issue I looked at the "In Use By" section for the fan and then went through each app (and there were many) to see how each uses the fan. They KEY to resolving the issue was that I didn't ASSUME that each app was correctly controlling the fan.


I think the point of this thread is that it would be a lot easier if this was recorded in the event logs (รก la Smartthings), then you wouldn't have to trawl through each app trying to figure it out.

WIth 2.3.3.x the Event log now shows what initiated the event as well as what it may have initiated


I think you're right, but I figured my experience could be helpful to someone else who was having trouble.

But with the new update, it looks like the "Events" may have gotten the update that we have been wanting. I did a little testing and so far so good.


Oh cool, that is ace - I haven't updated yet, but will get on it!

1 Like