-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to integrate PV Supervisor version 2.2.2, Build 234 #31
Comments
I've been poking around the same version of the pv supervisor. Just appears to be this older version of the cgi_bin script is returning the data pre-embedded in http. I think all the data is there to be able to integrate with this component. Will take a shot at it and report back, or create a PR. |
@meanhacker I think I've got this working. I am running tests for a few days to see how it behaves before raising a PR. I see you have a Power Meter, which I don't have. It would be helpful if you could test the beta-feature (support for v2.2.2/3) as well. It's available at this fork: https://github.com/jcronq/hass-sunpower. |
Hello, I tried setting up the integration. After typing in the IP address,
the initialization would never complete. After a long time, I would see the
integration in my devices, but no sensors... In the logs, this is what I
see:
2022-09-18 09:49:41.779 ERROR (MainThread) [custom_components.sunpower]
Failed to update data
2022-09-18 09:49:41.826 ERROR (MainThread)
[custom_components.sunpower.sensor] Cannot find PVS Entry
2022-09-18 09:49:41.830 ERROR (MainThread)
[custom_components.sunpower.binary_sensor] Cannot find PVS Entry
2022-09-18 09:49:41.835 ERROR (MainThread)
[homeassistant.components.binary_sensor] Error while setting up sunpower
platform for binary_sensor
…On Sat, Sep 17, 2022 at 6:58 PM Vitaliy Daniliuk ***@***.***> wrote:
Hi Jason, thank you for looking at my issue report! I will try to do some
testing with that fork and report my findings. Thanks!
On Sat, Sep 17, 2022, 5:30 PM Jason Cronquist ***@***.***>
wrote:
> @meanhacker <https://github.com/meanhacker> I think I've got this
> working. I am running tests for a few days to see how it behaves before
> raising a PR.
>
> I see you have a Power Meter, which I don't have. It would be helpful if
> you could test the beta-feature (support for v2.2.2/3) as well. It's
> available at this fork: https://github.com/jcronq/hass-sunpower.
>
> —
> Reply to this email directly, view it on GitHub
> <#31 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AOETEJAEUFHPABSXQHXFHA3V6ZPDBANCNFSM5SM5TSUQ>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***>
>
|
I believe I left out some logs. Here is a better capture:
2022-09-18 12:08:40.372 ERROR (MainThread) [custom_components.sunpower]
Failed to update data
2022-09-18 12:08:40.387 ERROR (MainThread)
[custom_components.sunpower.sensor] Cannot find PVS Entry
2022-09-18 12:08:40.391 ERROR (MainThread)
[custom_components.sunpower.binary_sensor] Cannot find PVS Entry
2022-09-18 12:08:40.396 ERROR (MainThread)
[homeassistant.components.binary_sensor] Error while setting up sunpower
platform for binary_sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py",
line 281, in _async_setup_platform
await asyncio.shield(task)
File "/config/custom_components/sunpower/binary_sensor.py", line 55, in
async_setup_entry
async_add_entities(entities, True)
UnboundLocalError: local variable 'entities' referenced before assignment
…On Sun, Sep 18, 2022 at 11:10 AM Vitaliy Daniliuk ***@***.***> wrote:
Hello, I tried setting up the integration. After typing in the IP address,
the initialization would never complete. After a long time, I would see the
integration in my devices, but no sensors... In the logs, this is what I
see:
2022-09-18 09:49:41.779 ERROR (MainThread) [custom_components.sunpower]
Failed to update data
2022-09-18 09:49:41.826 ERROR (MainThread)
[custom_components.sunpower.sensor] Cannot find PVS Entry
2022-09-18 09:49:41.830 ERROR (MainThread)
[custom_components.sunpower.binary_sensor] Cannot find PVS Entry
2022-09-18 09:49:41.835 ERROR (MainThread)
[homeassistant.components.binary_sensor] Error while setting up sunpower
platform for binary_sensor
On Sat, Sep 17, 2022 at 6:58 PM Vitaliy Daniliuk ***@***.***> wrote:
> Hi Jason, thank you for looking at my issue report! I will try to do some
> testing with that fork and report my findings. Thanks!
>
> On Sat, Sep 17, 2022, 5:30 PM Jason Cronquist ***@***.***>
> wrote:
>
>> @meanhacker <https://github.com/meanhacker> I think I've got this
>> working. I am running tests for a few days to see how it behaves before
>> raising a PR.
>>
>> I see you have a Power Meter, which I don't have. It would be helpful if
>> you could test the beta-feature (support for v2.2.2/3) as well. It's
>> available at this fork: https://github.com/jcronq/hass-sunpower.
>>
>> —
>> Reply to this email directly, view it on GitHub
>> <#31 (comment)>,
>> or unsubscribe
>> <https://github.com/notifications/unsubscribe-auth/AOETEJAEUFHPABSXQHXFHA3V6ZPDBANCNFSM5SM5TSUQ>
>> .
>> You are receiving this because you were mentioned.Message ID:
>> ***@***.***>
>>
>
|
Can you inspect & attach the raw http that's returned for DeviceList command? |
Here is the requested HTML file. I only redacted the serial numbers because
it's the internet :)
[http __sunpowerpi_cgi-bin_dl_cgi Command=DeviceList.txt](https://github.com/krbaker/hass-sunpower/files/9595164/http.__sunpowerpi_cgi-bin_dl_cgi.Command.DeviceList.txt)
|
I've pushed an update to the same fork that should handle your device list (there was a If this doesn't work. Please send along the error message from the logs along with the raw http result from calling DeviceDetails on each of your devices. |
Hello Jason, after I updated the integration, home assistant would not let
me delete and re-add the integration. I had to disable it first, delete the
folder in custom_components, restart home assistant, and re-download it.
After that, it is still no longer prompting for the IP address. Below are the HTML responses for each device:
[PV Supervisor.txt](https://github.com/krbaker/hass-sunpower/files/9600968/PV.Supervisor.txt)
[Power Meter.txt](https://github.com/krbaker/hass-sunpower/files/9600970/Power.Meter.txt)
[Inverter.txt](https://github.com/krbaker/hass-sunpower/files/9600972/Inverter.txt)
"This integration does not support configuration via the UI. If you
followed this link from the Home Assistant website, make sure you run the
latest version of Home Assistant."
2022-09-19 08:22:16.778 ERROR (MainThread) [homeassistant.config_entries]
Error occurred loading configuration flow for integration sunpower: No
module named 'custom_components.sunpower.const_noha'
2022-09-19 09:16:49.296 ERROR (MainThread) [homeassistant.config_entries]
Error occurred loading configuration flow for integration sunpower: No
module named 'custom_components.sunpower.const_noha'
…On Mon, Sep 19, 2022, 5:40 AM Jason Cronquist ***@***.***> wrote:
I've pushed an update to the same fork that should handle your device list
(there was a line break in your PVS device name that I didn't have).
If this doesn't work. Please send along the error message from the logs
along with the raw http result from calling DeviceDetails on each of your
devices.
—
Reply to this email directly, view it on GitHub
<#31 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AOETEJABEYNOU63T53BJ243V7BNMNANCNFSM5SM5TSUQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
That's my bad. Accidentally committed code I was using for testing the data you sent me. Ok to try again now. |
Ok, I think we are getting a bit closer now, but I'm still not seeing the sensors. Attached latest logs: |
Ready for another test.
|
Hello, currently the sun is down is and the inverter is offline (showing an Error status), so I'm not sure if that's contributing to the errors: Here is what the response looks like with the inverter being offline: |
Ready for another test. Wasn't related to inverter being offline, I missed a point in the parsing where I was handling I ran the data you sent through it. It should work now... Famous last words. |
I'm finally seeing the sensors! However some things are missing like Inverter Avg AC Power/Voltage/Current, Avg DC Current. |
This is expected behavior. Only values that are used in the hass-sunpower component are being mapped. Additional values that appear in version 2.x.x but not used in the component are not mapped. Primarily, I don't know what the key-name would be in version 5/6.x.x, as I am on version 2.2.3 myself. Only concern I have with your logs is that your Inverter isn't publishing Your Power Meter does seem to be publishing an TLDR; Your logs look good. :) |
Hello Jason, thank you for taking a look at the logs. The dashboard seems
to be working correctly, however it took me some time to understand that
everything is in kWh. I would like to monitor my solar production from home
usage separately, would it be possible to create a sensor for the inverter
power usage (in kW)? Ideally, it would be interesting to monitor the solar
performance and home energy usage over time, but it looks like the power
meter is capturing both solar and home usage which means solar would need
to be subtracted from the watt meter to get a true home usage reading.
Thank you so much for getting this to work, below is what my dashboard
looks like!
…On Tue, Sep 20, 2022 at 9:00 AM Jason Cronquist ***@***.***> wrote:
This is expected behavior. Only values that are used in the hass-sunpower
component are being mapped. Additional values that appear in version 2.x.x
but not used in the component are not mapped. Primarily, I don't know what
the key-name would be in version 5/6.x.x, as I am on version 2.2.3 myself.
Only concern I have with your logs is that your Inverter isn't publishing Avg
DC Power (maps to p_3phsum_kw). I don't think this will impact you
negatively though. The Power dashboard in Home Assistant wants Total
Lifetime Energy (maps to ltea_3phsum_kwh) which you do have.
Your Power Meter does seem to be publishing an Avg DC Power which can be
used in place of the inverter's missing value if you ever desire it.
TLDR; Your logs look good. :)
—
Reply to this email directly, view it on GitHub
<#31 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AOETEJHROMK5GZUNQNLXBW3V7HNTDANCNFSM5SM5TSUQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hi Jason, thank you for looking at my issue report! I will try to do some
testing with that fork and report my findings. Thanks!
…On Sat, Sep 17, 2022, 5:30 PM Jason Cronquist ***@***.***> wrote:
@meanhacker <https://github.com/meanhacker> I think I've got this
working. I am running tests for a few days to see how it behaves before
raising a PR.
I see you have a Power Meter, which I don't have. It would be helpful if
you could test the beta-feature (support for v2.2.2/3) as well. It's
available at this fork: https://github.com/jcronq/hass-sunpower.
—
Reply to this email directly, view it on GitHub
<#31 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AOETEJAEUFHPABSXQHXFHA3V6ZPDBANCNFSM5SM5TSUQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
My gut feeling is this should probably be a different integration. They are both hacky in their own way (missing fields and such is enough of a problem with the pvs5/pvs6). Thoughts? |
I probably came to the same conclusion given I never raised a PR. Hacky by definition too, lol. I also don’t have a ton of interest in testing a PR. It’s been working for me for 7 months without issue, so don’t want to rock the boat. I’d be surprised if there’s anyone else out there with this old hardware, and a desire to connect to home assistant. So not a ton of value in investing additional effort. I personally planned on leaving this issue open indefinitely in case anyone else was desperate enough to find it. |
I have also been satisfied with the performance of jcronq's fork and it has been working well for the past 7 months. I don't mind keeping this issue open if it helps others find this code/thread. |
Looking at the fork I think its less intrusive than I was expecting (I like the ~adapter). I'm also abstracting some of the code for ESS / PVS work so I may take another look at integrating this. |
Hello jcronq, I'm unable to open an issue in your fork so I am writing here. Let me know if you want me to move these into a proper issue once the setting is enabled. I am getting the following warnings in my Home Assistant Core logs:
|
Hello, I followed the guide to setup a Raspberry Pi inside of the comm cabinet, however it appears that the PV Supervisor is not compatible with the integration. Below is the setup:
I am able to access the PV Supervisor Management Console, below is a screenshot:
When I enter
http://sunpowerpi/cgi-bin/dl_cgi?Command=DeviceList
into the browser, I'm presented with an HTML response:=========EDIT=========
I recently came across a command that pulls all the information given a serial number of the device, however the response is still in an HTML format:
http://sunpowerpi/cgi-bin/dl_cgi?Command=DeviceDetails&SerialNumber=146xxx
When I inspect the page and indent the response for readability, this is what I see:
In HomeAssistant, when try to initialize the integration, it doesn't work. I tried providing the hostname and IP address:
Here is an example of what the setup looks like on my end, except I don't have the Ethernet adapters:
https://us.sunpower.com/how-troubleshoot-icd-sunpower-monitoring-system-sms-2x-pv-supervisor
The text was updated successfully, but these errors were encountered: