Shelly1PM "plaudert" zu viel

Begonnen von rallye, 30 April 2025, 15:14:38

Vorheriges Thema - Nächstes Thema

rallye

Hallo!

Ich betreibe viele Shellies, aber nur EINEN Shelly1PM Pro. Und dieser verhält sich auffällig "komisch", da er im Sekundentakt params_events_1_data_*_*_* updated. Ich hatte den Shelly bereits aus meiner Konfiguration gelöscht und neu anlegen lassen - mit dem Template shellyPlus1_pm versehen, und mit dem selben Ergebnis (Update im Sekundentakt) wieder erstellt. Meine Hoffnung, dass ich irgendwann einen Fehler gemacht und das Template überschrieben habe hat sich leider nicht bewahrheitet.
Dafür sehe ich bei diesem Shelly die IP Adresse nicht, die ich bei allen anderen Shellie sehr wohl habe.
Kann mit bitte jemand sagen ob bzw. was ich falsch mache?
defmod SW.Poolpumpe MQTT2_DEVICE SH_PoolpumpePM
attr SW.Poolpumpe IODev MQTT_Shellies
attr SW.Poolpumpe alexaName Poolpumpe
attr SW.Poolpumpe alias Poolpumpe
attr SW.Poolpumpe comment Nach Typenschild:\
Type:BADU 90/11 We\
Leistung: 0,45kW/0,69kW\
H.max: 14.0m\
Durchflussmenge: 11m3/h\
\
Anpassungen:\
\
event_on_change_reading => um die "Gesprächigkeit" des Shelly zu reduzieren\
\
userReadings apower_Wh => wird für SolarForecast benötigt\
\
userReadings device_OnOffTime => die Zeit in Sekunden zwischen 2 Schaltzyklen (on/off)\
\
userReadings device_OnTime => die kumulierte Einschaltzeit (seit dem letzten "reset", für die Poolpume sollte dies täglich um Mitternacht auf 0 gesetzt werden) \
\
timestamp-on-change-reading => damit der Shelly nicht alle 30 Sekunden das Reading state incl. timestamp\
                               aktualisiert und somit die echte Ein- bzw. Ausschaltdauer berechnet\
                               werden kann\
