Hi,
i could need a helping hand regarding my Sonoff. I can subscrube to it, but i just dont get the hang of how to publish, i can not switch that switch
I have flashed the Sonoff with espeasy (120), and i am able to subscribe to the uptime and make that visible in my sitemap. My problem is that i just cant figure out how to publish to it, i have never been able to trigger the relay.
My items:
Switch sonoff1 "Sonoff Switch 1 [%s]" {mqtt=">[mosquitto:sonoff1/lightSwitch/gpio/0:command:ON:1],>[mosquitto:sonoff1/lightSwitch/gpio/0:command:OFF:0]"}
String sonoffUptime "sonoffUptime [%s]" {mqtt="<[mosquitto:sonoff1/uptime/Minutes:state:default]"}
Configuration of the Sonoff:
Config:
sonoff1 (Name), 1 (Unit Nr), openHAB MQTT (Protocoll), IP, Port and Credentials of my broker
Devices:
1: Switch Input, lightSwitch (name), 1 (idx), GPIO-0, Switch (Switch Type), Normal Switch (Switch Button Type), Switch (Variable Name).
2: System Info, uptime (name), 3 (idx), Minutes (Variable Name)
Tools -> Advanced:
%sysname%/# (Subscribe Template), %sysname%/%tskname%/%valname% (publish template)
I tried alot of things, like only using the name and gpio in the items, i tried to put in the variable name (Switch), i used different GPIOs, … i tried basicly everything i could find on the web, but i cant get that thing working besides getting the uptime. I tried to send commands with mosquitto_pub, but i cant get it working either (only uptime).
Any ideas?
Thank you in advance!!