Windows NDI

As I understand it, Windows does not natively perform any on/off/wake/sleep network broadcasts. Is there an existing application or service that adds this capability that Sense can take advantage of? Would such a thing be useful for Sense?

If it would be useful and does not already exist, I’d like to take a stab at building it. What does Sense need to see broadcast for the on/off/wake/sleep events?

I’m not sure your are going to be able to get much info on this, partially because from what I can tell, the energy hints embedded in network broadcasts are somewhat custom for each device.

Some info hinting at this (X-Box is good at giving hints) can be found in this blog:

Still more in this video:

I am hoping to get some feedback from the Sense team here. I’m a software engineer, so I was thinking that if this doesn’t exist already, I could write an application that would do the job, open-source it, and let the Sense community use it.

I thought that Sense provided an API to support such things, but from what I’m seeing it appears it’s only for data export.

Hopefully I am confused, and the Sense team can help.

An API to interface with would be even better from my perspective, if such a thing existed. I suspect that it does not, and adding one to the Sense just to support detecting on/off/sleep/wake events for PCs would not be worth the Sense team’s time and effort. Taking advantage of something the Sense monitor already does, though, might be.

If your PC is capable of calculating its own power utilization on a regular basis, you could write a “reporter” that emulates how Kasa smartplugs report in on power usage after they receive a “emeter” network broadcast. Somebody has already written an open source SenseLink that reports power from Home Assistant.

2 Likes

So, are you saying there is an API, or at least a published interface spec, for reporting power somewhere?

Yes, the reporting protocol / API is a small piece of the Kasa query / response protocol that Sense has implemented to “sample” Kasa power monitoring smartplugs.

Here’s some info on the protocol.

I think Sense has only implemented the:

Get Realtime Current and Voltage Reading
{"emeter":{"get_realtime":{}}}

command, so one needs to write a “reporter” that listens for and responds to this request. There are several examples of how to do this out on GitHub, that also show how to implement the lightweight encryption that goes with the protocol, including the SenseLink project I posted earlier. There’s also an interesting one here that that shows how to poll data from a Kasa plug, as well as a Sense, using Java.

1 Like