Zitat von: the ratman am 11 Februar 2026, 13:37:09es wird! danke dir!Eigentlich kann ich da keinen Unterschied erkennen ... hmm
mit
Code Auswählen Erweiternoff:noArg shellypstripg4-206ef10295f4/rpc {"id":0,"src":"fhem2shelly","method":"Switch.Set","params": {"id":0,"on":false}}\kann ich nun steckdose 0 schalten.
on:noArg shellypstripg4-206ef10295f4/rpc {"id":0,"src":"fhem2shelly","method":"Switch.Set","params": {"id":0,"on":true}}
shellypstripg4_206ef10295f4/rpc{
"id": 0,
"src": "fhem2shelly",
"method": "Switch.Set",
"params": {
"id": 0,
"on": true
}
}seh ich wo mehr?params_events_1_event single_push 2026-02-11 17:44:00sprich:(
[shellypstripg4_206ef10295f4:params_events_1_event] eq "single_push"
and
[wol_LittleBastard] eq "off"
)schaltet mir dieses doif immer wieder mal lustig meinen pc ein.off:selectnumbers,0,1,3,0,lin $DEVICETOPIC/rpc {"id":$EVTPART1,"src":"fhem2shelly","method":"Switch.Set","params": {"id":$EVTPART1,"on":false}}
on:selectnumbers,0,1,3,0,lin $DEVICETOPIC/rpc {"id":$EVTPART1,"src":"fhem2shelly","method":"Switch.Set","params": {"id":$EVTPART1,"on":true}}Zitat von: the ratman am 10 Februar 2026, 20:55:28ich hab doch das device schon in mqtt.Oh, das tut mir leid, das hatte ich überlesen. Aber gut, dass du jetzt jedenfalls die MQTT-Befehle zum Schalten hast!
attr shellypstripg4 shellypstripg4-206ef10295f4Dann kannst du nämlich sowohl in der readingList als auch der setList die Variable $DEVICETOPIC benutzen, was das viel viel besser lesbar macht.off0:noArg $devicetopic/rpc {"id":0,"src":"fhem2shelly","method":"Switch.Set","params": {"id":0,"on":false}}
on0:noArg shellypstripg4-206ef10295f4/rpc {"id":0,"src":"fhem2shelly","method":"Switch.Set","params": {"id":0,"on":true}}
off1:noArg $devicetopic/rpc {"id":1,"src":"fhem2shelly","method":"Switch.Set","params": {"id":0,"on":false}}
on1:noArg shellypstripg4-206ef10295f4/rpc {"id":1,"src":"fhem2shelly","method":"Switch.Set","params": {"id":0,"on":true}}
[usw ...]und dann kannst du mit set shellypstripg4 on0 bzw. set shellypstripg4 on1 die jeweiligen Dosen schalten.off:selectnumbers,0,1,3,0,lin $DEVICETOPIC/rpc {"id":$EVTPART1,"src":"fhem2shelly","method":"Switch.Set","params": {"id":$EVTPART1,"on":false}}
on:selectnumbers,0,1,3,0,lin $DEVICETOPIC/rpc {"id":$EVTPART1,"src":"fhem2shelly","method":"Switch.Set","params": {"id":$EVTPART1,"on":true}}und dann müsstest du z.B. mit set shellypstripg4 on 0 die erste Steckdose einschalten können.off:selectnumbers,1,1,4,0,lin {my $num = $EVTPART1-1; return qq {$DEVICETOPIC/rpc {"id":$num,"src":"fhem2shelly","method":"Switch.Set","params": {"id":$num,"on":false}}}; }
on:selectnumbers,1,1,4,0,lin {my $num = $EVTPART1-1; return qq {$DEVICETOPIC/rpc {"id":$num,"src":"fhem2shelly","method":"Switch.Set","params": {"id":$num,"on":true}}}; }Die erste Steckdose müsste man dann mit set shellypstripg4 on 1 einschalten können.