Ich hab' hier zwei Shell MiniPM G3 verbaut, diese lassen sich mit dem Shelly Modul derzeit leider nicht auslesen.
Es scheint mir dass der Parser für die Statusmeldungen noch nicht für MiniPM G3 angepasst wurde. Ich hab' Änderungen im Bat.py gefunden, aber auch diese funktionieren nicht - so wie ich das sehe wird hier zwingend dreiphasig erwartet, was bei mir aber nicht der Fall ist.
(Zudem scheint der Code fürs Auslesen der Shellys für Inverter, Counter und Batterie redundant, womöglich wäre es geschickter hier eine Api.py zu haben und dort einmal zentral alles zu machen?)
Code: Alles auswählen
2024-10-02 08:55:30,887 - {root:75} - {INFO:MainThread} - # ***Start***
2024-10-02 08:55:30,997 - {modules.common.component_context:54} - {DEBUG:device4} - Update Komponenten ['EnergyMeter 1.0']
2024-10-02 08:55:30,999 - {modules.common.component_context:54} - {DEBUG:device8} - Update Komponenten ['Pumpe']
2024-10-02 08:55:31,007 - {urllib3.connectionpool:227} - {DEBUG:device8} - Starting new HTTP connection (1): 192.168.178.81:80
2024-10-02 08:55:31,009 - {modules.devices.sma_sunny_boy.device:72} - {DEBUG:device15} - Start device reading {'component22': <modules.devices.sma_sunny_boy.inverter.SmaSunnyBoyInverter object at 0x73df2a30>}
2024-10-02 08:55:31,010 - {modules.devices.sma_sunny_boy.device:72} - {DEBUG:device16} - Start device reading {'component23': <modules.devices.sma_sunny_boy.inverter.SmaSunnyBoyInverter object at 0x6fbd33d0>}
2024-10-02 08:55:31,011 - {modules.common.component_context:54} - {DEBUG:device15} - Update Komponenten ['WR Garage']
2024-10-02 08:55:31,011 - {modules.devices.sma_sunny_boy.device:72} - {DEBUG:device17} - Start device reading {'component24': <modules.devices.sma_sunny_boy.inverter.SmaSunnyBoyInverter object at 0x6fbd37c0>, 'component25': <modules.devices.sma_sunny_boy.bat_smart_energy.SunnyBoySmartEnergyBat object at 0x6fbc6ec8>}
2024-10-02 08:55:31,012 - {modules.common.component_context:54} - {DEBUG:device16} - Update Komponenten ['WR Haus']
2024-10-02 08:55:31,013 - {modules.devices.virtual.device:40} - {DEBUG:device18} - Start device reading{'component28': <modules.devices.virtual.counter.VirtualCounter object at 0x6fbc6ca0>}
2024-10-02 08:55:31,013 - {modules.common.component_context:25} - {DEBUG:device19} - Update Komponente ['Waschmaschine']
2024-10-02 08:55:31,014 - {modules.common.component_context:25} - {DEBUG:device20} - Update Komponente ['Trockner']
2024-10-02 08:55:31,015 - {modules.common.component_context:54} - {DEBUG:device17} - Update Komponenten ['PV STP6.0', 'Batterie STP6.0']
2024-10-02 08:55:31,016 - {modules.common.component_context:25} - {DEBUG:set values cp26} - Update Komponente ['Ladepunkt']
2024-10-02 08:55:31,016 - {modules.common.component_context:25} - {DEBUG:device15} - Update Komponente ['WR Garage']
2024-10-02 08:55:31,017 - {modules.common.component_context:25} - {DEBUG:device18} - Update Komponente ['UV Garage']
2024-10-02 08:55:31,021 - {modules.common.component_context:25} - {DEBUG:device16} - Update Komponente ['WR Haus']
2024-10-02 08:55:31,025 - {urllib3.connectionpool:227} - {DEBUG:device20} - Starting new HTTP connection (1): 192.168.178.135:80
2024-10-02 08:55:31,026 - {modules.common.component_context:25} - {DEBUG:set values cp27} - Update Komponente ['Ladepunkt']
2024-10-02 08:55:31,030 - {urllib3.connectionpool:227} - {DEBUG:device19} - Starting new HTTP connection (1): 192.168.178.128:80
2024-10-02 08:55:31,033 - {modules.common.component_context:25} - {DEBUG:device17} - Update Komponente ['PV STP6.0']
2024-10-02 08:55:31,034 - {modules.common.simcount._simcount:42} - {DEBUG:device18} - Previous state: SimCounterState(timestamp=1727852120.9138665, power=0, imported=0.0, exported=0)
2024-10-02 08:55:31,044 - {modules.common.simcount._calculate:11} - {DEBUG:device18} - time passed: 0.00281126, power1: 0, power2: 0
2024-10-02 08:55:31,042 - {urllib3.connectionpool:227} - {DEBUG:set values cp27} - Starting new HTTP connection (1): 192.168.178.207:80
2024-10-02 08:55:31,045 - {modules.common.simcount._calculate:27} - {DEBUG:device18} - power did not change sign. Total energy: 0
2024-10-02 08:55:31,049 - {modules.common.simcount._simcount:65} - {DEBUG:device18} - imported: 0 Wh, exported: 0 Wh, new state: SimCounterState(timestamp=1727852131.0344057, power=0, imported=0.0, exported=0)
2024-10-02 08:55:31,050 - {modules.common.store._api:26} - {DEBUG:device18} - Raw data CounterState(currents=[0.0, 0.0, 0.0], powers=[0.0, 0.0, 0.0], voltages=[230.0, 230.0, 230.0], power_factors=[0.0, 0.0, 0.0], imported=0.0, exported=0, power=0, frequency=50)
2024-10-02 08:55:31,069 - {urllib3.connectionpool:452} - {DEBUG:set values cp27} - http://192.168.178.207:80 "GET /connect.php HTTP/1.1" 200 455
2024-10-02 08:55:31,071 - {modules.common.req:32} - {DEBUG:set values cp27} - Get-Response: {"date":"2024:10:02-08:55:31","timestamp":1727852131,"powers":[0,0,0],"power_all":0,"currents":[0,0,0],"voltages":[227.51,228.35,225.16],"frequency":50.055,"imported":1645965,"exported":403,"plug_state":false,"charge_state":false,"phases_actual":0,"phases_target":1,"phases_in_use":1,"offered_current":0,"evse_signaling":"basic","v2g_ready":0,"soc_value":null,"soc_timestamp":null,"vehicle_id":null,"rfid_tag":null,"rfid_timestamp":null,"serial":"830892"}
2024-10-02 08:55:31,073 - {modules.common.store._api:26} - {DEBUG:set values cp27} - Raw data ChargepointState(currents=[0, 0, 0], powers=[0, 0, 0], voltages=[227.51, 228.35, 225.16], frequency=50.055, imported=1645965, exported=403, power=0, serial_number=830892, phases_in_use=1, charge_state=False, plug_state=False, rfid=None, rfid_timestamp=None, power_factors=[0.0, 0.0, 0.0], soc=None, soc_timestamp=None, evse_current=0, vehicle_id=None)
2024-10-02 08:55:31,075 - {urllib3.connectionpool:452} - {DEBUG:device19} - http://192.168.178.128:80 "GET /rpc/Shelly.GetStatus HTTP/1.1" 200 734
2024-10-02 08:55:31,081 - {urllib3.connectionpool:452} - {DEBUG:device20} - http://192.168.178.135:80 "GET /rpc/Shelly.GetStatus HTTP/1.1" 200 736
2024-10-02 08:55:31,083 - {modules.common.req:32} - {DEBUG:device19} - Get-Response: {"ble":{},"bthome":{"errors":["observer_disabled"]},"cloud":{"connected":true},"mqtt":{"connected":false},"pm1:0":{"id":0, "voltage":229.5, "current":0.000, "apower":0.0 ,"freq":50.1,"aenergy":{"total":3195.880,"by_minute":[0.000,0.000,0.000],"minute_ts":1727852100},"ret_aenergy":{"total":0.000,"by_minute":[0.000,0.000,0.000],"minute_ts":1727852100}},"sys":{"mac":"ECDA3BC7416C","restart_required":false,"time":"08:55","unixtime":1727852131,"uptime":299986,"ram_size":260472,"ram_free":94092,"fs_size":1048576,"fs_free":618496,"cfg_rev":14,"kvs_rev":5,"schedule_rev":0,"webhook_rev":0,"available_updates":{},"reset_reason":3},"wifi":{"sta_ip":"192.168.178.128","status":"got ip","ssid":"mrhome","rssi":-53},"ws":{"connected":false}}
2024-10-02 08:55:31,086 - {modules.common.req:32} - {DEBUG:device20} - Get-Response: {"ble":{},"bthome":{"errors":["bluetooth_disabled"]},"cloud":{"connected":true},"mqtt":{"connected":false},"pm1:0":{"id":0, "voltage":227.1, "current":0.000, "apower":0.0 ,"freq":50.1,"aenergy":{"total":3023.693,"by_minute":[0.000,0.000,0.000],"minute_ts":1727852100},"ret_aenergy":{"total":0.000,"by_minute":[0.000,0.000,0.000],"minute_ts":1727852100}},"sys":{"mac":"ECDA3BC6E60C","restart_required":false,"time":"08:55","unixtime":1727852131,"uptime":298502,"ram_size":260824,"ram_free":138372,"fs_size":1048576,"fs_free":618496,"cfg_rev":14,"kvs_rev":6,"schedule_rev":0,"webhook_rev":0,"available_updates":{},"reset_reason":3},"wifi":{"sta_ip":"192.168.178.135","status":"got ip","ssid":"mrhome","rssi":-52},"ws":{"connected":false}}
2024-10-02 08:55:31,090 - {modules.devices.shelly.counter:69} - {ERROR:device19} - unsupported shelly device?
Traceback (most recent call last):
File "/var/www/html/openWB/packages/modules/devices/shelly/counter.py", line 51, in update
voltages = [status['em:0'][f'{i}_voltage'] for i in 'abc']
File "/var/www/html/openWB/packages/modules/devices/shelly/counter.py", line 51, in <listcomp>
voltages = [status['em:0'][f'{i}_voltage'] for i in 'abc']
KeyError: 'em:0'
2024-10-02 08:55:31,094 - {modules.devices.shelly.counter:69} - {ERROR:device20} - unsupported shelly device?
Traceback (most recent call last):
File "/var/www/html/openWB/packages/modules/devices/shelly/counter.py", line 51, in update
voltages = [status['em:0'][f'{i}_voltage'] for i in 'abc']
File "/var/www/html/openWB/packages/modules/devices/shelly/counter.py", line 51, in <listcomp>
voltages = [status['em:0'][f'{i}_voltage'] for i in 'abc']
KeyError: 'em:0'
2024-10-02 08:55:31,122 - {modules.devices.sma_sunny_boy.inverter:78} - {DEBUG:device15} - WR 192.168.178.204: InverterState(currents=[0.0, 0.0, 0.0], power=-72, exported=9218804, dc_power=-132)
Code: Alles auswählen
{
"ble": {},
"bthome": {
"errors": [
"observer_disabled"
]
},
"cloud": {
"connected": true
},
"mqtt": {
"connected": false
},
"pm1:0": {
"id": 0,
"voltage": 230.9,
"current": 0,
"apower": 0,
"freq": 50,
"aenergy": {
"total": 3195.88,
"by_minute": [
0,
0,
0
],
"minute_ts": 1727857620
},
"ret_aenergy": {
"total": 0,
"by_minute": [
0,
0,
0
],
"minute_ts": 1727857620
}
},
"sys": {
"mac": "ECDA3BC7416C",
"restart_required": false,
"time": "10:27",
"unixtime": 1727857637,
"uptime": 305492,
"ram_size": 260360,
"ram_free": 89972,
"fs_size": 1048576,
"fs_free": 618496,
"cfg_rev": 14,
"kvs_rev": 5,
"schedule_rev": 0,
"webhook_rev": 0,
"available_updates": {},
"reset_reason": 3
},
"wifi": {
"sta_ip": "192.168.178.128",
"status": "got ip",
"ssid": "mrhome",
"rssi": -53
},
"ws": {
"connected": false
}
}
Ich laufe aktuell auf der letzten release Version, kann das Problem aber auch mit dem aktuellen Alpha nachstellen.
Derweil werde ich die mal mit dem generischen Json-Modul einbinden, das scheint zu klappen. Schön wäre wenn ich später aufs Shelly Modul umsteigen könnte.
Leider komm' ich aktuell nicht dazu mir das selber mal anzuschauen.