Thanks for your reply and information.
Hi all ā made an account just to discuss this function.
It looks like some makeshift solutions have been made in absence of SPANās APIā¦ but Iām a bit confused.
Can someone provide the latest instruction as to how SPAN can integrate into HomeAssistant?
Thank you!
Thanks for the heads up! I contacted Jeff through the original issue.
I also got a great contribution from another user that included durable auth. Iāll work with Jeff, of course, to put things together, but Release v0.0.6 - Durable authentication, circuit control, error checking, etc Ā· gdgib/span-hacs (github.com) should have pretty much everything.
That said, if someone here has a battery connected (I donāt) can you help me test the circuit priority selection? As noted in Durable authentication implementation + Multiple fixes to current functionalities by etmelvin Ā· Pull Request #4 Ā· gdgib/span-hacs (github.com), both myself and etmelvin get 500 errors for that, but since I also get them in the webapp our guess is that itās our lack of battery causing it.
Iām also adding this to the HACS default list nowā¦ stand byā¦
Oh, and Iām working to get this added as a HACS default repository: Adds new integration [gdgib/span] by gdgib Ā· Pull Request #1837 Ā· hacs/default (github.com). First time doing that, so wish me luck.
In the meantime, please note I did rename the repo to GitHub - gdgib/span: SPAN Integration for HomeAssistant/HACS, and upgrading from 0.0.5 to a newer version may require you do delete the integration in HA settings and re-add. Hopefully that wonāt be necessary in the future.
Iām getting the error below since i upgraded to the latest version:
2023-04-10 10:50:23.387 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration span_panel which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-04-10 10:50:39.300 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry (Panel name )
File ā/config/custom_components/span_panel/init.pyā, line 40, in async_setup_entry
Please disregard
If thereās ANY chance you think someone else might face the same, donāt be shy about filing it: Issues Ā· gdgib/span (github.com). Even if I just need to document how to fix it, itās always good to make life easier for everyone.
As a happy Home Assistant user, I encourage you to try it! As a Span employee, I can tell you that you donāt have to if you donāt want to.
While Span does not yet have a publicly advertised local api specification, you are welcome to read the source code of the home assistant integration, including the authentication details I posted at Need to provide durable authentication Ā· Issue #11 Ā· galak/span-hacs Ā· GitHub, to use as a basis for whatever integration you want to make (subject to whatever license the HACS integration has, it looks like itās MIT). That code (including the authentication part) should work on your panel without needing to enroll in any beta program.
Taking off my Span hat and speaking as an individual who has read much of the National Electrical Code, there are requirements in the NEC that restrict access to certain functionalities of āEnergy Management Devicesā to āqualified personnelā. Given the conservative nature of the NEC, those requirements may be more restrictive than necessary, but they are not entirely without merit. While I wasnāt there, and donāt know exactly what happened, I think itās likely that requirement was part of the reason for Spanās early design choice to restrict the ability to modify the system configuration.
There are various potentially plausible arguments for ways to allow some homeowners more abilities to modify their own system, and @SPAN-Colin mentioned that this is definitely not the first time Span has gotten this request. I canāt promise anything as far as if, when, or how weād be able to deliver this (prioritization is decidedly not my department), but at least know that we hear you.
I ran into a similar problem (the list circuits endpoint returns 500) when setting up my own panel. I found a bug in the panel code which was causing my issue, and which may have caused yours too, and I know how to fix it. I donāt have a timeline to promise for releasing the fix, but we are improving, if perhaps a bit slower than many people (myself included) would like.
I have years of working with an alternate control system (ISY / UD to be precise). It does play alright with HA, and I know HA is a commonly used system ā so I do have it on a VM I spin up from time to time in order to check things out. Thereās no discernable benefit for me personally to move over, or supplement with, HA at this time. I do enjoy any smart home community that is active, passionate, and knows that local control is where itās at!
Oh I got (durable) Access Tokens more than a week ago now, referencing the documentation and work that everyone here (and a couple other places) has provided, and have since been exploring functionality on my own. Thanks, all!
April 12, 2023 - the ip_address//#/circuits. is working on my home network. I did not change anything, it just started working today.
@residualimages did you end up publishing the code for this? I got a great contribution with the same functionality, but boyā¦ anything we can do to de-duplicate the effort in this space.
@mbbush thanks for Error during zeroconf setup (was: Testing authentication) Ā· Issue #9 Ā· gdgib/span (github.com)! On an unrelated note, is the 500 error youāre referring to here about changing circuit priority ( 500 error during circuit priority change Ā· Issue #10 Ā· gdgib/span (github.com))? Please say āyesā because that one annoys me.
@gdgib Hi
I am having an issue since the upgrade to the new version.
2 sensors that i use in my energy Dashboard from the Span panel, are reading negative numbers.
āsensor.feed_through_consumed_energyā and āsensor.feed_through_produced_energyā
I have tried to reconfigure the repo, but still coming up the same.
If your issue was caused by the same bug I found, it would make sense that it might come and go seemingly randomly. It should be fixed for good in (I think) your next firmware update.
Unfortunately I think that one is likely an internal problem. I will document it internally, but canāt promise any timeline for a fix.
is there a way to control the breakers from the integration? i didnāt see anything about that but maybe i missed it.
iām installing a few breakers for 220/240V power for bitcoin miners and want to be able to automate turning them on/off. my solar array produces a lot of extra power during the day and iād rather use it to mine bitcoin than send it back to the power company so they can give me 10% of the rate they charge.
i canāt use the little zwave control plugs because the miners are a different voltage and use way more power than those things are rated for.
From the HA integration page, it looks like it (as long as you are lucky and do not fall into the situation where you have issues with Spanās /circuits page):
Devices & Entities
This integration will a device for your span panel. This devices will have entities for:
- Circuits
- On/Off Switch
- Priority Selector
- Power Usage
- Network Connectivity (Wi-Fi, Wired, & Cellular)
- Door State
(
and from what some had documented via span.io api documentation Ā· GitHub, you can see:
Description : Change breaker state, turn on/off a breaker Valid Values : OPEN, CLOSED Request : POST /api/v1/circuits/xxxxxxxxxxxxxxx
)
It CAN theoretically but depending on which version of the integration you have VS. What span firmware you have they may not show up.
(i get a nice error in my log and no switches for the breakers)
ah - awesome! thank you.
just had the 500 error on circuits pop up again. not quite sure why. someone from span did go in and update some circuits for me. had some new ones installed the other day.
i just had a thought though - what if there was an option to use the span cloud api? iām not the biggest fan of this, i would much rather have local access (by far), but i thought the idea was worth entertaining. currently my local access doesnāt work, but cloud access works via the span app.
it looks relatively straight forward. i used the charles proxy app on my phone to grab all of the requests to the api.
auth is a bearer token in the header. and then itās just sending a request to their graphql endpoint and you get a json response. i can provide examples.
Im beyond not a fan of it and would prefer if they avoid that at all cost.
Assuming Matter now supports power meters (sorry donāt have the spec in front of me at the moment) id rather them dump all of the onboard web stuff and just make it a Matter over WiFi deviceā¦