Integration with Span?

That was fast, thank you!
Okay, I deleted my old one. Then I went over to the one you suggested

and followed the instructions exactly, and it was a nice and easy install.
Unfortunately, I’m still getting the same “Unexpected error”.

are you certain you’ve installed the one from sargonas? It’s hard to tell the difference from HACS. When I installed Sargonas and entered my panel’s IP address everything just worked with no issues.

You are correct, I had done it incorrectly from the markeplace.

Doing this:

  1. Custom repositories
  2. specifying Repsitory “sargonas/span” and Category “Integration”

worked like a champ, I’m in now, thank you!
2024-01-07_16-15-08

1 Like

Hello!
First, thank you so much for putting this up!

I added the integration 2 days ago, and everything is working great, except that all the “consumed energy” sensors reset in the middle of the day instead of midnight like the Span app. Also it’s a bit weird that when it resets around 9am, they all start at 0, which isn’t what it should be since I consumed some energy between midnight and 9am. This image below shows an outlet where I have a device that constantly consumes 20W, so the value for yesterday should have reached 480W and not what’s shown.
I made sure everything is up to date. I searched this thread and the GitHub issues to see if I had to set the reset time somewhere, but couldn’t find it.

Thank you!

In my build with solar and batteries, I’m also including a backup generator. It appears Span has limitations when integrated with a generator in that Span isn’t aware of when on generator power. Has anyone overcome this limitation with some sort of generator/HA/Span logic? I’m currently quoted a Generac, but I’m early enough in the build process to do something different if there are options to improve automation.

Looks like he updated it 2 days ago. I’m updating now.

Edit: I have data again! I really wish this integration worked when I did my winter off-grid testing. I would have been able to shed loads at different increments than the Span App allows. Things like turn off the heat pump at 25% battery instead of 50% in a “Nice to Have” group.

So funny thing just happened to me with my span panel. I’m sitting in my office when half the circuits in my house, including the one with my internet, go out. I’m running around trying to figure out what happened, but frustratingly I can’t connect to my local span panel on my local internet because Span makes you connect via the internet to communicate within the same network for some asinine reason.

So I’m running around when my wife says, “Your son told google to ‘Turn out all the lights’”

And since I have an integration to let me control my stuff via google… it did. Every last circuit that had a light on it in the span panel was instantly turned off, and since I have to have an internet connection I couldn’t use their app to fix this issue.

Thankfully I had this integration up and running and was able to use it to turn on the circuits again.

So 2 questions here.

  1. Is there a way to force a local connection through the span app to the span panel (and for any Span devs who come by, let us connect directly to the Span panel please when we’re on the same network.)

and

  1. How can I make sure that such an innocent command never takes down my home again :rofl:
1 Like

Through the app no. Not possible.

Dont expose the breakers to Google or Alexa. (I don’t. Not on your life. Nobody needs voice control of a breaker.) I do t allow HA to expose them and I never install the skills for Google or Amz for EXACTLY this reason.

I agree that that exposing breaker relays to Google/Alexa seems fraught with peril.

I’ll note that Span panels support configuring a circuit as “Always On”, in order to protect loads on those circuits from ever being powered off, and Internet connection circuits are exactly what this is intended for. In the IOS app, go to Settings → All Settings → Always On Circuits and then make sure each such circuit is checked.

I’m not sure if you fully understand what I meant. I didn’t directly expose them. I exposed home assistant and home assistant took the command “turn off all lights” and did that on its side.

Then

  1. make sure that the breaker is not exposed to ‘assist’ as a controllable item by voice
    Settings>voice assistants>assist

  2. make sure your ‘all lights’ doesn’t include random switches (will take some experiments, not versed with how that’s selected by intents)

As you can see I too am not well verses in how that’s selected as well :rofl:

1 Like

amazing! Just confirming this worked painlessly on my first integration with my SPAN panel, + HA 2023.11.3.

If helpful to others – be aware you’ll likely want to jump into the entities configuration after installing this to disable some of the 100+ entities that are added, and disabling anything too verbose or otherwise scary – I personally didn’t feel comfortable having every circuit in my home toggle-able and auto-imported to the default dashboard out of the box.

