jpcornil-git / ha-sma Goto Github PK
View Code? Open in Web Editor NEWSMA Sunny Webbox integration for Home Assistant
SMA Sunny Webbox integration for Home Assistant
There are 3 webboxes in my network. However, only one box can be set up in HA at a time. There is an error message for the next box. I can configure one box each with two HA instances.
Excerpt from the log file:
2024-09-16 22:33:53.567 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration sma_webbox 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
2024-09-16 22:33:53.569 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration hacs 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
2024-09-16 22:42:02.637 WARNING (MainThread) [custom_components.sma_webbox.sma_webbox] RPC request timed out
2024-09-16 22:42:14.347 WARNING (MainThread) [custom_components.sma_webbox.sma_webbox] RPC request timed out
2024-09-16 23:03:55.464 WARNING (MainThread) [custom_components.sma_webbox.sma_webbox] RPC request timed out
2024-09-16 23:04:07.839 WARNING (MainThread) [custom_components.sma_webbox.sma_webbox] RPC request timed out
2024-09-16 23:04:42.533 INFO (MainThread) [custom_components.sma_webbox.sma_webbox] UDP protocol created
2024-09-16 23:04:42.534 DEBUG (MainThread) [custom_components.sma_webbox.sma_webbox] { " v e r s i o n " : " 1 . 0 " , " p r o c " : " G e t D e v i c e s " , " f o r m a t " : " J S O N " , " i d " : " 1 " }
2024-09-16 23:04:47.535 WARNING (MainThread) [custom_components.sma_webbox.sma_webbox] RPC request timed out
2024-09-16 23:04:47.537 INFO (MainThread) [custom_components.sma_webbox.sma_webbox] UDP protocol closed
2024-09-16 23:04:54.580 INFO (MainThread) [custom_components.sma_webbox.sma_webbox] UDP protocol created
2024-09-16 23:04:54.580 DEBUG (MainThread) [custom_components.sma_webbox.sma_webbox] { " v e r s i o n " : " 1 . 0 " , " p r o c " : " G e t D e v i c e s " , " f o r m a t " : " J S O N " , " i d " : " 1 " }
2024-09-16 23:04:54.659 DEBUG (MainThread) [custom_components.sma_webbox.sma_webbox] {'result': {'devices': [{'key': '0080:7dc685aa', 'name': 'SN: 2110162346'}, {'key': '0080:7dc6a28f', 'name': 'SN: 2110169743'}, {'key': '0080:7dc71988', 'name': 'SN: 2110200200'}], 'totalDevicesReturned': 3}, 'format': 'JSON', 'proc': 'GetDevices', 'version': '1.0', 'id': '1'}
Greetings J.Lauper
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)
Logger: homeassistant.config_entries
Source: config_entries.py:424
First occurred: 10:13:45 (1 occurrences)
Last logged: 10:13:45
Config entry '192.168.1.245' for sma_webbox integration not ready yet: RPC request timed out; Retrying in background
Deze fout is ontstaan door een aangepaste integratie.
Logger: homeassistant
Source: custom_components/sma_webbox/sma_webbox.py:140
Integration: SMA Webbox (documentation, issues)
First occurred: 10:13:40 (14 occurrences)
Last logged: 10:26:21
Error doing job: Exception in callback _SelectorDatagramTransport._read_ready()
Traceback (most recent call last):
File "/usr/local/lib/python3.10/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 1027, in _read_ready
self._protocol.datagram_received(data, addr)
File "/config/custom_components/sma_webbox/sma_webbox.py", line 140, in datagram_received
data = json.loads(data.decode().replace("\0", ""))
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb0 in position 574: invalid start byte
Deze fout is ontstaan door een aangepaste integratie.
Logger: custom_components.sma_webbox.sma_webbox
Source: custom_components/sma_webbox/sma_webbox.py:333
Integration: SMA Webbox (documentation, issues)
First occurred: 10:13:45 (14 occurrences)
Last logged: 10:26:26
RPC request timed out
Traceback (most recent call last):
File "/usr/local/lib/python3.10/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 1027, in _read_ready
self._protocol.datagram_received(data, addr)
File "/config/custom_components/sma_webbox/sma_webbox.py", line 140, in datagram_received
data = json.loads(data.decode().replace("\0", ""))
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb0 in position 574: invalid start byte
2023-02-22 10:30:54.007 WARNING (MainThread) [custom_components.sma_webbox.sma_webbox] RPC request timed out
2023-02-22 10:30:54.010 WARNING (MainThread) [homeassistant.config_entries] Config entry '192.168.1.yyy' for sma_webbox integration not ready yet: RPC request timed out; Retrying in background
2023-02-22 10:31:08.233 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback _SelectorDatagramTransport._read_ready()
Traceback (most recent call last):
File "/usr/local/lib/python3.10/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 1027, in _read_ready
self._protocol.datagram_received(data, addr)
File "/config/custom_components/sma_webbox/sma_webbox.py", line 140, in datagram_received
data = json.loads(data.decode().replace("\0", ""))
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb0 in position 574: invalid start byte
2023-02-22 10:31:13.154 WARNING (MainThread) [custom_components.sma_webbox.sma_webbox] RPC request timed out
2023-02-22 10:31:32.340 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback _SelectorDatagramTransport._read_ready()
HA-sma also compatible with WEBBOX-K1
Webbox Plant: 5 sensors
sma_webbox_0_griegytdy
sma_webbox_0_griegytot
sma_webbox_0_gripwr
sma_webbox_0_msg
sma_webbox_0_OpStt
Generators: 17 sensors Attention! Some sensors are localized into local language!
sma_webbox_1_pac
e.g. sma_webbox_1_seriennummer
I cannot get HA-sma working. I've tried both editing configuration.yml and adding in the GUI. Same results either way. The error log consists of the following:
2024-01-22 12:02:16.647 ERROR (MainThread) [homeassistant.config_entries] Error occurred loading flow for integration sma_webbox: cannot import name 'WEBBOX_PORT' from 'custom_components.sma_webbox.sma_webbox' (/config/custom_components/sma_webbox/sma_webbox/init.py)
If adding SMA Webbox from the GUI the popup displays (before entering any data):
My version of Home Assistant is 2024.1.4 and it is running in Docker, on Linux.
Thank you
I upgraded this weekend from 2023.4.6 to 2023.5.2 and noticed this integration gives "Failed to set up"
In the logs I see the following:
This error originated from a custom integration.
Logger: homeassistant.config_entries
Source: custom_components/sma/__init__.py:137
Integration: SMA Webbox (documentation, issues)
First occurred: 11:09:06 (1 occurrences)
Last logged: 11:09:06
Error setting up entry 172.23.6.50 for sma
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 387, in async_setup
result = await component.async_setup_entry(hass, self)
File "/config/custom_components/sma/__init__.py", line 137, in async_setup_entry
hass.config_entries.async_setup_platforms(entry, [Platform.SENSOR])
AttributeError: 'ConfigEntries' object has no attribute 'async_setup_platforms'
I tried lowering the time and increasing it, yet it stills scans only every 30 seconds
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.