SpanPanel / Span

SPAN Integration for HomeAssistant/HACS
Other
17 stars 1 forks source link

No Battery percentage sensor despite data being available (for Enphase / Remote Meter Kit setup) #26

Open joergbattermann opened 3 hours ago

joergbattermann commented 3 hours ago

Hi there!

I updated to v1.0.2 yesterday evening after seeing the new release and that @pavandave had provided initial support for Battery percentage (thanks!!) because we do have a Span Panel + its Enphase Remote Meter kit to work with / monitor our Enphase setup (Solar + Batteries), i.e.:

IMG_3262

Now what I hoped would happen after upgrading from v0.0.12 to v1.0.2 was that the described 'Battery Percentage' sensor would just show up.. which it didn't. So I uninstalled the integration, restarted HA, redownloaded the integration in HACS, restarted HA again.. and then (re)added it to HA.

Unfortunately this also didn't add the 'Battery Percentage' sensor (everything else is still/again there of course) & so I went ahead and checked the HA logs for calls/responses per the const.py's storage/soe endpoint and yep.. it's there as per debug logs (HA integration etc re-add/re-load etc took a couple of minutes & hence the state of charge is higher in the data below given the batteries are/were indeed charging up):

2024-09-22 13:01:42.341 DEBUG (MainThread) [custom_components.span_panel.span_panel_api] HTTP GET Attempt #1: http://192.168.7.71/api/v1/storage/soe
2024-09-22 13:01:42.365 DEBUG (MainThread) [custom_components.span_panel.span_panel_api] Fetched from http://192.168.7.71/api/v1/storage/soe: <Response [200 OK]>: {"soe":{"percentage":74}}
2024-09-22 13:01:42.365 DEBUG (MainThread) [custom_components.span_panel.coordinator] Finished fetching span panel SpanPanel data in 0.841 seconds (success: True)

There's no disabled sensor to enable but maybe I'm just doing / expecting it wrong.. should the 'Battery Percentage' sensor simply show up or would I have to do something for it to do so... or is there something else maybe a bit different / off or something?

Thanks!

pavandave commented 2 hours ago

Can you disable and reenable the sensor in the config flow?

On Sun, Sep 22, 2024, 3:10 PM Jörg Battermann @.***> wrote:

Hi there!

I updated to v1.0.2 yesterday evening after seeing the new release and that @pavandave https://github.com/pavandave had provided initial support for Battery percentage (thanks!!) because we do have a Span Panel + its Enphase Remote Meter kit to work with / monitor our Enphase setup (Solar + Batteries), i.e.:

IMG_3262.PNG (view on web) https://github.com/user-attachments/assets/0be3c278-d53e-4a3e-85fb-d4ce5b807876

Now what I hoped would happen after upgrading from v0.0.12 to v1.0.2 was that the described 'Battery Percentage' sensor would just show up.. which it didn't. So I uninstalled the integration, restarted HA, redownloaded the integration in HACS, restarted HA again.. and then (re)added it to HA.

Unfortunately this also didn't add the 'Battery Percentage' sensor (everything else is still/again there of course) & so I went ahead and checked the HA logs for calls/responses per the const.py https://github.com/SpanPanel/Span/blob/main/custom_components/span_panel/const.py's storage/soe endpoint and yep.. it's there as per debug logs (HA integration etc re-add/re-load etc took a couple of minutes & hence the state of charge is higher in the data below given the batteries are/were indeed charging up):

2024-09-22 13:01:42.341 DEBUG (MainThread) [custom_components.span_panel.span_panel_api] HTTP GET Attempt #1: http://192.168.7.71/api/v1/storage/soe 2024-09-22 http://192.168.7.71/api/v1/storage/soe2024-09-22 13:01:42.365 DEBUG (MainThread) [custom_components.span_panel.span_panel_api] Fetched from http://192.168.7.71/api/v1/storage/soe: <Response [200 OK]>: {"soe":{"percentage":74}} 2024-09-22 13:01:42.365 DEBUG (MainThread) [custom_components.span_panel.coordinator] Finished fetching span panel SpanPanel data in 0.841 seconds (success: True)

There's no disabled sensor to enable but maybe I'm just doing / expecting it wrong.. should the 'Battery Percentage' sensor simply show up or would I have to do something for it to do so... or is there something else maybe a bit different / off or something?

Thanks!

— Reply to this email directly, view it on GitHub https://github.com/SpanPanel/Span/issues/26, or unsubscribe https://github.com/notifications/unsubscribe-auth/AK2MYTP6FGIMSLVWARYIOW3ZX4PZ5AVCNFSM6AAAAABOU3CK3GVHI2DSMVQWIX3LMV43ASLTON2WKOZSGU2DCMRTHA4DSNQ . You are receiving this because you were mentioned.Message ID: @.***>

cayossarian commented 2 hours ago

@joergbattermann, you need to enable the sensor in the Span Panel Options...Settings->Devices->Span Panel->Configure

span configure

joergbattermann commented 2 hours ago

Ha!! I hadn't looked & therefore seen that configuration option, my bad & thank you @cayossarian / @pavandave for the super-fast reply, much appreciated!

And yes, it does show up now:

image

The only small feedback I have would be the naming of that sensor.. as it isn't fully in line (I think?) with the rest of the system entities.. the other ones (i.e. 'Current Power', 'Cellular Link', 'Door State', 'Software Version' etc) aren't prefixed with 'SPAN*' in their name.

Oh and a small side topic: the Span solar integration for the Enphase systems is a bit different (see the aforementioned Remote Meter Kit) as it doesn't have the solar breakers inside the Span panel (or not necessarily so), but rather in the Enphase components (in the Combiner as far as I remember). The HA configuration seems to require a non-zero leg value for l1 / l2 which.. doesn't apply here. Is there an easy way to find out if or what of the Span panel's APIs returns the solar data nevertheless / maybe differently than the Span-integrated-solar-circuits way?

Either way, thanks again Pavan & Bill!