Leviton Smart Panel / breakers integration?

Hi everyone,

What’s about a Leviton smart panel integration ?

https://www.leviton.com/en/products/residential/load-centers/the-leviton-smart-load-center

This Leviton Load center is definitely one of the most used in North America and with their smart breakers it
makes our homes even more operable.

I will be happy to exchange regarding this project.

Thank you all.

I second wanting this.

1 Like

Please someone help get this working.

Yeah even a read-only API would be nice for energy monitoring.

I asked their support about this a while back, and mentioned my two use cases:

  • Real-time energy use (for correlating with time-of-use power pricing, outdoor temperature, and HVAC runtimes)
  • Ability to create an automation that turned off specific circuits after my whole-house generator starts, and some time has passed and/or based on occupancy

The response I got was just:

Leviton smart load center does not have an open API. Currently our load center can only be used with our My Leviton app or our web interface.

The support contact is [email protected].

Anyone looked into using InfluxDb with telegraph to “grab” the data from the ldata hub? Leviton has stated they do not have an open API. I saw this post that has gone dead but if anyone can give some first step guidance I’m willing to invest some time. I’m not well verse in how to use Telegraph or InfluxDb, but willing to invest time.

I’m also willing to assist / help anybody who would have interest in getting this Feature Integration come to life!

Someone will have to tell leviton to get off their a$$ and create and API. So far not good feedback from them. Very sad.

2 Likes

Several years ago, I considered buying a Leviton smart load center, and decided against it largely due to the company’s history of hostility to open APIs. While I obviously want them to offer a proper API, I’m not holding my breath.

There’s one glimmer of hope, which is that it does look like Leviton is a member of the CSA. So perhaps at some point in the future, once Matter matures and supports energy monitoring, they might offer Matter support? That’s a lot of caveats, though, and still pretty far in the future.

It seems just as likely that they’ll only offer Matter support for their more “commodity” devices like wifi light switches, and keep the load center proprietary.

I created a custom integration that pulls data from the cloud. It is not a perfect solution, it would be better if we could pull the local controller, then it could be pulled more often, but it works. GitHub - rwoldberg/ldata-ha: Home Assistant Integration for Levition LDATA

7 Likes

Cool! It’s neat to be able to see what sort of api they use.

One comment from reading your code: it looks like Leviton only exposes power readings, and not energy. That’s a bummer. It also looks like you’ve created your own means of integrating power into energy. I think you’d probably have an easier time using one of the built-in home assistant functions for that, like Integration - Riemann sum integral - Home Assistant

They do expose energy usage but it does not look accurate, that is why I created my own. I know the Riemann sum integral can be used as a helper, but I was not sure how to do that from code and add it as a sensor. My method seems to work, but if someone wanted to update the code and create a PR, I am ok with that.

First, thank you for putting this together. I had considered multiple options when we put a new panel in last year, and even with Leviton’s unfriendly approach, they still won from a cost and flexibility standpoint. I’ve gone back and forth with their support lines a few times about issues with refresh rates on the breakers to LDATA where I’ve seen breakers reporting data that I knew was a couple of hours old. Ultimately they said it was a known issue they were working on; when I loaded up your integration immediately after adding the breakers, they were reported as turned off. Any thoughts on what might be causing this?

Thats very odd, I wonder if API is reporting the data differently for you for some reason. Open an issue on git hub, I think it will be easier to work out the issue there as I will probably have more questions. GitHub - rwoldberg/ldata-ha: Home Assistant Integration for Levition LDATA

This is awesome, thanks for putting this together!

Works great, thanks for taking the time to work on this!

Sniffing the the protocol between breaker and the LDATA is next so we can remove the extra steps / hardware.

1 Like

This is long awaited and hopefully the community can benefit. I was able to decrypt and analyze the traffic and get the local API information.

First you want to get the IP address of the LDATA module and the serial number of the module. You can find the serial number in app and the DHCP lease in your router.

After you have this, you can access the API using the following structure

Base
http://IPADDRESS:13107/api/residentialBreakerPanels/LDATA-XXXXX-XXXXX-XXXXX

List breakers
http://IPADDRESS:13107/api/residentialBreakerPanels/LDATA-XXXXX-XXXXX-XXXXX/residentialBreakers

Trip a specific breaker - You can find the ID in the previous URL
http://IPADDRESS:13107/api/residentialBreakers/XXXXXXXXXX/trip

