[RELEASE] Emporia Vue V2 driver for Hubitat

I bought one of these months ago to help with detective work but haven't used it yet.

I have something similar - works great! I would highly recommend it if you still have unmarked circuits.

I now have a house sketch with all plugs and their associated breakers, and also a spreadsheet that lists all plugs connected to each breaker. Extremely useful!

1 Like

I am able to connect and generate the token ID, but when I try to get the device IDs, there is an error and the process fails. I saw some other posts about two Vues, but I have two of them. Could that be the issue? See below. I did not paste all of what was returned when getting the device IDs, just the last part.

dev:4312025-01-13 01:38:13.546 PMerrorError fetching device GID: Cannot get property 'channels' on null object

dev:4312025-01-13 01:38:13.545 PMdebug82195

dev:4312025-01-13 01:38:13.544 PMdebug19000

dev:4312025-01-13 01:38:12.758 PMdebug[{"battery":null,"channels":[{"channelMultiplier":1.0,"channelNum":"1,2,3","channelTypeGid":null,"deviceGid":19000,"name":null,"parentChannelNum":null,"type":"Main"}],"deviceConnected":{"connected":true,"deviceGid":19000,"offlineSince":null},"deviceGid":19000,"devices":[{"channels":[{"channelMultiplier":1.0,"channelNum":"1","channelTypeGid":20,"deviceGid":19000,"name":"Bonus Room","parentChannelNum":null,"type":"FiftyAmp"},{"channelMultiplier":1.0,"channelNum":"2","channelTypeGid":10,"deviceGid":19000,"name":"All Fridges","parentChannelNum":null,"type":"FiftyAmp"},{"channelMultiplier":2.0,"channelNum":"3","channelTypeGid":1,"deviceGid":19000,"name":"Attic AC Unit","parentChannelNum":"97","type":"FiftyAmp"},{"channelMultiplier":2.0,"channelNum":"4","channelTypeGid":4,"deviceGid":19000,"name":"Dryer","parentChannelNum":null,"type":"FiftyAmp"},{"channelMultiplier":2.0,"channelNum":"5","channelTypeGid":1,"deviceGid":19000,"name":"2nd Floor Outside AC","parentChannelNum":null,"type":"FiftyAmp"},{"channelMultiplier":1.0,"channelNum":"6","channelTypeGid":20,"deviceGid":19000,"name":"Coffee Nook","parentChannelNum":null,"type":"FiftyAmp"},{"channelMultiplier":1.0,"channelNum":"7","channelTypeGid":17,"deviceGid":19000,"name":"Kitchen Island & Micro","parentChannelNum":null,"type":"FiftyAmp"},{"channelMultiplier":2.0,"channelNum":"8","channelTypeGid":1,"deviceGid":19000,"name":"1st Floor Outide AC","parentChannelNum":"97","type":"FiftyAmp"},{"channelMultiplier":1.0,"channelNum":"9","channelTypeGid":16,"deviceGid":19000,"name":"Kitchen Counter Outlets","parentChannelNum":null,"type":"FiftyAmp"},{"channelMultiplier":1.0,"channelNum":"10","channelTypeGid":20,"deviceGid":19000,"name":"Master Bath Heater","parentChannelNum":null,"type":"FiftyAmp"},{"channelMultiplier":1.0,"channelNum":"11","channelTypeGid":20,"deviceGid":19000,"name":"Rear Bed, Bath 2","parentChannelNum":null,"type":"FiftyAmp"},

Hi all, In the linked post you will find my version for the EmporiaVue integration which is app-driver.
Release - EmporiaVue cloud integration - :bellhop_bell: Get Help / Integrations - Hubitat

2 Likes

I'm not sure if you having two vue devices is causing your NULL error or not. However, I frequently experienced a similar "NULL" value error with an Emporia Vue Utility Connect device using this driver. Hitting the "Refresh" command multiple times eventually returns the values for the device than it appears to run fine for a period of time. I don't know what causes the API to return an NULL value but rather than try and figure it out I created the specific driver for the [RELEASE] Emporia Vue Utility Connect Driver I added code that checks for NULL and auto-attempts a refresh up to 5 times that so far has always avoided the "Error" from occurring.

Mine either doesn't work or I have a f'd up electrical system. It triggers on the same breaker no matter where I plug the transmitter in. As a matter of fact, it triggers on same breaker even when transmitter isn't plugged in to anything.

Could be either of them! Or a defective unit… Hard to say!

I have 2 computers, 3 raspberry Pis, 3 UPS, a modem, router, & 2 switches plugged in across the plugs of that circuit. I wonder if any or all of that is causing interference. Some of them are plugged into first plugs of circuit. ChatGPT seems to think that is a viable cause.

1 Like

Any chance you can unplug them to test out that theory?

Finally looking into this integration and I'm running into an issue where I've used Sign In With Apple to create my Emporia account. Nowhere does it show any password, so I'm not sure how to auth via this integration. Is there a known method to getting this working in this scenario?

I am having the same problem getting the device GID. I was able to use the Emporia Utility driver and that was able to fetch the GID and seems to work.

Error fetching device GID: Cannot get property 'channels' on null object

Hard to tell without seeing the logs. But if you want to try my integration that support multiple Emporia devices you can find it here:

Hey @ke7lvb,

I've been working with Claude on an updated version of the driver (v2.4.4) to add some features that I needed to help me track some of my consumption items. I wanted to share it back with the community in case there’s some interest. (I can create a pull request if you’d like to incorporate some of the changes in your original version.)

Here's what changed:

Bug Fixes

  • Fixed a crash in getDeviceGid() caused by smart outlet devices (SSO001 model) that have an empty devices[] array — the driver would throw a null pointer exception and fail to save any GIDs
  • Updated to use the Emporia Vue Child Device by default since I needed to be able to receive and use cumulative energy events — as mentioned in the first post, the original fetchChild() was using the built-in Generic Component Power Meter driver which doesn't support the EnergyMeter capability, silently dropping energy events.

New Features

  • Cumulative Energy tracking — instead of reporting the instantaneous kWh snapshot from the API (which isn't very useful on its own), the driver now accumulates energy over time on both the parent and all child devices, stored persistently via state and dataValue

  • Optional daily reset — a new preference lets you choose to reset all cumulative energy totals at midnight, or let them run indefinitely

  • Manual reset command — a resetEnergy command with a confirmation dropdown to prevent accidental resets

  • MainsFromGrid and MainsToGrid child devices — for those with solar, the driver now automatically calculates and sends power/energy to MainsFromGrid and MainsToGrid child devices based on TotalUsage minus solar production. A new preference lets you specify your solar channel name (defaults to Rooftop Solar Panels)

  • New stable network ID scheme
    Child devices are now identified by _ (e.g. 183930_1) instead of the channel name. This never changes even if you rename a circuit in the Emporia app.

    Label updates instead of new devices
    fetchChild() now takes both a networkId and a label separately. If the channel name changes in Emporia, it simply calls setLabel() on the existing device — no duplication, no lost history.

  • New migrateChildDevices command (backup before doing this, just in case…)
    Run this once after installing v2.4.5. It:

    • Looks up the current channel map from the Emporia API
    • Matches each existing child device by its old name-based ID
    • Creates a new device with the stable ID, preserving cumulative energy
    • Deletes the old device
    • Skips MainsFromGrid, MainsToGrid, and any already-migrated devices
  • To deploy:

    1.	Paste the new driver into Hubitat and save
    2.	Run Migrate Child Devices once
    3.	Check the logs to confirm all devices migrated successfully
    4.	Then run a normal Refresh to confirm everything is working
    

I also updated the version number in the name as well as the ImportURL to allow me to test and update without impacting the original version.

Happy to share the full driver code if anyone wants it here:

https://raw.githubusercontent.com/SebastienViel/Emporia-Vue-Hubitat/refs/heads/main/emporia.groovy

2 Likes