Feature Request: Add ability to view how long bulbs have been on for

Although I know LED bulbs don’t use too much power, sometimes I will forget to turn certain bulbs or groups of bulbs off for a few hours.

I would like to be able to view the number of hours and minutes each bulb or group of bulbs has been running for in a particular day.

A different smart home manufacturer has already implemented something similar to my request for their smart plugs which you can see in the attached image.

1 Like

I wish I could like this EVEN HARDER.

At one stage I had a Home Assistant instance purely for the purpose of reporting when my LIFX bulbs were on or off. :joy:



We currently don’t store the aggregate amount of time that a device is connected to the cloud over the day.

What you could do is have a script running on a computer (like a raspberry pi) and poll your network on a regular basis to see what lights appear over the course of the day

I can help you with the part of the script that gets the information you need (we have a message that gets uptime since last power on)

1 Like

How is ‘power on’ defined? Since the bulb received electricity or was ‘powered on’ by the Lifx or any other app?

Is this clarified anywhere? The entry in the online documentation is not clear.

@delfick-employee a little clarity here, please?

I’ve been looking at the output of lifx lan:attr _ GetInfo and all my bulbs have confusing values for time and uptime. It looks like uptime is the same value as time but in milliseconds:

<mac>: {"downtime": 0.0, "time": 50243806409000, "uptime": 50243.806409}

Looking at attr_actual for GetInfo shows them being identical. I don’t know if this is a Photons issue or a firmware issue, though.

1 Like

sorry, I thought you were asking @R11R

Power on has two meanings depending on context. Soft off means the device has electricity but the LEDs are not outputing light. Hard off means the device doesn’t even have electricity.

Uptime in the GetInfo message is time since the device started getting electricity

It looks like uptime is the same value as time but in milliseconds:

“time” is meant to be what the device thinks the time is. To be honest I’m now confused why it’s part of the public API because you don’t have the message that tells the device what the time is. (also, that ability doesn’t work very well anyway because it doesn’t take long for it to drift)

Right, and we’re trying to track soft on/off here, not hard on/off which is (mostly) meaningless when smart bulbs get power 24/7. Being able to track when the LEDs were turned on/off is so helpful when trying to track down, “now which piece of automation software I was tinkering with just did THAT?!” issues.

yeah, we have a recurring idea to make something that provides information on say cloud.lifx.com about what cloud things change your device over time. However that hasn’t made the roadmap, and probably won’t for a while due to competing priorities.

Having a log on cloud.lifx.com that is remotely queriable and returns log entries as JSON would make so many developers and automation engineers lives easier, especially if those log entries could determine which protocol was used to make the change, i.e. “LAN” or “HTTP” and in the case of “HTTP”, the user-agent string of the request that triggered the change.

Oh definitely, that’s why we keep discussing it every so often :slight_smile:

But it isn’t on the roadmap, and probably won’t be any time soon.

In the meantime, the devices currently don’t have an idea of how long the LEDs have been on or off and so the only way to know is to constantly poll it.

I think this should be possible using the LAN API. Requiring internet connectivity to get this sort of information is overkill and not very flexible.

The other thing that you guys should seriously consider is to introduce power measurement in KWh directly. The problem is that even with the correct uptime information available, there is no way to reliably calculate consumption because brightness is not adjusted linearly and this info is not logged anywhere anyway. If you have any ideas about this I would love to hear them. :slightly_smiling_face:

The bulbs don’t have the storage for it. You’d always need some external system to store entries. Being able to configure a remote syslog equivalent on the bulb besides cloud.lifx.com would be nice.

it certainly is an interesting idea :slight_smile:

Some storage could be introduced in future bulb generations. Obviously capacity would be limited but as manufacturing output scales this could be feasible.

This is a great idea. Being able to poll the bulb for its current power usage (and potentially expose that as a HomeKit characteristic) would be tremendous.