Certificate? Self test maybe?
http://IPADDRESS:13107/api/residentialBreakerPanels/LDATA-XXXXX-XXXXX-XXXXX/certificate

SSIDs in the area with RSSI
http://IPADDRESS:13107/api/residentialBreakerPanels/LDATA-XXXXX-XXXXX-XXXXX/wifiSSIDsWithRSSI

SSID without RSSI
http://IPADDRESS:13107/api/residentialBreakerPanels/LDATA-XXXXX-XXXXX-XXXXX/wifiSSIDs

You can setup telegraf and influxDB to record the information using the following code

[[inputs.http]]
  ## One or more URLs from which to read formatted metrics
  urls = [
    "http://IPADDRESS:13107/api/residentialBreakerPanels/LDATA-XXXXX-XXXXX-XXXXX/residentialBreakers"
  ]
  data_format = "json_v2"
         [[inputs.http.json_v2]]
              [[inputs.http.json_v2.object]]
              disable_prepend_keys = true
              path = "@this"
              included_keys = [
                  "energyConsumption",
                  "energyConsumption2",
                  "lineFrequency",
                  "power",
                  "rmsCurrent",
                  "rmsVoltage",
                  "currentRating",
              ]
              tags = ["name","id","serialNumber"]

Any questions or if you need information on the API, please let me know.

4 Likes

A caveat to this that will affect most setups, the API endpoint is shutdown when wifi is connected. Mine was wired in with ethernet so I could capture the traffic. You’ll need to connect ethernet cable to yours in order to use the local API.

When you do, you’ll get data like the following.

@pwsh Whoa… Are you serious? Stupid question, I know, but…that’s very much what I’ve been looking for ever since my electricians installed a Leviton power center.

Is that based on the original (now apparently obsoleted) Leviton Smart Data Hub? I’m more than happy to run it in Ethernet mode if I can get local access to the data!

How did you dig up that information, and are there any other endpoints?

What I’m getting from this is that we have to use ethernet, set up the app, and get the LDATA identifier from the app, and then plug that into a script, right? I don’t actually want to throw breakers remotely, but being able to regularly read their usage would be… :exploding_head: !

It’s been working great for me. I have 10 second updates into an influxDB instance. There is only the API endpoint, which normally gets shut down after the device gets out of the access point mode for setup. Leviton deliberately shuts this off to force all end user communications to go through their cloud service even though they could have kept it open.

This is for the original LDATA module, not the new one, though it may work with the new one as the original was an off the shelf Variscite module that they customize the BLE code on.

The device needs to trigger its access point mode, then you connect the ethernet cable. After that it seems to hold the configuration of the API being open after power cycles as long as it is unable to connect to your wifi network.

I believe these steps will recreate the API access being open

  1. Turn off power to LDATA

  2. Block the wireless MAC address of the LDATA module from connecting to the wireless network

  3. Unplug the ethernet cable from the network port

  4. Turn power back on to LDATA

  5. Wait a few minutes and confirm it is broadcasting the LDATA-XXXXX SSID to show its in AccessPoint mode

  6. Plug ethernet back in and get the ethernet DHCP address given to the LDATA from your router

  7. Test going to any of the API endpoints like http://10.x.x.x:13107/api/residentialBreakerPanels/LDATA-XXXXX-XXXXX-XXXXX/wifiSSIDs

I don’t know if navigating to http://10.x.x.x:13107/api/residentialBreakerPanels/LDATA-XXXXX-XXXXX-XXXXX/wifiSSIDs is required to trigger the wlan to turn on via the script, so its on in an unconnected state outside of the scripting, but I don’t think it is required as it was broadcasting the SSID LDATA-XXXXX - however since we are testing the API anyway, I think its good practice to ensure the WLAN is turned on in an unconnected state within the 10 minutes the AP mode would normally shut down after.

What is happening is that while the LDATA module is in the AccessPoint mode it opens the API in this mode, we are restoring network access without the script needing to do anything else. This effectively interrupts the order of operations and keeps the API endpoint alive.

If someone has wireless access setup, it automatically connects with the configured credentials, but we block this at the access point or router so it can keep the configured wifi credentials, but can’t connect.

If you have wired access, it should be connected at startup when power is restored, but we’ve left the cable unplugged during startup to trick it into failing back to the access point mode.

Now with no wired or wireless access, it defaults back to access point mode so normally the user can setup the credentials in the app to connect to a different wireless network

2 Likes