I’ve managed to set up Mosquitto on my RPI3 and it appears to be working. I also installed ESPEasy on a ESP-01 with a DHT11 sensor. The sensor reads both Temp and Humidity correctly:
When you say your variables are not being populated, do you mean you cannot see the value in your sitemap/UI or the actual items are not being updated?
Can you check the openhab event.log to see if those items are being updated?
Do you have any ACLs configured which might restrict openhab for subscribing to those topics?
Last thing, I am not sure if you need a space between the item description and the value formatting, e.g. Humidity[%0.f %%]. You might want to try Humidity [%.0f %%].
have you set the Protocol etc in ESPEasy? these are my settings…
BTW. I have had this combo running for a while no dramas. ESPEasy can be a bit of dog to get going hint: try resetting the board when things don’t work
Also I haven’t set a client id in the config file.
… and don’t forget to set the unit nr under config tab to a different value than zero (and if you have more than one esp8266 to a different nr than your other devices). This applies also to the IDX/Variable nr under the devices tab: they must not be zero and different from other sensors (I see that you have already set it to “1”).
BUT: because you already are able to see your data in your shell by subscribing to the topic, this can’t actually be the problem.
So maybe you should post your rules where your are setting up your variables to see it there is a problem.
Otherwise a simple
Text item=esp_outdoor_fr_temp
Text item=esp_outdoor_fr_hum
in your sitemap should already show you the temp and hum data …
The variables are not showing that they are updating so the sensor values are not being assigned to them. I changed my items definition to ‘String’ just to make sure but still nothing. You can see my items definition in the OP. I am not using any rules but I’m guessing you’re asking about the items definition.
It’s odd because I can see the messages on the RPI but it’s like the MQTT binding isn’t picking them up. I’m not sure if I have something misconfigured. I started in debug mode and this is what I get from openhab.log when grepping for ‘-i mqtt’:
08:13:54.779 [DEBUG] [.io.transport.mqtt.MqttService:123 ] - Starting MQTT Service...
08:13:54.831 [INFO ] [.io.transport.mqtt.MqttService:108 ] - MQTT Service initialization completed.
08:13:54.834 [INFO ] [o.i.t.m.i.MqttBrokerConnection:114 ] - Starting MQTT broker connection 'broker'
08:13:54.849 [DEBUG] [o.i.t.m.i.MqttBrokerConnection:294 ] - Creating new client for 'tcp://localhost:1883' using id 'openhab' and file store '/tmp/broker'
08:14:52.311 [DEBUG] [.a.mqtt.internal.MqttActivator:34 ] - Mqtt action has been started.
08:15:04.196 [DEBUG] [riptExtensionClassNameProvider:63 ] - Script actions have changed: ExecActionService, PingActionService, MqttActionService, AudioActionService, TransformationActionService, HTTPActionService,
08:15:11.297 [DEBUG] [riptExtensionClassNameProvider:63 ] - Script actions have changed: ExecActionService, PingActionService, MqttActionService, AudioActionService, TransformationActionService, HTTPActionService, MyOpenHABServiceImpl,
08:15:11.815 [DEBUG] [riptExtensionClassNameProvider:63 ] - Script actions have changed: ExecActionService, PingActionService, MqttActionService, AudioActionService, TransformationActionService, imperiHabActionService, AstroActionService, HTTPActionService, MyOpenHABServiceImpl,
08:15:14.467 [DEBUG] [riptExtensionClassNameProvider:63 ] - Script actions have changed: ExecActionService, PingActionService, MqttActionService, AudioActionService, TransformationActionService, MailActionService, imperiHabActionService, AstroActionService, HTTPActionService, MyOpenHABServiceImpl,
1471439823: mosquitto version 1.4.9 (build date Fri, 03 Jun 2016 09:02:12 +0100) starting
1471439823: Config loaded from /etc/mosquitto/mosquitto.conf.
1471439823: Opening ipv4 listen socket on port 1883.
1471439823: Opening ipv6 listen socket on port 1883.
1471439834: New connection from 192.168.0.12 on port 1883.
1471439834: New client connected from 192.168.0.12 as ESPClient1 (c1, k15).
1471440871: New connection from 127.0.0.1 on port 1883.
So it appears that my ESP8266 is broadcasting correctly because I can see the messages on the RPI and I’ve also seen them with MQTTfx tool. The messages are definitely coming from:
/ESPTEMP1/DHTTest/Temperature
These messages have valid values in them. I’m guessing it’s probably something small that I’m missing.
Can someone tell me how to test OH MQTT binding by creating a simple device and how to send it a simple message just to try and isolate things to a problem with OH? Something like a switch controlled by MQTT and how to send a message from command line. Is this possible and/or worthwhile test?
In your item declarations, it looks like you have an extra closing } on your humidity sensor, although I wouldn’t think that would keep both of them from working.
Here’s one of my outlets if you want to try testing a virtual switch.
Still not getting anything. [quote=“PointandClick, post:8, topic:13330, full:true”]
In your item declarations, it looks like you have an extra closing } on your humidity sensor, although I wouldn’t think that would keep both of them from working.
Here’s one of my outlets if you want to try testing a virtual switch.
I don’t have any sensors with ESPEasy, so I’m not sure what the correct syntax should be. Andreas may be on to something with "state:REGEX((.*))
[/quote]
Fixed the closing brace on that line but doesn’t seem to matter. I also tried adding your item and passing the control to it:
I’m really stumped. Can the MQTT binding be set into some sort of debug mode like Zwave? Can it write out it’s own log file? Is there any way to see what OH is actually receiving? Thanks again guys
I found the problem and I’ve also wasted all of your time. Seems that I fat fingered the copy when I copied the addons jar file. I only had the action and didn’t have the binding. All is well. Again, apologies to all who helped.
No problem. It can be frustrating when you know it just has to be one little thing, but feel like you’ve gone over everything a million times. Glad you go it working.