In my use-case – for certain nebulous “kitchen+main BR+shed+misc” weirdo inherited circuits, I throw on a Kasa smart power strip (which has power monitoring per plug) and segment that power usage in HA as a compliment to SPAN circuits as part of my niave quest to reasonably attribute power usage to room/appliances, and fluidly assign backup brownout priority.

1 Like

Oh boy can I sympathize. I’ve had similar things happen to me, which resulted in running my gas fireplace all night long. Fortunately nothing outside of the fireplace caught fire. And yes, this is why it’s important to limit what these sorts of “fuzzy logic matching” virtual assistants are allowed to control.

The span app has a functionality in it called “emergency reconnect”, designed for exactly this scenario (you accidentally turned off the circuit with your modem, and likely also your router). You can access it via settings → all settings → emergency reconnect. It is actually based on a wireless access point built into the panel, on the assumption that if your internet is down there’s a good chance your home LAN is down too.

But honestly, using the panel’s local api, via the home assistant integration, if you’ve already got it set up, and your network still works, just not the internet, is probably a better solution.

I can’t make any specific promises about future features span may or may not deliver, but I can reassure you that there are plenty of engineers working at span who feel the same way as you do about local connectivity. We hear you.

3 Likes

The app wouldn’t let me get that far for some reason. I would open it, and it would show a screen with something written on it (I forget the exact error message, but it was very generic something along the lines of could not reach panel maybe?) and a button to click retry. The bottom row of buttons (including the settings options) was not displayed.

Thankfully, this is exactly what I did to solve it. I started off just trying quick fixes instead of actually stopping to think for half a second :man_facepalming: And yeah, if I had just shut off my wifi on my phone I would have reached it via the cell modem, but I have a battery backup for my internal network so I can safely shut down equipment if power goes out without needing to buy a KVM for my server rack.

c’est la vie, we live, we learn.

Thanks folks for this integration! I’ve seen threads that say sargonis/span is the best repository but then I see check-ins just a few weeks ago in the upstream gdgib/span repository and sargonis does not have some of the other fixes in the upstream repository. Is there really a “best” repository? I’ve tried both and on the surface they both appear to work.

Both also get these warnings about deprecated usage in both:

Logger: homeassistant.const
Source: helpers/deprecation.py:205
First occurred: 1:22:21 PM (2 occurrences)
Last logged: 1:22:21 PM

ENERGY_WATT_HOUR was used from span_panel, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfEnergy.WATT_HOUR instead, please create a bug report at Issues · gdgib/span · GitHub
POWER_WATT was used from span_panel, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfPower.WATT instead, please create a bug report at Issues · gdgib/span · GitHub

Generally try to use the fork closest to the original as possible. Many had split to sargonas repo temporarily as he had the fix for the most recent firmware updates, but now that it’s been sent upstream either work for now.

now that it’s been sent upstream either work for now.

Got it, thanks for that confirmation.

I’m prototyping an enhancement to the integration to expose solar power/energy directly. I have an inverter with no HA integration. If you have solar on a circuit the SPAN integration doesn’t show you the circuit but the power/energy data is still available via the panel data.

While I have the prototype working with constants for circuit values I just read that any circuit can be the solar inverter feed. I’ve read some comments regarding the more or less standardized location but I also know the SPAN docs say any circuit can be the solar inverter feed.

I don’t see any user accessible data that identifies the solar circuit in use if any. Does anyone know how an end user can identify which circuit is in use for solar via the API? I only need the circuit number(s).

1 Like

Guys I need some feedback. I’m going with 2 Sol-Ark 15 inverters and EG4 batteries and generator backup. Obviously the batteries are not supported by span so it would have no idea upstream where power is coming from. I’m thinking I could get something like following to integrate the inverters into HA. There are a couple of integrations out there to bring Sol-Ark data into HA. I can then use HA to communicate back to span based on a condition to perform load shedding (turn off certain breakers) when the grid is down. Am I thinking about this correctly or will this never work?

Link to Solark integration device - https://solar-assistant.io/