Integration for Home Automation

Totally, and we definitely plan on becoming more broadly compatible with other smart home devices and hubs. We’ve got a couple things in the works right now.

In the meantime, we do work with IFTTT, though it’s not a perfect solution to automation problems.

2 Likes

Love to see integration with Vera Home Controller.

1 Like

The lowest hanging fruit would be the ability to make my “not so smart” appliances, such as my washer and dryer, my refrigerator, etc. a little smarter. HomeKit has the ability to notify me if something happens (such as my front door unlocking or my garage door opening). HomeKit integration could leverage Sense’s detection abilities to tell me when my dryer finishes, when my refrigerator door is opened, and a myriad of other things.

I’m working on a component for Home Assistant to handle exactly this use case:

1 Like

The key to managing a home efficiently is knowing about it. This demands observation and data. I can do very little with the sense.com feed because I cannot, at present, download it for analysis or comparison. I have plenty of tools to understand my solar generation, and some of them are capable of integrating consumption information with the solar generation. But I need to be able to get to the data to do that. The data is ours, and it does not belong to sense.com.

@bayesianlogic.1,
You’re right. If you can know what your are using, and when, you can do effective power management. Have you tried using the python API that Michael also referenced ? If you want realtime access to power consumption and production it works just fine:

GitHub - scottbonline/sense: Sense Energy Monitor API.

If you want to dig through historic data, you can do a little scraping. Every bar graph on the web app is easily navigable and scrapeable vis selenium or rselenium,

Our data is definitely available to us, along with a little of Sense’s special sauce. Just a question of whether we have the skills to access.

If the IFTTT adding a new line to Google spreadsheet would be pretty verbose, or if the Sense data were able to be exported (potentially raw or csv), it would change the game. …also, people will get access to csv data, either it’s not granular enough to some folks or the raw data is overwhelming… Difficult balance for the 1% of us users who would be exporting.
I’ve only done scraping twice. Know what happened? The web site I was scraping evolved on both companies… It was a lot of work to update my code. Then they eventually evolved the website again. lol on me.

I figure Sense will deliver on CSV export at the just the moment I get scraping perfected. I’ve had to change the scraping calls slightly between V2 and v3 of the web app, but that actually improved reliability for me. I can now scrape a whole year of daily data in single run. But that means I now have to deal with little challenges like daylight savings time. Go look at March 11 on the web app. Sense gets the day right (a bar for 1-3am since there is no data from 2-3am), but they also pad the carousel with 12am-1am of the next day since they need to fill in 24 bars.

1 Like

Well sense clearly has the data available, else they could not develop or implement algorithms to mine it.

I have made my displeasure regarding this adamantly clear, and I have indicated that if there is not a resolution to this, I am going to return our sense unit for a refund from our installer, since it is not fulfilling what I demanded at the outset.

@bayesianlogic.1,
Maybe I’m missing something here, but you really haven’t been very clear in this thread about what kind of Sense generated data you are looking for:

  1. realtime snapshot data about devices turned on and associated power usage
  2. CSV time series data on energy usage / production per device at an hourly or above granularity.
  3. per microsecond raw data so you can do your own machine learning experiments and identification.

If you are looking for the first two, they are available today with a little work.

I’m looking for a Web API I can interrogate and pull into an online table my consumption, sampled at 5 second intervals.

Frankly, I never cared about having some kind of automatic show-offy gismo that claimed to identify what devices I have. If I have 5 second resolution, I can do that myself.

And I bought the darn thing for >$200. You are acting as if it was free and I’m whining. It’s not what I asked for of my contractor. They apparently didn’t realize that it did not provide it. There are competitors to Sense who do. And I’m tempted to return the Sense and get one of those.

  • Jan

@bayesianlogic.1,
Thanks for being more specific. The sense API on GitHub should work for you. Just authenticate a session, then query active_power and active_solar_power every 5 seconds and dispatch to wherever you want. The example only runs through once, but a loop and sys_sleep(5) will make it work…

Active: 3212.6730057317764 W
Active Solar: 1884.7878534855554 W

1 Like

Also, @kevin1, you can hardly pretend I’m the only one asking for this. There’s been an active request on the wishlist for an API to access series of consumption data for a long time. I was expecting that, just as in the case of the data output of my solar inverters, a gismo which did home consumption monitoring would also provide that feature as well. Apparently my contractor did. It apparently doesn’t.

I can’t believe it would be difficult to provide that. But, I expect, Sense doesn’t want the barrier to obtaining this data to be too low lest they lose some kind of competitive edge. Open data is what it’s all about.

@bayesianlogic.1,
Not pretending that no one is asking for an API. Just trying to understand what you are looking for because it seems to keep moving around ?

  • an API that gives you access to the data you want ? Some coding required - DONE/AVAILABLE
  • a turnkey API integration with some other systems that you haven’t specified yet ?
  • a guarantee that the data will be open ?

Try this snippet in the main, just after authentication:

while True :
        print ("Active:", sense.active_power, "W")
        print ("Active Solar:", sense.active_solar_power, "W")
        print ("Active Devices:", sense.active_devices)
        time.sleep(5)
        sense.get_realtime()

Voila - realtime data every 5 seconds !


Active: 1307.7867550118826 W

Active Solar: 2088.206370681175 W

Active Devices: ['Solar', 'Other', 'Always On', 'Wine fridge']

Active: 1205.68335837638 W

Active Solar: 2080.2029271756765 W

Active Devices: ['Solar', 'Other', 'Always On']

Active: 1211.2089672834845 W

Active Solar: 2074.7690572945867 W

Active Devices: ['Solar', 'Other', 'Always On']

Active: 1186.932354491204 W

Active Solar: 2092.380433443701 W

Active Devices: ['Solar', 'Other', 'Always On']

Active: 1211.4922382677905 W

Active Solar: 2098.99344553845 W

Active Devices: ['Solar', 'Other', 'Always On']

Active: 1219.57131298678 W

Active Solar: 2124.617451679893 W

Active Devices: ['Solar', 'Other', 'Always On']

Active: 1199.5503087579273 W

Active Solar: 2130.958141069161 W

Active Devices: ['Solar', 'Other', 'Always On']

Active: 1274.48032903485 W

Active Solar: 2125.7676501679234 W

Active Devices: ['Solar', 'Other', 'Always On']

Active: 1228.9526036744937 W

Active Solar: 2127.711158422753 W

Active Devices: ['Solar', 'Other', 'Always On']

Active: 1187.4183573971968 W

Active Solar: 2133.1198598467745 W

Active Devices: ['Solar', 'Other', 'Always On']

Active: 1208.3620372621808 W

Active Solar: 2126.692590965191 W

Active Devices: ['Solar', 'Other', 'Always On']

Active: 1298.7568159848452 W

Active Solar: 2129.407009060029 W

Active Devices: ['Solar', 'Other', 'Always On']

Active: 1193.4933937221067 W

Active Solar: 2139.2909138354007 W

Active Devices: ['Solar', 'Other', 'Always On']

Active: 1251.24178925436 W

Active Solar: 2122.113190201577 W

Active Devices: ['Solar', 'Other', 'Always On']

Active: 1168.586562764831 W

Active Solar: 2113.934448392596 W

Active Devices: ['Solar', 'Other', 'Always On']

Active: 1311.3641994995996 W

Active Solar: 2118.4330584090203 W

Active Devices: ['Solar', 'Other', 'Always On']

Active: 1248.712611003546 W

Active Solar: 2123.236458440544 W

Active Devices: ['Solar', 'Other', 'Always On']

Active: 1162.4684883783339 W

Active Solar: 2125.0347446980886 W

Active Devices: ['Solar', 'Other', 'Always On']

