I have a Sense Energy Monitor. It runs through my wifi and share the same network as my Hubitat. I added it to my home assistant when I was playing around with HA. Any way to add my Sense to my Hubitat?
Thank you for replying
I had seen that and I tried it out. The driver works fine but the smart app throws the errors. I don't know how to fix those errors.
Lastly this isn't a deal breaker but I'd like to not have to run a node server.
Would trying to look at Home Assistant did easier or?
Looking at the underlying 'Unofficial Sense API' which is used by the NodeJS server, I am somewhat optimistic that Sense could be directly integrated with Hubitat. It appears that the Sense API uses a webSocket for communications. If so, Hubitat now has native webSocket support.
I used the Hubitat webSocket API to directly integrate the Logitech Harmony Hub recently. So, this Sense device is interesting. However, since I don't have a Sense device/account, it would be extremely difficult to attempt this.
I am using an IoTaWatt Engery Monitoring device to achieve similar goals. I wrote a custom integration for it not too long ago.
You probably could do what your driver is doing an create new devices. Word of caution: I would use the Virtual Containers as others have done. I have 24 monitored devices and to have those all in HE unless in a container would be obnoxious.
1: SmartApp - which you can have query the websocket and provide a list of devices to the end-user to choose to create virtual switches for
2: SmartDevice (like @ogiewon) - which you have query the websocket on Sense and create all of the devices
Either way you should use a container to keep the virtual devices together for ease of administration.
I didn't need all 24 devices in my HE. I just needed it for (2) washers and dryers so I can do Push Notifications to our devices when the laundry cycles are done depending on which washer/dryer or both completed (I have my mother-in-law living with us and I installed another set of laundry in basement). For me Sense was cheaper than buying other solutions and also then gave me information on how we were doing for power consumption. (2) Aeotechs are the same price as (1) sense. So it didn't make financial sense to not do Sense.
So I'm playing with this, the SmartApp won't install in HE (trying to save the code doesn't work, there must be something that works with ST but not Hubitat).
This saves, but only if I remove some lines and one of them is include 'asynchttp_v1' and I know that's not right. If I don't remove it, you get
No signature of method: Script1.include() is applicable for argument types: (java.lang.String) values: [asynchttp_v1] Possible solutions: installed(), evaluate(java.lang.String) on line 21
You could contact @tonesto7. He's one of the authors of this code.
@aaron can I ask how you got this going? The smartapp doesn't seem to work, and I'm unclear how you get the device driver working (I don't see anywhere to feet it account info, etc).
Yes very quickly. I noticed that sense can be overly sensitive to the power inflections in your home. An example is my washing machine. When the WM pauses to let the clothes soak sense no longer can pickup the unique electric draw and in-turn says that the WM has shut off. But then 2-16 minutes (depending on load settings) the WM will continue and then sense will state it is on. So you have to use rules with pending cancellation in order to achieve what you want overall. Here are two examples I use for my washer/dryer notifications.
I wish I had the skill for this too..but that node server is just for websockets which I believe HE can do and a few other custom apps exist using them. That might be good news for us someday....