\
\
Erweiterungen nach Anwendung des Templates:\
event_on_change_reading .*\
webCmd on:off\
timestamp-on-change-reading state\
userReadings apower_Wh:apower.* monotonic { sprintf "%.0f", ReadingsVal ($name, 'apower', 0) / 60 }\
userReadings device_OnOffTime:output:.* difference {time_str2num(ReadingsTimestamp($NAME,"state","--?--"))}\
userReadings device_OnTime:output:.* {(ReadingsVal($NAME,"output","xxx")) ne "true" ? (ReadingsVal($NAME,"device_OnOffTime","--?--")) + (ReadingsVal($NAME,"device_OnTime","--?--")) : (ReadingsVal($NAME,"device_OnTime","--?--"))}\
\
\
-------------------\
Anmerkung: device_OnOffTime & device_OnTime verwenden das Reading "output", da auf "state" kein Event generiert wird. Ob "output" das korrekte Reading ist, ist nicht gesichert, doch es verhält sich im Event Monitor wie "state" mit identischen Timestamps
attr SW.Poolpumpe devStateIcon {my $onl = ReadingsVal($name,'online','false') eq 'false'?'10px-kreis-rot':'10px-kreis-gruen';; $onl = FW_makeImage($onl);; my $light = FW_makeImage(ReadingsVal($name,'state','off'));; my $temp = ReadingsVal($name,'temperature','-100');; my $ip = ReadingsVal($name,'ip','none');; my $reb = ReadingsVal($name,'sys_restart_required','false') eq 'true'?'<a href="/fhem?cmd.dummy=set '.$name.' x_reboot&XHR=1"> ... Notwendigen Reboot durchführen</a>':'';; qq(<a href="http://$ip" target="_blank">${onl}</a><a href="/fhem?cmd.dummy=set $name toggle&XHR=1">${light}</a>$reb<div>Temp: $temp °C</div>)}
attr SW.Poolpumpe devicetopic shellyplus1pm-cc7b5c84d3d0
attr SW.Poolpumpe event-on-change-reading .*
attr SW.Poolpumpe genericDeviceType switch
attr SW.Poolpumpe getList in_mode:noArg in_mode $DEVICETOPIC/rpc {"id": 1,"src":"$DEVICETOPIC", "method": "Switch.GetConfig", "params": {"id": 0}}
attr SW.Poolpumpe group Schwimmbad
attr SW.Poolpumpe icon scene_pool@1F85DE
attr SW.Poolpumpe jsonMap switch_state:state switch_aenergy_total:aenergy_total switch_apower:apower switch_temperature_tC:temperature switch_temperature_tF:0 params_wifi_sta_ip:ip params_switch_0_temperature_tC:temperature params_switch_0_temperature_tF:0 result_in_mode:in_mode
attr SW.Poolpumpe model shellyPlus_1pm
attr SW.Poolpumpe readingList $DEVICETOPIC/online:.* online\
  $DEVICETOPIC/events/rpc:.* { json2nameValue($EVENT,'',$JSONMAP) }\
  $DEVICETOPIC/status/mqtt:.* { json2nameValue($EVENT, 'mqtt_', $JSONMAP) }\
  $DEVICETOPIC/status/sys:.* { json2nameValue($EVENT, 'sys_', $JSONMAP) }\
  $DEVICETOPIC/status/switch_0:.* { $EVENT =~ s/"output":true/"state":"on"/g;; $EVENT =~ s/"output":false/"state":"off"/g;; json2nameValue($EVENT, 'switch_', $JSONMAP) }\
  $DEVICETOPIC/status/cloud:.* {}\
  $DEVICETOPIC/rpc:.* { json2nameValue($EVENT, 'req_', $JSONMAP, 'in_mode')}\
  $DEVICETOPIC/status/input_0:.* { json2nameValue($EVENT, 'input_', $JSONMAP) }\
  fhem2shelly/rpc:.* {}\
SH_PoolpumpePM:shellyplus1pm-cc7b5c84d3d0/status/script_1:.* { json2nameValue($EVENT) }
attr SW.Poolpumpe room Infrastruktur
attr SW.Poolpumpe setList toggle:noArg $DEVICETOPIC/rpc {"id":0,"src":"fhem2shelly","method":"Switch.Toggle","params": {"id":0}}\
  off:noArg $DEVICETOPIC/rpc {"id":0,"src":"fhem2shelly","method":"Switch.Set","params": {"id":0,"on":false}}\
  on:noArg $DEVICETOPIC/rpc {"id":0,"src":"fhem2shelly","method":"Switch.Set","params": {"id":0,"on":true}}\
  on-for-timer $DEVICETOPIC/rpc {"id":0,"src":"fhem2shelly","method":"Switch.Set","params": {"id":0,"on":true,"toggle_after":$EVTPART1}}\
  off-for-timer $DEVICETOPIC/rpc {"id":0,"src":"fhem2shelly","method":"Switch.Set","params": {"id":0,"on":false,"toggle_after":$EVTPART1}}\
  in_mode:toggle,flip,detached {fhem("sleep 0.2;; get $NAME in_mode");; my $val = $EVTPART1 ne 'toggle' ? $EVTPART1 : ReadingsVal($NAME,'in_mode','flip') eq 'flip' ? 'detached':'flip';; qq($DEVICETOPIC/rpc {"id":1,"src":"fhem2shelly","method":"Switch.SetConfig","params": {"id":0, "config": {"in_mode": "$val"}}})}\
  x_update:noArg $DEVICETOPIC/rpc {"id":0,"src":"fhem2shelly","method":"Shelly.Update","params": {"stage":"stable"}}\
  x_reboot:noArg $DEVICETOPIC/rpc {"id":0,"src":"fhem2shelly","method":"Shelly.Reboot"}\
  x_eco:true,false $DEVICETOPIC/rpc {"id":0,"src":"fhem2shelly","method":"Sys.SetConfig","params": {"config": {"device": {"eco_mode": $EVTPART1}}}}
