I have a Sense Home Energy Monitor that I would like to harness to get notifications when the Dryer stops.
This product sucks for home automation. They only really offer support for IFTTT. If I’d known that before I bought it, I would have probably chosen a different one. For more information, see https://sense.com/
Anyone else interested in a Sense binding?
Unfortunately they don’t have a published API so their API will have to be reverse engineered. It looks like someone has started work on that but it is not complete.
I’ve actually made quite a bit of progress building an OpenHAB Binding using that and other resources. I have basic data going into channels like the voltage and wattage readings.
I’m working on the devices now. They come from the same websocket as the other data though. So, it’s only a matter of time until I get that working. I also want to improve the handling of failed web requests and websocket disconnects. But, I’m feeling pretty good about it.
I actually posted this to gauge interest and see if I could find anyone that would be able to use it. At this point, it would be nice to have someone else to talk to about it.
Did you make any progress on the binding? I had implemented a Python script for this but reliability has not been great, so would love to try something else if you have a working version…
I kinda stopped working on it after seeing that there was no interest in it. Despite the fact that I’m a software developer by trade, I don’t like working with Java.
I still plan to finish it up. I recently noticed that the Roku binding has been sitting in code review for a year which isn’t very encouraging.
Ultimately, what I was looking for when I put this post up was to find someone to bounce ideas off of. I just need a little peer interaction to get moving forward again.
Well I am not a developer but happy to be a sounding board or guinea pig if you are still interested in working on this. Let me know.
Apologies on the delay in reply. I was out of town for a funeral. One of my struggles is deciding on the structure of the binding.
I’m sure you are familiar with things and channels in OpenHAB. https://www.openhab.org/docs/concepts/things.html
Originally, I started building this as a thing with channels. But lately, I’ve been struggling with if it should be a Bridge with things and channels. When you think about it, a light or clothes dryer could be a thing.
Which do you think makes more sense?
A. Sense (Thing) -> Dryer (Channel) with current watts.
B. Sense (Bridge) -> Dryer (Thing) -> Wattage (Channel) and Switch (On/Off Channel)
Option B will require some rework.
Thanks in advance for your thoughts on this.
I have two Sense monitors and would love to see this binding come into existence. I don’t know if you need a bridge here or not. Wattage greater than 0 should indicate that the device is on. That being said, to play devil’s advocate, you could include things like “last on” or “on for x minutes” as a channel easier if you do a bridge. Also, since there are multiple devices, I would think the config would be easier with a bridge as you get more complex. Either way, happy to test this if you decide to pull the trigger.
Option B would be more inline with how other OH bindings work and follows the concepts of OH over all.
A Bridge is a special type of Thing that gives you access to other Things. Then each device is represented by it’s own separate Thing.
But, that approach only really makes sense if you have only one Bridge that would be used to access lots of devices. If the Bridge will only ever work with a single device then there is no need for the Bridge and go with option A.
Thanks Rich. Your input means a lot to me.
The sense energy monitor is basically just monitoring electricity use and making a guess as to what a device might be. You can of course change the name and merge devices that it detects.
I think the part that is difficult to wrap my head around is that it never really communicates directly with any other devices. So, it’s not really bridging anything. At least not in the same sense as a hub. But, if it tells me that my aquarium heater is using 202 Watts, then the Aquarium heater feels like a separate “thing”.
Maybe look at what it offers, and then work out how to structure it.
From what I gather -
There’s a physical device (the monitor)
It’s not the only one in the universe - your household may have more than one such device.
The device offers a variable/unpredictable number of umm virtual “devices”, each supposedly representing some real consumer.
Are these discoverable from OH? What happens if the user rearranges them?
Plus, presumably, an aggregate set of readings?
A binding author may be able to inform if dynamic bridge Things that might appear or disappear in service present some problems.
It feels wrong to me, but there may be no reason why not.
Gut feel is that each Monitor would be represented by a bridge Thing, the user to configure this once.
Such a bridge would “own” consumer Things, each with several channels, each consumer Thing representing a consumer device, or the aggregate readings.
Ideally, these would be dynamically discoverable.
I think I’m hearing the majority say that a Bridge make more sense. That is my gut feeling too.
I have seen this kind of device few years ago on TV, not sure if it is the same.
I am not using it but I have 3 phase power monitor based on
I would like to have that AI functionality that detects what appliances are on. I already store the data in MySQL DB and have nice Grafana charts but those extra data will be extra useful. Anyone found some open source solution?
Might be easy to make the guess for most hungry devices at home with few blocks in NodeRed but that does not scale well and will need a lot of manual tweaking.
I was just searching for such a Box where i can messure the overall Power in my House.
Now i saw the Sense Energy Monitoring box. Instantly checked if compatible with OpenHab and landed on this Thread.
Now (sorry a bit offtopic) my question.
Does anybody have such a Box in Place here in Europe? Specialy in Switzerland maybe?
Thanks and redards
@freak3dot - were you able to make any progress on the binding ?
I definitely need to spend more time on it.
My understanding is that the Sense box works only in north america as it monitors only 2× 120V phases. In Europe, most new buildings use 220/380 Wye/Delta three-phase systems. Though I’ve seen discussions where people ‘adapted’ Sense in 3-phase industrial applications here in the US. You might get a better answer in the Sense forum at community-dot-sense-dot-com
Now, regarding the API, I do not have all the details, but Sense integrates well with Hass.io (another Home Automation software). This could mean that an API might be available… or even possibly developed by 3rd party.
I remember a web socket connection with messages that contain information about the devices and usage.
Their API information is not published. I was definitely referencing the hass.io implementation and some other GitHub repositories.
My main use case for this will be the sump pump. The Sense app lets me notify when it comes on. However, what I’m really interested in is when it hasn’t run for a while. This is a need that OpenHAB could definitely fill.
It looks like I’ll be starting from scratch. The code I had so far was on my old laptop that is no longer with us.
Ah ha. I do still have a version of the code I wrote.
If you check this out, keep in mind that I plan to rewrite it.
It is currently (Thing) -> Dryer (Channel) with current watts.
It should be Sense (Bridge) -> Dryer (Thing) -> Wattage (Channel) and Switch (On/Off Channel), etc
Sounds very promising. Thank you for sharing.