[NO LONGER WORKING] Curb Energy Monitor Integration

same here… thanks …

@Dianoga @BatraD I’m missing it too! We had a good call with @jh0 last week to walk him through our new API. Sounds like he has made some good progress, but still doing a bit of fine tuning…
Expect an update soon!
-Erik

1 Like

Many thanks to the Curb guys (@Erik, @Neil_Z and crew) for being super supportive of this project! I’ve made good progress getting CurbBridge back up and running and have high hopes that it will be ready for primetime soon. Just a couple more quirks with the new authentication system to iron out. I’ll definitely report here as soon as its ready for beta test round two.

2 Likes

Justin,

Any updates ? Would love to have my Curb system up and reporting again into ST

thanks

Very close! I’ve been going back and forth with @Neil_Z getting the kinks worked out. I’m planning to push something tonight which will be ready for you to try. It will come with the caveat that stability may not be 100% since it won’t have many hours on it, but I figure the sooner I can get other folks testing, the faster the issues will be found.

I just pushed an update to CurbBridge which works well for me and is ready for some other folks to try. From the perspective of the user, the installation and authentication process haven’t changed, but the guts have been significantly reworked.

If you’re trying to update from the old version of CurbBridge, you’ll have to do the following to clear out the old before starting fresh:

  • Uninstall the CurbBridge SmartApp from ST. This should automatically remove all of your power sensors. Unfortunately this is required since the internal IDs of all the sensors have changed, and there isn’t an easy way to migrate. If anything is left behind after uninstall (or uninstallation fails) you will need to use the API to go to your location page (https://graph.api.smartthings.com/location) and manually delete all of the CurbBridge devices and smartapp.
  • Delete the CurbBridgeData.json file from your git checkout
  • Update the git repo
  • Update the node dependencies by running
    npm install .
    in the directory with the package.json file
  • Run the authentication process as before

A couple of caveats to this release:

  • I haven’t had this running long enough to really test its endurance. If you stop getting data, check the console and see if it is reporting any problems. Take note of how long the app was running for and post here with details.
  • I added a cool feature which shows usage graphs in the ST app. This is based on an undocumented feature of the ST system (htmlTile) and doesn’t always work. Your mileage may vary. Hopefully in the future ST supports this feature officially.

Justin,

installed the new code on my Ubuntu PC

I now see ~31 devices (mostly duplicates)… Should be 18 probes for the Curb unit

Edi: deleted the devices manually from GIT, deleted the CurbBridge folder from my Ubuntu PC, reinstalled, still the same issue…

thanks

Did you clean out all of the old ones from the previous version of Curb Bridge? Check out your device list and sort by type. Everything listed under “Curb Power Meter” should have a Device Network ID of the form 12345678-90ab-cdef-1234-567890abcdef except for one with __ OTHER __ and one with __ MAIN __. If you have anything else, you will need to manually delete it.

Also, are you down to only one unit? IIRC, you had two units in the past. If you’re working with two still, you’d be the first to do so with the new CurbBridge, so there may be bugs still.

Justin,

down to one, gave the second off to a friend… Did not see too much value in keeping both …

Justin,

i have 3 main and 3 other along with a lot of duplicates…
Display Name Type Location Hub Zigbee Id Device Network Id Status Last Activity
Basement - Smoke Curb Power Meter Home b6b08585-555b-4a6a-b774-2f80829795e3 ACTIVE a few seconds ago
Basement Fridge Curb Power Meter Home ca57da1c-ffcf-4812-867b-e00b355b0806 ACTIVE a few seconds ago
Basement Fridge B Curb Power Meter Home 6daa78e1-f628-432d-b3c0-0980890afd1c ACTIVE a few seconds ago
Basement Fridge B Curb Power Meter Home 6daa78e1-f628-432d-b3c0-0980890afd1c ACTIVE a few seconds ago
Basement Fridge B Curb Power Meter Home 6daa78e1-f628-432d-b3c0-0980890afd1c ACTIVE a few seconds ago
Basement Furnace Curb Power Meter Home 69ac1471-5eb3-4a98-9c96-b4cd3a9fa39d ACTIVE a few seconds ago
Basement Furnace Curb Power Meter Home 69ac1471-5eb3-4a98-9c96-b4cd3a9fa39d ACTIVE a few seconds ago
Basement Panel Outlet Curb Power Meter Home 6331c103-4dd1-4b1f-906c-e0b5186aaba7 ACTIVE a few seconds ago
Basement Panel Outlet Curb Power Meter Home 6331c103-4dd1-4b1f-906c-e0b5186aaba7 ACTIVE a few seconds ago
Basement Panel Outlet Curb Power Meter Home 6331c103-4dd1-4b1f-906c-e0b5186aaba7 ACTIVE a few seconds ago
Basement Storage Curb Power Meter Home a87caa7b-b552-41c0-b479-7f735d4d8ddb ACTIVE a few seconds ago
Basement Storage Curb Power Meter Home a87caa7b-b552-41c0-b479-7f735d4d8ddb ACTIVE a few seconds ago
Basement Storage Curb Power Meter Home a87caa7b-b552-41c0-b479-7f735d4d8ddb ACTIVE a few seconds ago
Cooktop - Hood Curb Power Meter Home 69956c16-5d55-4406-884d-955867cfa291 ACTIVE a few seconds ago
Dishwasher Curb Power Meter Home eae65917-b67a-442a-9386-9b2f70d779d7 ACTIVE a few seconds ago
Family Room - Hall Outlets Curb Power Meter Home f5113c97-9f2c-4d1a-ae3f-eeabeb69e3cb ACTIVE a few seconds ago
Family Room - Hall Outlets Curb Power Meter Home f5113c97-9f2c-4d1a-ae3f-eeabeb69e3cb ACTIVE a few seconds ago
Garage - Outside Outlets Curb Power Meter Home 5f5c76b5-1a2c-4ded-905f-35357006ef1d ACTIVE a few seconds ago
Garage - Outside Outlets Curb Power Meter Home 5f5c76b5-1a2c-4ded-905f-35357006ef1d ACTIVE a few seconds ago
Kitchen Outlets Curb Power Meter Home 0dae32c2-0dd8-4879-9ad7-417374f62b21 ACTIVE a few seconds ago
Kitchen Outlets Curb Power Meter Home 0dae32c2-0dd8-4879-9ad7-417374f62b21 ACTIVE a few seconds ago
Main Curb Power Meter Home MAIN ACTIVE a few seconds ago
Main Curb Power Meter Home MAIN ACTIVE a few seconds ago
Main Curb Power Meter Home MAIN ACTIVE a few seconds ago
Main I Curb Power Meter Home a447fd72-b00c-487e-a4be-bc74fc57038b ACTIVE a few seconds ago
Main II Curb Power Meter Home 2b017133-8592-4369-adaa-b0b8c28723e1 ACTIVE a few seconds ago
Other Curb Power Meter Home OTHER ACTIVE a few seconds ago
Other Curb Power Meter Home OTHER ACTIVE a few seconds ago
Other Curb Power Meter Home OTHER ACTIVE a few seconds ago
Sunroom - FamRm Outlets Curb Power Meter Home 0195b860-315c-4883-a25f-ee8bb24678f8 ACTIVE a few seconds ago
Wall Oven Curb Power Meter Home 8521aae2-70b9-4683-86d6-c12198ece2eb ACTIVE a few seconds ago
Wall Oven Curb Power Meter Home 8521aae2-70b9-4683-86d6-c12198ece2eb ACTIVE a few seconds ago
Washer Curb Power Meter Home 2478401f-cea9-43b1-9bfc-000a0a9d62c8 ACTIVE a few seconds ago

This is very interesting… and almost definitely a bug on my side. Please stand by and I’ll let you know when I have a fix. In the mean time you should be able to safely delete the duplicates. If they get re-added automatically let me know.

Using the work that @jh0 has done, my dashboard works again :slight_smile:.

On the off-chance anyone is interested, https://github.com/Dianoga/node-curb is the library I’ve put together. It’s fairly limited at this point as I only really need live circuit data.

If there is interest, I can try actually documenting some of it…

1 Like

I just pushed a fix that should correct your issue. The fix is only on the node.js server, so no need to update in the ST IDE.
Uninstall the CurbBridge app in the ST mobile app to delete all of the devices, install it again and re-run the node.js program. Let me know if you have more issues.

Hi,

Trying to test out your latest code, keep getting the following error when trying to authorize the app from the web page, any ideas?

Error
500: Internal Server Error
URI
/oauth/authorize
Reference Id
35c48496-4f62-4ca5-a69e-0eac76917cfa

Thanks

Hi @KJ61, I’ve seen this before intermittently with no clear explanation. Yesterday, SmartThings was having an outage, so you might just try again today. Also, double check that the Curb Bridge SmartApp shows up in the ST Mobile App under your installed SmartApps. If these suggestions don’t get you anywhere, try again with the live logging page up and see if any errors are reported there.

That’s awesome, ty! Would love to see it documented, as well as on npmjs if possible!

This works great! Just how I imagined it when I funded my Curb 2 years ago.

It’s using a lot less CPU on my server compared to Round 1 and the response to changes are quick, even for ST.

1 Like

Hi,

Tried yesterday and today. This time it seems to log in , it gets to the ST web page with out the error.
In the server screen I’m getting the following.
C:\curbbridge>node .
Server running at http://127.0.0.1:8000/
Get: /
Get: /stAuthorize.js
Post
Sending request to: https://graph.api.smartthings.com/oauth/token?grant_type=aut
horization_code&redirect_uri=http://localhost:8000/authSuccess.html&client_id=kr
isjordan@xxxxxxxl.com&code=undefined&client_secret=cdbdcc94-fbf8-4533-87
78-xxxxxxxxxxx
Something went wrong: 401
Response: {“error”:“unauthorized”,“error_description”:null}

Any ideas?

Thanks
Kris

Looks like you might be skipping a step during authentication. Or perhaps something is going wrong early in the process.

First, put in the ST ClientID at the top and click “Connect to SmartThings”. Then a new frame will appear which will have you log in to ST and authorize for your location. If this part is successful, you will see “Authorization Success” in the frame where you logged in to ST and the console will print “Got ST Auth Code: abc123”

Next step is to fill out the remaining fields and click “Submit”

Let me know if you still have trouble.