Integration for Home Automation


Count me in as wanting HomeKit integration.


Hey Roger. I’d love to know what you’d actually like to do with Sense in HomeKit.


I’ll give you my added answer. As discussed earlier, HomeKit could provide ground truth data to Sense (albeit a little delayed) for devices/integrations that Sense didn’t already have, but that were covered by HomeKit. Today my Ecobees, Hue, Chamberlain Garage Doors, and various remotely controlled outlets (Eve Energys) are connected to HomeKit. Not only would Sense have access to info on power switching, it would in some cases have access to schedules programmed in HomeKit, like my hot water recirc pump on controlled outlet.

But the additional win would be to actually control power usage via HomeKit logic (or Sense logic) depending on power usage in the household (i.e. forestall turning on AC if solar production is below a certain level). Of course, in that case this could be done with a direct integration with Ecobee as well, but I think past a certain number of the most popular smart devices, it’s in Sense’s interest to leverage off a few companies that have far greater resources working on integrations (HomeKit/Apple, Samsung SmartThings, WeMo)


In addition to the usage info mentioned above, I think it would be useful to make Sense’s device states and on/off events available to a platform like Home Assistant. This information could then be used to drive any kind of automation spanning the Home Assistant ecosystem (with more than 1,000 integrations), making otherwise ordinary electrical devices participants in a broader home automation system.

As a simple example, such an integration would allow me to use text-to-speech to make an announcement on my Sonos system when, say, my dryer turns off. This would take only a few lines in Home Assistant, but would be extremely useful.

The notifications within the Sense app are good, but there’s a world of possibility out there if this data could be made accessible more broadly.

Integration with Home Assistant - Custom binary sensor component

This isn’t supported by us, nor does it do (I believe…I don’t use Home Assistant so I cannot test) exactly what you want, but have you seen this, posted above?


Yup, I’ve tried it out. You’re right, the current Home Assistant plugin doesn’t support the kind of trigger events that I’ve mentioned, but there’s no reason why it couldn’t. The functionality required is there in the underlying Python client (, but doesn’t seem to be working at the moment.

Anyway, I was just hoping to illustrate what could be possible if this data was made more accessible.


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.


Love to see integration with Vera Home Controller.


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:


The key to managing a home efficiently is knowing about it. This demands observation and data. I can do very little with the 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


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:

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.


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.


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


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


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.


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)

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’]