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 ā 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:
- Node server file
- SmartApp
- Sense Monitor device handler
- Sense Energey device handler
More details on the changes here: https://github.com/brbeaird/SmartThings_SenseMonitor/pull/8
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.