Re: ShellyPlus2PM frage nach MQTT Thing
Verfasst: 16. Feb 2025 22:29
Ah. Dann schreibst Du in formatBeforePublish einfach pos,%s und es sollte funktionieren.
Code: Alles auswählen
commandTopic="shellyplus2pm-c4d8d5517818/command/cover:0", formatBeforePublish="pos,%s"
Code: Alles auswählen
pos,40
Code: Alles auswählen
transformationPatternOut="DSL:|\"pos,\"+input"
Code: Alles auswählen
(function(data) {
return "pos," + data;
})(input);
Code: Alles auswählen
transformationPatternOut="JS:posOut.js"
Code: Alles auswählen
[WARN ] [t.generic.ChannelStateTransformation] - Executing the JSONPATH-transformation failed: Invalid path '$.pos' in '40'
Code: Alles auswählen
http://192.168.xxx.xxx/roller/0?go=to_pos&roller_pos=75
Code: Alles auswählen
{http=">[ON:POST:http://192.168.2.42/relay/0?turn=on] >[OFF:POST:http://192.168.2.42/relay/0?turn=off]"}
Code: Alles auswählen
http://192.168.xxx.xxx/roller/0?go=to_pos&roller_pos=s%