Active: 1129.5608566035517 W

Active Solar: 2129.1210953877307 W

Active Devices: ['Solar', 'Other', 'Always On']

Active: 1149.2199384197593 W

Active Solar: 2132.9313481033314 W

Active Devices: ['Solar', 'Other', 'Always On']

Active: 1239.5117781530134 W

Active Solar: 2137.4060480855405 W

Active Devices: [‘Solar’, ‘Other’, ‘Always On’]

Active: 1291.369999677525 W

Active Solar: 2134.280629086774 W

Active Devices: [‘Solar’, ‘Other’, ‘Always On’]

Active: 1322.1911663613282 W

Active Solar: 2122.98150197044 W

Active Devices: [‘Solar’, ‘Other’, ‘Always On’]

Active: 1262.313267676509 W

Active Solar: 2115.347908941563 W

Active Devices: [‘Solar’, ‘Other’, ‘Always On’]

Active: 1204.4166299321223 W

Active Solar: 2121.0520880515687 W

Active Devices: [‘Solar’, ‘Other’, ‘Always On’]

Active: 1349.1270783274667 W

Active Solar: 2126.473625388695 W

Active Devices: [‘Solar’, ‘Other’, ‘Always On’]

Active: 1267.6356412927853 W

Active Solar: 2137.6411214745604 W

Active Devices: [‘Solar’, ‘Other’, ‘Always On’]

2 Likes

Yeah, ideally, like others I want to integrate this into PVOutput.

We’re not opposed at all to an open API. We really want to provide that, but it’s actually a significant amount of development work to continually support one and we just don’t have those resources at this time. We feel those resources are better dedicated to improving the device detection experience (while primarily the realm of the data science team, detection still requires a lot of development work) and the Sense app itself. This includes data export, which should be coming down the pipe in the near future. I’m sorry that your contractor passed Sense off as having that functionality. We’ve never advertised it as such. Hopefully between @kevin1’s help and the upcoming data export functionality, that will be enough to do what you need. If it still won’t and you’d like to return Sense, just reach out directly to me.

There’s also some other API-specific threads in the Product Wishlist subforum that you can add your voice to.

2 Likes

Looks like @danderson will soon be pushing a version of code/API that works with PVOutput directly.

Will the data export be able to get retrospective?

So, if a capability for downloading data is coming, that’s fine. I would like it to be able to do retrospective, but if it can’t, it can’t.

Having a transparent mechanism for simply allowing PVOutput to poll and obtain consumption data like it does for inverters would also be great, but not sufficient: Want the download.

As far as a couple of the other comments go:

First, I don’t expect my solar installer to know the ins-and-outs of the energy monitor they offer. I had to nudge them, originally, to get API keys for the first SolarEdge inverter we had. They do electrical installations. They don’t do networking. It’s not their fault that the specs don’t state the limitations. They are great, but this part of the business isn’t their main thing.

Second, regarding detection and data science, I imagine it does. It’s hardly an easy thing to do, but, then, that’s the product you are offering. I’m not just being some kind of wise-ass. Indeed, I am a data scientist myself (Bayesian statistician, actually, specializing these days in series, topic modeling, and Bayesian additive regression and classification trees). I don’t do energy, though, and I have no interest at all in competing with your products or your team. I do Internet data for my main gig and work on environmental and biological series on the side (pro bono). I work principally with R, and occasionally with Python 3.

I am going to look at the consumption and generation series myself for these reasons.

Finally, I’m not versed in IFTTT but can’t someone just write one of those for Sense that dumps consumption into a Google sheet?

I don’t think that IFTTT would add any value here. If you want to sample your data and every 5 seconds and write it to a Google sheet, all you should need is the code that @kevin1 posted above and the Google Sheets API.

I’m not an expert on Python myself, but definitely post on here if you run into any trouble that you can’t Google your way out of.

2 Likes