attr SW.Poolpumpe setStateList on off toggle on-for-timer off-for-timer
attr SW.Poolpumpe sortby 3
attr SW.Poolpumpe timestamp-on-change-reading state
attr SW.Poolpumpe userReadings apower_Wh:apower.* monotonic { sprintf "%.0f", ReadingsVal ($name, 'apower', 0) / 60 }, device_OnOffTime:output:.* difference {time_str2num(ReadingsTimestamp($NAME,"state","--?--"))}, device_OnTime:output:.* {(ReadingsVal($NAME,"output","xxx")) ne "true" ? (ReadingsVal($NAME,"device_OnOffTime","--?--")) + (ReadingsVal($NAME,"device_OnTime","--?--")) : (ReadingsVal($NAME,"device_OnTime","--?--"))}
attr SW.Poolpumpe webCmd on:off

setstate SW.Poolpumpe off
setstate SW.Poolpumpe 2025-04-30 14:49:41 IODev MQTT_Shellies
setstate SW.Poolpumpe 2025-04-30 14:56:02 Sommerbetrieb 1
setstate SW.Poolpumpe 2025-04-30 15:09:59 aenergy_total 569990.628
setstate SW.Poolpumpe 2025-04-30 15:09:59 apower 0.0
setstate SW.Poolpumpe 2025-04-30 14:43:34 attrTemplateVersion 20220303
setstate SW.Poolpumpe 2025-04-30 15:10:56 dst shellyplus1pm-cc7b5c84d3d0/events
setstate SW.Poolpumpe 2025-04-30 14:43:46 id 1
setstate SW.Poolpumpe 2025-04-30 14:43:46 mem_free 24710
setstate SW.Poolpumpe 2025-04-30 14:43:46 mem_peak 784
setstate SW.Poolpumpe 2025-04-30 14:43:46 mem_used 476
setstate SW.Poolpumpe 2025-04-30 15:10:56 method NotifyEvent
setstate SW.Poolpumpe 2025-04-30 14:43:40 mqtt_connected true
setstate SW.Poolpumpe 2025-04-30 14:43:40 online true
setstate SW.Poolpumpe 2025-04-30 15:10:56 params_events_1_component script:1
setstate SW.Poolpumpe 2025-04-30 15:10:56 params_events_1_data_1 2
setstate SW.Poolpumpe 2025-04-30 15:10:56 params_events_1_data_2_1_1 d0:7e:36:b3:b7:03
setstate SW.Poolpumpe 2025-04-30 15:10:56 params_events_1_data_2_1_2 -82
setstate SW.Poolpumpe 2025-04-30 15:10:56 params_events_1_data_2_1_3 Hv9MABIZauYjTpUF1aYDVw1T9MZ/FQitYdJgYW0C7Q==
setstate SW.Poolpumpe 2025-04-30 15:10:56 params_events_1_data_2_1_4
setstate SW.Poolpumpe 2025-04-30 15:10:56 params_events_1_data_2_2_1 78:ba:4c:a0:c7:6a
setstate SW.Poolpumpe 2025-04-30 15:10:56 params_events_1_data_2_2_2 -86
setstate SW.Poolpumpe 2025-04-30 15:10:56 params_events_1_data_2_2_3 AgEaAgoECv9MABAFERgvdgg=
setstate SW.Poolpumpe 2025-04-30 15:10:56 params_events_1_data_2_2_4
setstate SW.Poolpumpe 2025-04-30 15:10:55 params_events_1_data_2_3_1 73:6d:e1:7b:b4:6d
setstate SW.Poolpumpe 2025-04-30 15:10:55 params_events_1_data_2_3_2 -78
setstate SW.Poolpumpe 2025-04-30 15:10:55 params_events_1_data_2_3_3 AgEaF/9MAAkIEwPAqDmVG1gWCAAmSEKoiwCi
setstate SW.Poolpumpe 2025-04-30 15:10:55 params_events_1_data_2_3_4
setstate SW.Poolpumpe 2025-04-30 15:10:53 params_events_1_data_2_4_1 43:61:98:96:df:27
setstate SW.Poolpumpe 2025-04-30 15:10:53 params_events_1_data_2_4_2 -83
setstate SW.Poolpumpe 2025-04-30 15:10:53 params_events_1_data_2_4_3 AgEaAgoMDP9MABAHPR9MHsBHKA==
setstate SW.Poolpumpe 2025-04-30 15:10:53 params_events_1_data_2_4_4
setstate SW.Poolpumpe 2025-04-30 15:10:53 params_events_1_data_2_5_1 f3:33:4f:41:65:0e
setstate SW.Poolpumpe 2025-04-30 15:10:53 params_events_1_data_2_5_2 -74
setstate SW.Poolpumpe 2025-04-30 15:10:53 params_events_1_data_2_5_3 AgEEAwMH/hT/pwUGABIgKADKAAAQAAAAAAAAAAIKAA==
setstate SW.Poolpumpe 2025-04-30 15:10:53 params_events_1_data_2_5_4 DP+nBTw7WFR3zDOu6QwJUzE4IEY0NDIgTEU=
setstate SW.Poolpumpe 2025-04-30 14:55:18 params_events_1_data_2_6_1 d5:34:40:46:4d:82
setstate SW.Poolpumpe 2025-04-30 14:55:18 params_events_1_data_2_6_2 -81
setstate SW.Poolpumpe 2025-04-30 14:55:18 params_events_1_data_2_6_3 AgEGEQlHb3ZlZV9INjA3Nl80RDgyCP8CiOwAAQEA
setstate SW.Poolpumpe 2025-04-30 14:55:18 params_events_1_data_2_6_4
setstate SW.Poolpumpe 2025-04-30 14:55:18 params_events_1_data_2_7_1 71:56:41:76:b0:82
setstate SW.Poolpumpe 2025-04-30 14:55:18 params_events_1_data_2_7_2 -84
setstate SW.Poolpumpe 2025-04-30 14:55:18 params_events_1_data_2_7_3 AgEaG/9MAAwOCPAWpy4TuGpWAhmjtXsQBkgdROtjSA==
setstate SW.Poolpumpe 2025-04-30 14:55:18 params_events_1_data_2_7_4
setstate SW.Poolpumpe 2025-04-30 14:55:18 params_events_1_data_2_8_1 69:28:52:84:c9:00
setstate SW.Poolpumpe 2025-04-30 14:55:18 params_events_1_data_2_8_2 -86
setstate SW.Poolpumpe 2025-04-30 14:55:18 params_events_1_data_2_8_3 AgEaAgoMC/9MABAGCx3YBRQo
setstate SW.Poolpumpe 2025-04-30 14:55:18 params_events_1_data_2_8_4
setstate SW.Poolpumpe 2025-04-30 15:10:56 params_events_1_event ble.scan_result
setstate SW.Poolpumpe 2025-04-30 15:10:56 params_events_1_id 1
setstate SW.Poolpumpe 2025-04-30 14:43:34 params_events_1_time_ms 996
setstate SW.Poolpumpe 2025-04-30 15:10:56 params_events_1_ts 1746018656.13
setstate SW.Poolpumpe 2025-04-30 14:43:40 params_mqtt_connected true
setstate SW.Poolpumpe 2025-04-30 14:43:46 params_script_1_id 1
setstate SW.Poolpumpe 2025-04-30 14:43:46 params_script_1_running true
setstate SW.Poolpumpe 2025-04-30 15:09:59 params_switch_0_aenergy_by_minute_1 0.000
setstate SW.Poolpumpe 2025-04-30 15:09:59 params_switch_0_aenergy_by_minute_2 0.000
setstate SW.Poolpumpe 2025-04-30 15:09:59 params_switch_0_aenergy_by_minute_3 0.000
setstate SW.Poolpumpe 2025-04-30 15:09:59 params_switch_0_aenergy_minute_ts 1746018600
setstate SW.Poolpumpe 2025-04-30 15:09:59 params_switch_0_aenergy_total 569990.628
setstate SW.Poolpumpe 2025-04-30 15:09:59 params_switch_0_apower 0.0
setstate SW.Poolpumpe 2025-04-30 15:09:59 params_switch_0_current 0.000
setstate SW.Poolpumpe 2025-04-30 15:09:59 params_switch_0_id 0
setstate SW.Poolpumpe 2025-04-30 15:09:59 params_switch_0_voltage 236.5
setstate SW.Poolpumpe 2025-04-30 14:43:52 params_sys_available_updates_beta_version 1.6.0-beta2
setstate SW.Poolpumpe 2025-04-30 14:43:40 params_sys_last_sync_ts 1746017020
setstate SW.Poolpumpe 2025-04-30 14:43:40 params_sys_time 14:43
setstate SW.Poolpumpe 2025-04-30 14:43:40 params_sys_unixtime 1746017020
setstate SW.Poolpumpe 2025-04-30 15:10:56 params_ts 1746018656.13
setstate SW.Poolpumpe 2025-04-30 14:43:46 running true
setstate SW.Poolpumpe 2025-04-30 15:10:56 src shellyplus1pm-cc7b5c84d3d0
setstate SW.Poolpumpe 2025-04-30 14:53:00 state off
setstate SW.Poolpumpe 2025-04-30 15:09:59 switch_aenergy_by_minute_1 0.000
setstate SW.Poolpumpe 2025-04-30 15:09:59 switch_aenergy_by_minute_2 0.000
setstate SW.Poolpumpe 2025-04-30 15:09:59 switch_aenergy_by_minute_3 0.000
setstate SW.Poolpumpe 2025-04-30 15:09:59 switch_aenergy_minute_ts 1746018600
setstate SW.Poolpumpe 2025-04-30 15:09:59 switch_current 0.000
setstate SW.Poolpumpe 2025-04-30 15:09:59 switch_id 0
setstate SW.Poolpumpe 2025-04-30 15:09:59 switch_source init
setstate SW.Poolpumpe 2025-04-30 15:09:59 switch_voltage 236.5
setstate SW.Poolpumpe 2025-04-30 14:43:52 sys_available_updates_beta_version 1.6.0-beta2
setstate SW.Poolpumpe 2025-04-30 14:43:52 sys_btrelay_rev 0
setstate SW.Poolpumpe 2025-04-30 14:43:52 sys_cfg_rev 42
setstate SW.Poolpumpe 2025-04-30 14:43:52 sys_fs_free 110592
setstate SW.Poolpumpe 2025-04-30 14:43:52 sys_fs_size 393216
setstate SW.Poolpumpe 2025-04-30 14:43:52 sys_kvs_rev 0
setstate SW.Poolpumpe 2025-04-30 14:43:52 sys_last_sync_ts 1746017020
setstate SW.Poolpumpe 2025-04-30 14:43:52 sys_mac CC7B5C84D3D0
setstate SW.Poolpumpe 2025-04-30 14:43:52 sys_ram_free 114560
setstate SW.Poolpumpe 2025-04-30 14:43:52 sys_ram_min_free 106596
setstate SW.Poolpumpe 2025-04-30 14:43:52 sys_ram_size 268460
setstate SW.Poolpumpe 2025-04-30 14:43:52 sys_reset_reason 3
setstate SW.Poolpumpe 2025-04-30 14:43:52 sys_restart_required false
setstate SW.Poolpumpe 2025-04-30 14:43:52 sys_schedule_rev 1
setstate SW.Poolpumpe 2025-04-30 14:43:52 sys_time 14:43
setstate SW.Poolpumpe 2025-04-30 14:43:52 sys_unixtime 1746017032
setstate SW.Poolpumpe 2025-04-30 14:43:52 sys_uptime 15
setstate SW.Poolpumpe 2025-04-30 14:43:52 sys_webhook_rev 0
setstate SW.Poolpumpe 2025-04-30 15:09:59 temperature 89.3
setstate SW.Poolpumpe 2025-04-30 14:43:34 x_reboot set

