-
Notifications
You must be signed in to change notification settings - Fork 4
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
ERROR - RPC request time out (no "°C" unit support?) #1
Comments
The label (see back of the box) mentions WEBBOX-BT-20-GR1 as type on mine. Could you:
Cheers, PS: I can handle/speak dutch as well ;-) |
For anyone looking for an answer, Scrape:
So for the first one:
|
It is definitively a different box/hardware (webbox-G1-150002608 vs webbox-bt-20 GR1 for me) Wrt the POST request, you forgot to prefix the json dict with "RPC=", i.e. payload should be:
You can also use your web browser and the following URL to check for RPC support If nothing is returned, you box unlikely supports the RPC API. I guess you tried the SMA Solar integration already without success either ? Cheers, PS: If you are running the HAOS version, you can access the linux container running HA using the "Terminal & SSH' addon (access via ssh or directly from HA web UI) |
(Tried 'SMA Solar' without luck (wrong authentication, but I can log into the website with credentials) (Also the SSH terminal seemed to run in a sort of docker/vm, because It didnt find the file or python or something, so I gave up on that. BUT NOW SOME GOOD NEWS! GetPlantOverview Request
GetDevices Response:
I have more, let me know what you need or where I can help |
The "Terminal & SSH" seems to run in sandbox mode, but addon-ssh has an option to run the command The error that that it throws out is:
The byte that is seems to crash on is 0xb0 which is a "°", The "SENS0500:xxxx" unit has two If we can talk somewhere I can share some more logs and data if you want? |
Great to read this/finding ... I should have check possible unicode mapping for 0xb0 rather than believe it was garbage ... "Terminal & SSH' addon gives you access to the supervisor container indeed not the homeassistant one (I'm using a custom docker install running on x86/T2M2 wall screen and ssh directly into it to access HA container); it can be used to access homeassistant configuration directory/edit related files instead of using the file editor addon (in /root/config -> /root/config/custom_components/sma_webbox here) Given that you are able to run/modify the sma_webbox.py file, we should be able to investigate/validate a possible fix rather quickly. I'll have a look at/more on this tonight. Great anyway that everything else works apparently ! Cheers, |
Could you already check the returned Content-Type in the response header (text/html;charset=utf-8 ?) |
You mean these? HEADERS
COMPLETE REQUEST HEADERS
this is one from "http://192.168.1.yy/rpc" with the application/json data: a piece of the Json corruption is ============================== To confirm, the plugin works completely when the SMA module is configured to work only in "K" instead of "°C". Thus only support for that "°C" would need to be added. I agree this sounds simple, but I have no clue how to achieve this |
Yes, thanks. Content-Type in my header is "text/html;charset=utf-8" |
Could you change line 140 of sma_webbox.py data = json.loads(data.decode().replace("\0", "")) to: data = json.loads(data.decode('iso-8859-1').replace("\0", "")) and check again/report results ? |
Thanks, I'll also have to adapt the code to support new sensor attributes; I don't have sensors for temperature, windspeed, illuminance, ... from my webbox. Supported units are here sensor.py L37 and attributes set here sensor.py L140 but much more exists cfr. HA const.py => This will give you the right default icon/formatting/handling within HA for all of these Can you handle that and submit a PR or do you prefer that I address this ? (is the list above complete then) Cheers, PS: Do you have also a smart meter/are you using the P1 Monitor integration and HA Energy Management ? |
Tried to make the PR request you asked, hope that went well. PS: P1 is integrated in ESPhome with this |
I saw your PR/it went well :-) I'll create a WEBBOX-G1 branch and check it in there, then add support for additional sensors/units and ask you to test (as I can't do myself). Once OK for you and existing webbox, I'll merge it back to master and release a new version Could you run sma_webbox.py script again and attach the output log as a file rather than en embedded image ? (easier/less error-prone to identify missing sensors/exact syntax) Cheers, |
Part of set log:
Let me know (and how specifically?) I can can try it. |
I just checked tentative changes to support new WEBBOX-G1 sensors and they doesn't seem to break my setup up to now :-) Waiting for your test results once you are back from vacation ! |
Thanks for the feedback. Icons (default ones I suppose) & values look good except for TmpAmbC; it looks like 0 is reported but somehow interpreted as °K and converted in °C ... Could you check the unit_of_measurement property [Developper tools -> States, use sma as filter) of that one or may be for all sma entities and see if you see inconsitencies. Note that unit of measurement is set during initial integration setup, i.e. if you change webbox settings it won't be reflected in HA |
... what version of home assistant are you using (I would expect lx and m/s rather than illuminance and wind_speed respectively when supported) ? |
TmpAmbC is raw at 0.03K thus -273.17C, I suppose this is not connected or broken, I wouldn't worry about it. Running the one before the latest version or something, but it's set to be Dutch language. |
OK that makes sense in that case (HA is always converting units to your configured region and therefore 0 K is correctly converted to -273 C). You may want to change the webbox setting to report in °C iso °K and remove/add this integration (and check that °C is now correctly handled) Could you also check wind speed and illuminance sensors properties (I used illuminance iso irradiance for the latter/likely the issue but before fixing that/make a new release I would like to understand the unexpected windspeed unit/display) |
I gave it a look we run "2023.3.1", The External box is completely fogged up with water so that's probably where those weird outside numbers come from. Also the windmeter needs some maintenance and its stuck. So basically all outside numbers of this system are physically broken, but this software seems fine at least. I have changed the box to "C" already in the last step, and that is still running fine now with the main branch. |
Thanks => could you check the last version I just checked in on main , it should address the "unit of measurement" issue for irradiance (added recently, cfr. https://github.com/home-assistant/core/pull/83452/files) and "wind speed" as well I believe. Once confirmed OK, I will make a new tag/release. |
I tried looking into the unit, it was soaked in water. But sadly the RS485 module died, and I can not get any data from it anymore (not even invalid data like before). So I sadly can not confirm what you where asking. |
Oh bad luck ... I'll review all changes again and release as-is then (changes are running OK against my device)
|
We have a 'Sunny WebBox' version 'G1' and it seems to not be able to run this integration. I have not found out what the issue it yet. It seems that the data is in the wrong format or something.
SMA info:
Versie Firmware 1.52
Versie apparaatprofielen 1.21
Versie taalgegevens 1.06
Versie Hardware WEBBOX-G1-150002608
Some log items: (Sorry for Dutch, the HA is setup that way)
The text was updated successfully, but these errors were encountered: