WattBox Integration

Oops, looks like I didn’t add ssh2 to the requirements, so it doesn’t get installed.

Timeout is strange. Not sure why it would work initially and then timeout later. It’s possible connections are staying open somewhere and messing things up, but I thought everything was inside a context manager.

If you turn on and off plugs outside of HA does it stay in sync? Or does it just get the info one time and fail after that?

I would definitely be interested in adding it, but I don’t know much about the energy dashboard. I haven’t gotten it working successfully for anything yet. I’ll look at the long term stats, that part doesn’t seem bad. I think it might still require Integration - Riemann sum integral - Home Assistant to be use in the energy dashboard though, since its in watts. Do you know if that is the case?

A few updates:

  • I should have an 800 soon and be able to address any remaining issues in once it arrives.
  • I pushed an update to develop. It mostly is an update to the latest blueprint template, but a few minor tweaks are in there. It will hopefully pull the latest dependencies which does include ssh2 now. Probably doesn’t do much to improve the 800 though.
  • I was able to use the Reimann sum integration to get power to show up from my 700. See: This Config for an example. It works on the released version as well as develop. I am not sure if there is a way for me to automatically include it with the integration, but I’ll look around to see. @kylerw does that do what you are looking for?
2 Likes

The beta release of HA is throwing an error,

This error originated from a custom integration.

Logger: homeassistant.setup
Source: custom_components/wattbox/__init__.py:76
Integration: wattbox (documentation, issues)
First occurred: 8:23:05 AM (1 occurrences)
Last logged: 8:23:05 AM

Error during setup of component wattbox
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 283, in _async_setup_component
    result = await task
             ^^^^^^^^^^
  File "/config/custom_components/wattbox/__init__.py", line 76, in async_setup
    from pywattbox import (
  File "/usr/local/lib/python3.11/site-packages/pywattbox/__init__.py", line 3, in <module>
    from .ip_wattbox import IpWattBox, async_create_ip_wattbox, create_ip_wattbox
  File "/usr/local/lib/python3.11/site-packages/pywattbox/ip_wattbox.py", line 17, in <module>
    from scrapli.response import Response
ModuleNotFoundError: No module named 'scrapli'

Looking forward to testing this.

I’ve loaded this through HACS and am getting all sensors and the Master Switch but no switch for each outlet. Any Ideas?
WB-250I-IPW-2

This error originated from a custom integration.

Logger: homeassistant.setup
Source: custom_components/wattbox/__init__.py:89
Integration: WattBox (documentation, issues)
First occurred: 5:19:19 PM (1 occurrences)
Last logged: 5:19:19 PM

Error during setup of component wattbox
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 288, in _async_setup_component
    result = await task
             ^^^^^^^^^^
  File "/config/custom_components/wattbox/__init__.py", line 89, in async_setup
    from pywattbox.ip_wattbox import async_create_ip_wattbox
ModuleNotFoundError: No module named 'pywattbox.ip_wattbox'

I have a WB800-IPVM-6 and I am getting this error. I was not able to get it to show any of the sensors or the switch. Any suggestions? Also, any update on when we might see 800 support in a release?
Thanks!

Sorry, I have been very busy lately and didn’t get any time to work on this.

I have pushed some fixes and improvements to the develop branch. Its a major overhaul from where things were, so I am a bit hesitant to push as a full release without some additional feedback. It should be in decent working order if anyone wants to test it out, but I do have a few more enhancements I want to make as well.

Important Note: This update will give all the entities unique IDs, which means their IDs will change and you will need to update anything (automations, dashboard, etc.) that references them. Its a necessary change which will allow you to do more with the Entities in the UI and you shouldn’t see this anymore: “This entity (‘switch.wattbox_outlet_1’) does not have a unique ID, therefore its settings cannot be managed from the UI.”

There are a few updates to config options. The important one is port: (80|443|22|23). Default is 80, so anything that already worked should still work without it. But newer hardware is probably 22. For more details see: develop/README I’ll try to add a table of hardware for http vs. ssh access to the docs at some point.

Options to test it:

  • Use VSCode and the devcontainer in the repo to test it in an isolated HA container. Just need to update the config/configuration.yaml and / or add config/secrets.yaml.
  • In HACS go to the Wattbox integration > Redownload > Show beta versions > Select the most recent v0.9.0b release (b1 at the time of posting).
  • Manually install the develop branch in a HA instance

I recommend the devcontainer, as it won’t affect your main HA if anything messes up. I have not switched my main HA over to the new one yet, and I am not encouraging you to either. Just do what you are comfortable with.

If the feedback is positive, I will push out v0.9.0 as a full release. And once the other enhancements are done, I think it might be time for a v1.0.0 release. If anyone has ideas for other improvements / fixes feel free to open issues/discussions on GitHub, or just post something in this thread.

2 Likes

Am looking to buy a Wattbox 800 series but wanted to see if HA support was there before pulling the trigger. I’ve read through the thread and know that this has been quite the undertaking to make it work for the 800 series.

Curious if there have been any updates since then

I have a couple of the 800 series. They don’t appear to support the HTTP API, but the SSH/telnet connection works fine. I am using the develop branch of the component and including some of the PRs made there to account for recent HA changes. As long as I specify the port (22) of the 800 series device, it works fine. If I don’t, it tries the HTTP API and 400s and the component won’t load.

One note is that the component does not report energy usage per-outlet, at least on the 800 series. I’m looking into how to add that.

1 Like

@eseglem not sure if you’re active on here any more, but there is a PR waiting for you on this repo to fix an error that has cropped up with HA 2025.1

I was able to poke around a bit in the dev branches and some of the forks, but wasn’t able to get them working with my 800 series wattbox power strip. On top of that I wanted to be able to monitor each outlet’s power usage, and then ideally have it setup automatically versus the hard code config changes.

I’m open to a PR since I forked from eseglem’s, but I also don’t know if that’s what most would want. I rebuilt the API piece to use the v2.4 over telnet, and i’m not sure how backwards compatible that is with the other equipment (i only have this 800 series to test it with).

That said, if anyone with this version wants to give it a shot (or if you have an older version and its sort-of working and would like me to try and add in some backwards compatibility) i’m down to try), I pushed my seemingly working version to my forked repo.

HASS-Wattbox for 800 Series.

This works perfectly with my 800 series, unfortunately it fails to connect to my 700 series as it only has http for control from what I can tell.

Thats great for the 800, let me take a look to see if I can bring in some more of eseglem work into mine for the HTTP API. The hardest part for this, for me, is that I’m not going to have any way to test it. I’ll build out a dev branch and we can see what I can come up with.

Hey, go ahead and give the beta i just released a shot and let me know if it works on your 700 series. I don’t actually have one…so if it gives errors let me know, i was having to do testing by building a fake 700 test server.

1 Like

I will add it and report back

I haven’t tried to add the 700 series yet but upon first reboot after installing the beta I received this error and the 800 didn’t load

Logger: homeassistant.config_entries
Source: config_entries.py:1069
First occurred: 12:07:16 AM (1 occurrence)
Last logged: 12:07:16 AM

Flow handler not found for entry WattBox WB-800-IPVM-6 for wattbox

This is what it shows in the devices page

And I can’t add another device

I also noticed the device page says it’s v1. 0.0 but in HACS it does say it’s on beta1, I even redownloaded it and restarted one more time but it’s still not working.

I think I can get you a wireguard cert to access the device, I did it for eseglem when he was trying to get the 800 tested for his repo.

Yeah I didn’t build in much migration. Unless it’s a big hassle try deleting the 800 an re-adding it.

I deleted it and restarted but it won’t let me add anymore.

The error is the same when I tried to add the 700 while the 800 was still in devices.

Config flow could not be loaded: {"message":"Invalid handler specified"}