RaspiPi v4, HM-LGW, 6x HM-TC-IT-WM-W-EU, 11x HM-CC-RT-DN, 1x HUE Bridge, 4x HUE-RC, 5x HUE White&Color, 15xHUE White, 3xHM-LC-SW1-FM, 1xHM-LC-SW2-FM, 1x ConBeeII, 15x Shelly1, 5xShellyplug, Aquara: 2x Temp-Sensor, 1x Vibrationssensor, 2x Lichtsensor, 19x Tür/Fenstersensor

betateilchen

Das meiste scheinen Bluetooth Daten zu sein, schalte doch BT mal ab und teste, ob es dann ruhiger wird
-----------------------
Formuliere die Aufgabe möglichst einfach und
setze die Lösung richtig um - dann wird es auch funktionieren.
-----------------------
Lesen gefährdet die Unwissenheit!

rallye

#2
Zitat von: betateilchen am 30 April 2025, 15:53:49Das meiste scheinen Bluetooth Daten zu sein, schalte doch BT mal ab und teste, ob es dann ruhiger wird
Ja, wenn ich BT abschalte wird es still. Zumindest für eine Weile. Gefühlt 5 Minuten nach dem Reboot ist BT wieder enabled. Ich habe es sowohl in der App als auch im WI versucht - dauerhaft ist das BT  nicht abzuschalten (oder "irgendwer" schaltet es hinterrücks wieder ein)

