Openhab MQTT not set switch

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
icedeath82
New user
Posts: 1
Joined: 02 Nov 2016, 08:45

Openhab MQTT not set switch

#1 Post by icedeath82 » 02 Nov 2016, 09:17

Good morning, I would like to say that I must translate with a Translator since my english is not so good. To my problem I use openhab2 on a windows server. Installed is Openhab2, Windows 10, mosquitto-1.4.10. The queries with mqtt for temperature and switch status work. But when I openhab in the swich on on site esp easy does not. And sets the value back to zero. Here a log.

mosquitto log:

Code: Select all

1478073340: Received PUBLISH from OPENHAB (d0, q0, r1, m0, '/newdevice/Ledrot/Switch', ... (1 bytes))
1478073340: Sending PUBLISH to ESPClient1 (d0, q0, r0, m0, '/newdevice/Ledrot/Switch', ... (1 bytes))
openhab log

Code: Select all

2016-11-02 08:58:24.344 [WARN ] [b.core.events.EventPublisherDelegate] - given new state is NULL, couldn't post update for 'Light_WW_Wohnzimmer_rgb'
Openhab Item

Code: Select all

Switch Light_WW_Wohnzimmer_rgb				"Power" 	 { mqtt="<[mosquitto:/newdevice/Ledrot/Switch:state:MAP(onoff.map)],>[mosquitto:/newdevice/Ledrot/Switch:command:ON:1],>[mosquitto:/newdevice/Ledrot/Switch:command:OFF:0]" }
If I now with MQTT SPY the value 1 send is not synonymous switched.

Image
http://www.home-h1z1.de/index.php/s/VKZFbchnEUELGp6

Image

Image

Image

timsson
Normal user
Posts: 77
Joined: 25 Mar 2016, 22:00

Re: Openhab MQTT not set switch

#2 Post by timsson » 02 Nov 2016, 17:19

Hi,
can you tesing 3 things?
-whats with gipio direktly: mqtt="<[mosquitto:/newdevice/gpio/2:state:MAP(onoff.map)],
-do you use the right openhab, ip and user/password at the config-site?
-whats with Tools/command: publish /newdevice/gpio/2,1?
regards Tim

Post Reply

Who is online

Users browsing this forum: No registered users and 24 guests