Official REST API is crucial for integrations with other platforms, e.g. I know my average energy usage when I’m not at home and I’d like to have an alert if the usage higher then an average which means I forgot to turn off smth (assuming it’s not recognized device).
Yes, an API would be great and we hope to get there eventually, but it’s a major undertaking and would require an immense amount of supporting work. We’re still a pretty new product, so our software efforts are largely focused on improving the core device detection experience at the moment. We are working on further integrations however and should have some good news on that front in the near future.
Yes please provide a public API I’m assuming you already use some internal API(s) due to the various platforms that Sense supports. It really shouldn’t be too hard to expose (a subset of) it to a public API.
It works ! You just need to know a bit of python… Supporting a formal API is very expensive in terms of documentation and helping people who can’t quite get it to work the way they want. I can understand why Sense puts most of their other important projects ahead of productizing an API that likely still has a long way to evolve.
I also have a Postman Collection that you can use to get some info off your Sense monitor.
I’m looking for some samples from additional people so I can improve this all. Preferably at least someone that has solar hooked up too so I can wire up the production side of things as well.
Opensource it so we can all contribute (MIT or BSD licenses please). Not to pick on Ryan, but…man that’s a lame excuse. New company? The smartest thing for you to do in that case is get community developers helping ya’ll out. There’s no reason this thing is still pretty much providing little value to me. I’m bout ready to sell mine to find someone who does have sensible APIs to work with (hope that’s not a pipe dream). Anyhow, I get you’re prolly under crunch Ryan; didn’t really want to pick on you
Ryan, can you release Android Sense App source code privately, or publicly? I’m developing my own personal Android Sense app using existing Rest APIs just to add more detailed Solar monitoring features that I need (live energy distribution/direction flow diagram, exported energy metrics). I would rather reuse existing UI and features than reinventing the wheel cause I like the official app.
Our source code is not public, but you might want to check out the Data Analysis subforum on here. There’s some unofficial API options floating around that might help with that you’re trying to do.
What would it take to open up your integrations system as an API platform that we could contribute to? As you no doubt are aware, there are just way too many types of smart devices out there and there just isn’t any way your small team could possibly create official integrations for everything that is needed. Why not enable us to build custom integrations that conform to your predefined interface? Imagine how much more excellent data you’d get in return!
Cool idea, but I’m betting that that is much harder than it might seem for both parties. As far as I can tell, the functionality for collecting integration data is built into the monitor firmware and is custom for each devices’ (HS110, WeMo Insight and Hue) specific API. I’m guessing that only the most capable amongst this audience, not including me, would be able to write robust firmware routines for real-time polling, data acquisition and integration into the uploaded streams.
To give you some idea of what the IF looks like, for the HS110, the Sense monitor sends out an HS110s specific broadcast to all the HS110 active port every 2 sec requesting status data. They respond (or not) and the Sense probe accumulates the time-stamped data, for eventual upload.
The Hue model might be a little easier. I’m not sure if the Sense polls the Hue, or if the Hue messages the Sense monitor when there is a change in a light(s)’ specific level, along with the new estimated power/energy consumption for the new setting.
Pretty sure that Sense polls the hue bridge, don’t recall the frequency. Hue responds with an xml of all the lights and thier statuses. If I recall, sense polls group changes every 15 minutes, which is ok since you likely aren’t moving lights around frequently.
Is anyone else here using a socket connection with one of the unofficial API’s? If so, have you noticed weird issues if you’re pulling data via API and then you open the Sense mobile app and try to view the real-time meter? I used to be able to do this just fine, but lately my API agent seems to basically kill the real-time meter in the app.
I just recently started pulling from the WebSocket too. I do notice that if you over connect (reconnect to the socket too many times in a row) it will lock it up temporarily. I’d imagine it’s some sort of rate limit detection.