EDIT: Ich lese gerade in der Handy-App, dass das BT-GW ab FW 1.5.0 durchgängig aktiviert ist. Damit ist der Übeltäter, der "hinterrücks" BT wieder enabelt entlarvt.
Kann ich - um die "Plauderei" zu beenden nicht das "  $DEVICETOPIC/events/rpc:.* { json2nameValue($EVENT,'',$JSONMAP) }! aus der "readinList" einfach entfernen?
Und wie komme ich zu einem Reading das die IP-Adresse anzeigt?

Danke
RaspiPi v4, HM-LGW, 6x HM-TC-IT-WM-W-EU, 11x HM-CC-RT-DN, 1x HUE Bridge, 4x HUE-RC, 5x HUE White&Color, 15xHUE White, 3xHM-LC-SW1-FM, 1xHM-LC-SW2-FM, 1x ConBeeII, 15x Shelly1, 5xShellyplug, Aquara: 2x Temp-Sensor, 1x Vibrationssensor, 2x Lichtsensor, 19x Tür/Fenstersensor

betateilchen

#3
Zitat von: rallye am 30 April 2025, 17:20:15Kann ich - um die "Plauderei" zu beenden nicht das "  $DEVICETOPIC/events/rpc:.* { json2nameValue($EVENT,'',$JSONMAP) }! aus der "readinList" einfach entfernen?

Klar kannst Du das. Du musst nur darauf achten, dass es nicht durch ein irgendwo gesetztes autocreate wieder automatisch erzeugt wird.
Man kann den rpc channel wohl auch direkt im Shelly abschalten.

Zitat von: rallye am 30 April 2025, 17:20:15Und wie komme ich zu einem Reading das die IP-Adresse anzeigt?

Du musst halt rausfinden, in welchem topic die IP Adresse übertragen wird und das dann ggf. auch manuell in die readingList eintragen.

Edit: schau mal auf https://shelly-api-docs.shelly.cloud/gen2/ComponentsAndServices/Mqtt/ und scrolle ganz nach unten. Die IP scheint als "sta_ip" in einem topic ".../wifi" zu stecken
-----------------------
Formuliere die Aufgabe möglichst einfach und
setze die Lösung richtig um - dann wird es auch funktionieren.
-----------------------
Lesen gefährdet die Unwissenheit!