[OBSOLETE] Sense Energy Monitor

Nice! Yeah I have on my todo list to merge in his fork and just add him as a contributor to my repo.

Iā€™ve got a docker version working, completing the to doā€™s above.

I actually have a NAS server coming that will run Docker Containers, my plan is to run it as part of my NAS, freeing up the Raspberry Pi.

Iā€™ve made a few additional changes to my fork to run via docker-compose (Compose) vs docker to simplify things. Iā€™ve reverted changes I made to config.js file back to its original contents. Iā€™ve made a copy of it to config-docker.js which will get used by Compose as it starts up the container. This should allow for my changes to get merged back to tonesto7ā€™s branch and wonā€™t affect anyone not using Docker or Compose. Iā€™ve created a pull request for these changes here: https://github.com/tonesto7/SmartThings_SenseMonitor/pull/1

Edit:
Well, I got my new NAS server, a Terra-master F2-220. Was able to install docker and the image from hub.docker.com (https://cloud.docker.com/u/buzzkc/repository/docker/buzzkc/sensemonitor), and verified it works.

When running from the image on the NAS, I had to enter each of the parameters from the docker.env file in the environments tab for running the container (email, password, smartthingsHubIP, smartthingsAppId, & port)

So happy Sense is starting to integrate smart plugs. TP-Link HS110 and the TP-Link powerstrip HS300. This is making it so much better now!

I have noticed some strange behavior on this lately. When I view the real-time monitor in the Sense mobile app, the data is very sluggish, often showing big gaps. But if I kill the node API server, the real-time monitor functions as normal with instant updates. Aside from that, the node server still runs fine and my SmartThings-driven alerts all seem very timely as expected. Iā€™ll see what else I can find.

@brbeaird - First off thanks for your work on this, I have it up and running on my system.

However, Iā€™m seeing the same thing you reported a month ago - viewing the monitor on Sense mobile is practically useless, it doesnā€™t update and sometimes doesnā€™t even show the initial value, and it doesnā€™t even update reliably on home.sense.com. It seems like everything on the SmartThings side is working as expected - including the Google Sheets graphs Iā€™m creating.

Was wondering if youā€™ve had any luck identifying the cause?

Sadly, no, and this has been bumming me out for awhile. Iā€™ve tried looking deeper into it but havenā€™t been able to really figure out a way around it. We may be stuck with this limitation until Sense one day puts out a more official API. The good news is, as you say, the SmartThings integration itself is still working great - itā€™s just the real-time monitor that is affected at the moment.

If anything changes, Iā€™ll be sure to post an update here.

Any chance youā€™ve reached out to the Sense devs on their community? They have people begging for third-party integration there but I figure their team is small and canā€™t take on such a task - so Iā€™m thinking they may be willing to provide some guidance on a workaround?

Yes, I tried posting on multiple threads and there and opened a support ticket. Not much theyā€™re willing to do at this time.

Last time I did some testing, it seemed like I was able to view the real-time monitor in the mobile app while also viewing the monitor on the Sense website. If thatā€™s the case, it seems like maybe thereā€™s some way I can tweak the integration connection to mirror how the website is doing it to avoid breaking the mobile app monitor. Iā€™ll see if I can look at that sometime in the next couple weeks.

I bumped one of your posts on their community and tagged RyanAtSense - hopefully it might give the issue some exposure and they will be able to assist you :slight_smile: ā€“ thanks for your help!

Iā€™m putting some more work into this - have some more ideas on how to adjust the Sense flow so itā€™s less intense on their servers.

SmartThings also recently made a change that effectively limits data packet size when passing data around via LAN like this app does. With that in place, this integration is currently broken for me. Iā€™ve got a fix almost done for that, though - basically just going to split devices into groups and send them in separate, smaller messages to the ST hub.

Testing a new version on my machine that fixes these issues. Looking good so far! If it keeps stable over the next day or two, Iā€™ll do some code cleanup and push the update out to github.

Looking forward to your release! I tried setting up the current version last week using my Raspi, and I kept knocking my head on the wall thinking I had something incorrect with Node.

Getting very close! Found a few more things over the last couple days I had to fix. Shooting to have new code up sometime tomorrow.

At long last, it is finally done! It took quite a bit of work, but everything is humming along quite nicely for me now.

I have pushed the update to git. Make sure you update everything:

  1. Node server file
  2. SmartApp
  3. Sense Monitor device handler
  4. Sense Energey device handler

More details on the changes here: https://github.com/brbeaird/SmartThings_SenseMonitor/pull/8

1 Like

Hey guys - nice work on this, Iā€™m trying to get this running and the Node Server seems to have found my devices (running on Mac OS) yet the smart app is not finding any devicesā€¦ any pointers? Oauth is on on the app. Config file was updated.

Are you seeing any errors when the node server is trying to push the data to ST? Is there anything at all in live logging when that happens?

Log text was here

Ok interesting - so it looks like Sense is sending over a device that has no ā€œstateā€ value (usually ā€œonā€ or ā€œoffā€). I can write a quick fix to handle that. Iā€™ll let you know when I push it out.

1 Like