Shelly Plus 2PM Aktor zur Rollosteuerung reagiert mit MQTT nicht

Begonnen von Gueco315, 11 Januar 2025, 14:26:17

Vorheriges Thema - Nächstes Thema

Gueco315

Hallo Zusammen,

ich muss euch noch einmal belästigen.
Nachdem ich den Shelly unter MQTT2 erfolgreich eingebunden habe, auch die Readings auftauchen und sich auch aktualisieren, lässt der Schalter sich nicht schalten.
Im State bleibt dann zum Beispiel set_open stehen, es wird nicht durchprozessiert.
Was ist hier falsch?

Internals:
   CFGFN     
   CID        shellyRollo
   DEF        shellyRollo
   FUUID      67826e73-f33f-940c-13f9-f1dd2ef429274eaa
   IODev      mqtt2s
   LASTInputDev mqtt2s
   MSGCNT     24
   NAME       shellyRollo
   NR         2647
   STATE      online
pct
   TYPE       MQTT2_DEVICE
   eventCount 43
   mqtt2s_CONN mqtt2s_192.168.1.133_56024
   mqtt2s_MSGCNT 24
   mqtt2s_TIME 2025-01-11 14:24:00
   JSONMAP:
     status_current_pos pct
     status_state state
     status_temperature_tC temperature
   OLDREADINGS:
   READINGS:
     2025-01-11 14:13:23   IODev           mqtt2s
     2025-01-11 14:16:17   attrTemplateVersion 20220623
     2025-01-11 14:24:00   cover_0_aenergy_by_minute_1 0.000
     2025-01-11 14:24:00   cover_0_aenergy_by_minute_2 0.000
     2025-01-11 14:24:00   cover_0_aenergy_by_minute_3 0.000
     2025-01-11 14:24:00   cover_0_aenergy_minute_ts 1736601840
     2025-01-11 14:24:00   cover_0_aenergy_total 9.306
     2025-01-11 14:24:00   cover_0_apower  0.0
     2025-01-11 14:24:00   cover_0_current 0.000
     2025-01-11 14:24:00   cover_0_current_pos 100
     2025-01-11 14:24:00   cover_0_freq    50.0
     2025-01-11 14:24:00   cover_0_id      0
     2025-01-11 14:24:00   cover_0_last_direction open
     2025-01-11 14:24:00   cover_0_pf      0.00
     2025-01-11 14:24:00   cover_0_pos_control true
     2025-01-11 14:24:00   cover_0_source  init
     2025-01-11 14:24:00   cover_0_state   open
     2025-01-11 14:24:00   cover_0_temperature_tC 45.1
     2025-01-11 14:24:00   cover_0_temperature_tF 113.3
     2025-01-11 14:24:00   cover_0_voltage 226.3
     2025-01-11 14:24:00   rpc_dst         shellyRolloErker/events
     2025-01-11 14:24:00   rpc_method      NotifyStatus
     2025-01-11 14:24:00   rpc_params_cover_0_aenergy_by_minute_1 0.000
     2025-01-11 14:24:00   rpc_params_cover_0_aenergy_by_minute_2 0.000
     2025-01-11 14:24:00   rpc_params_cover_0_aenergy_by_minute_3 0.000
     2025-01-11 14:24:00   rpc_params_cover_0_aenergy_minute_ts 1736601840
     2025-01-11 14:24:00   rpc_params_cover_0_aenergy_total 9.306
     2025-01-11 14:24:00   rpc_params_cover_0_id 0
     2025-01-11 14:24:00   rpc_params_ts   1736601840.00
     2025-01-11 14:24:00   rpc_src         shellyplus2pm-d0ef76c74ef8
     2025-01-11 14:17:57   state           set_pct
Attributes:
   cmdIcon    open:fts_shutter_up close:fts_shutter_down stop:fts_shutter_manual half:fts_shutter_50
   comment    Shelly Plus 2 PM in Roller-Mode. 100=opened / 0=closed
   devStateIcon opening:fts_shutter_up@red closing:fts_shutter_down@red true:10px-kreis-gruen false:10px-kreis-rot 0:fts_shutter_100 100:fts_shutter_10 9\d:fts_shutter_10 8\d:fts_shutter_20 7\d:fts_shutter_30 6\d:fts_shutter_40 5\d:fts_shutter_50 4\d:fts_shutter_60 3\d:fts_shutter_70 2\d:fts_shutter_80 1\d:fts_shutter_90 0\d:fts_shutter_100 set_.*:fts_shutter_updown
   devicetopic Shellyrollo
   genericDeviceType blind
   icon       fts_shutter
   jsonMap    status_state:state status_current_pos:pct status_temperature_tC:temperature
   model      shellyPlus_2pm_roller_invert_0
   readingList $DEVICETOPIC/online:.* online
  $DEVICETOPIC/status/mqtt:.* { json2nameValue($EVENT, 'mqtt_', $JSONMAP) }
  $DEVICETOPIC/status/sys:.* { json2nameValue($EVENT, 'sys_', $JSONMAP) }
  $DEVICETOPIC/status/cover_0:.* { json2nameValue($EVENT, 'status_', $JSONMAP) }
  fhem2shelly/rpc:.* {}
shellyRollo:shellyRolloErker/events/rpc:.* { json2nameValue($EVENT, 'rpc_', $JSONMAP) }
shellyRollo:shellyRolloErker/status/cover_0:.* { json2nameValue($EVENT, 'cover_0_', $JSONMAP) }
   room       MQTT2_DEVICE
   setList    open:noArg $DEVICETOPIC/rpc {"id":0,"src":"fhem2shelly","method":"Cover.Open","params": {"id":0}}
  close:noArg $DEVICETOPIC/rpc {"id":0,"src":"fhem2shelly","method":"Cover.Close","params": {"id":0}}
  half:noArg $DEVICETOPIC/rpc {"id":0,"src":"fhem2shelly","method":"Cover.GoToPosition","params": {"id":0,"pos":50}}
  stop:noArg $DEVICETOPIC/rpc {"id":0,"src":"fhem2shelly","method":"Cover.Stop","params": {"id":0}}
  pct:slider,0,1,100 $DEVICETOPIC/rpc {"id":0,"src":"fhem2shelly","method":"Cover.GoToPosition","params": {"id":0,"pos":$EVTPART1}}
  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}}}}
   setStateList open close half stop pct
   stateFormat online
pct
   webCmd     :open:close:half:stop:pct

Danke und Gruß
Günter
Fhem 6.0, JeeLink, CUL 868 auf Raspi 4, Buster, IT-1500, 4x SB_Player, Squeezebox auf Raspi 4, 3x Fritzbox,  WIFI Light, EGPM2LAN, ENIGMA, Sec-SCO,CC-RT-DN,TC-IT-WM-W-EU,SEN-Wa-Od,ES-PMSw1-PW,HM-SE, Sonoff, Shelly,SMA

Gueco315

Die Lösung ist:

Das Attribut devicetopic ist gleich dem MQTT prefix in den MQTT Settings im Shelly.

Beispiel: Readinglist unter MQTT2:
shellyRollo:shellyRolloErker/online:.* online
shellyRollo:shellyRolloErker/status/ble:.* ble

bedeutet: shellyRollo = Client ID
          shellyRolloErker = MQTT prefix

So zumindest funktioniert es bei mir einwandfrei.

Gruß Günter


Fhem 6.0, JeeLink, CUL 868 auf Raspi 4, Buster, IT-1500, 4x SB_Player, Squeezebox auf Raspi 4, 3x Fritzbox,  WIFI Light, EGPM2LAN, ENIGMA, Sec-SCO,CC-RT-DN,TC-IT-WM-W-EU,SEN-Wa-Od,ES-PMSw1-PW,HM-SE, Sonoff, Shelly,SMA

dianereese

Zitat von: Gueco315 am 11 Januar 2025, 15:20:05Die Lösung ist:

Das Attribut devicetopic ist gleich dem MQTT prefix in den MQTT Settings im Shelly.

Beispiel: Readinglist unter MQTT2:
shellyRollo:shellyRolloErker/online:.* online
shellyRollo:shellyRolloErker/status/ble:.* ble

bedeutet: shellyRollo = Client ID
slope shellyRolloErker = MQTT prefix

So zumindest funktioniert es bei mir einwandfrei.

Gruß Günter



Thank you for sharing, I was also facing this problem and now I found the solution from you