Hi,
I'm trying to get my Sonoff, flashed with ESPeasy, to turn on and off.
I'm a NOOB with this and can't figure out what I'm doing wrong.
OpenHabian2 and MQTT on RPi 3, a Sonoff with ESPeasy.
In OpenHab items:
Switch Sonoff1 {mqtt=">[mymosquitto:/Sonoff_1/gpio/12:command:ON:1],>[mymosquitto:/Sonoff_1/gpio/12:command:OFF:0]"}
will let me turn on and off the Sonoff in OpenHab. (using gpio/12)
But if I set up the ESPeasy as follows:
and the item as:
Switch Sonoff1 {mqtt=">[mymosquitto:/Sonoff_1/SonoffSwitch/Command:command:ON:1],>[mymosquitto:/Sonoff_1/SonoffSwitch/Command:command:OFF:0]”}
Then I can't turn the Sonoff On or Off. (using "SonoffSwitch/Command" instead of "gpio/12")
I have the same issue with a NodeMCU (ESPeasy) and a LED, so I must be doing something wrong, but I just don't see it.
Any help appreciated.
FYI, here the main page setup as info:
Cheers,
Ron.
ESPeasy switch not working with OpenHab MQTT
Moderators: grovkillen, Stuntteam, TD-er
-
- New user
- Posts: 2
- Joined: 28 Feb 2017, 09:50
Re: ESPeasy switch not working with OpenHab MQTT
Take a look at the command reference:
GPIO (pinnumber),(value) is a command,
(devicename) (valuename),(value) is not - it is a sensor which sends its value back to the broker.
If you want to use something less cryptic in Openhab then wrap the gpio command in a rule and call that via mttq.
GPIO (pinnumber),(value) is a command,
(devicename) (valuename),(value) is not - it is a sensor which sends its value back to the broker.
If you want to use something less cryptic in Openhab then wrap the gpio command in a rule and call that via mttq.

-
- New user
- Posts: 2
- Joined: 28 Feb 2017, 09:50
Re: ESPeasy switch not working with OpenHab MQTT
Like I said I'm a Newbie and have to digest this for a moment, but basically you say that I'm using an "Input/read reference setup" for an "Output (On/Off or value) reference setup" and that's why this doesn't work.paxi wrote:Take a look at the command reference:
GPIO (pinnumber),(value) is a command,
(devicename) (valuename),(value) is not - it is a sensor which sends its value back to the broker.
If you want to use something less cryptic in Openhab then wrap the gpio command in a rule and call that via mttq.
(Not sure if I just made it clearer or 'clear as mud' with that statement

So I AM doing this wrong

Ah well... one learns something new every day.
Thanks paxi
Re: ESPeasy switch not working with OpenHab MQTT
If you see input/output in the above statement from the broker's perspective that's right.
Always a joy to let these little lightbulbs glow in other peoples mind.

Always a joy to let these little lightbulbs glow in other peoples mind.

Who is online
Users browsing this forum: Google [Bot] and 19 guests