Dear all,
so now, latest part of my adventure… ESP8266 (NodeMCU) with ESPEasy, a reed switch, Mosquitto MQTT broker, OH2…
I can get OH2 to display the sensor:
Kind-of working:
Items:
Number MQTTLED { mqtt="<[mosquitto:/ESP_Easy/reed/contact:state:default]" }
Log:
2017-12-26 11:25:10.947 [vent.ItemStateChangedEvent] - MQTTLED changed from NULL to 0
2017-12-26 11:26:38.025 [vent.ItemStateChangedEvent] - MQTTLED changed from 0 to 1
Kind-of-point is that the sitemap value is not refreshed, I have to hit F5 on the browser to see it.
Not working:
item:
Number Reed “State [%s]” {mqtt="<[mosquitto:ESP_Easy/reed/contact:state:default]"}
sitemap:
Text item=Reed label=“Test [%s]”
Questions
a) why does the first item work but not the second?
b) do I need the leading “/” in front of ESP_Easy.
Online many examples seem to contain it, but the binding tutorial does not.
I subscribed via terminal to all messages to have a look out and get:
/ESP_Easy/reed/contact
So I guess for some reason, in my setup the leading forward slash is needed.
(And it makes sense, I check my ESP_Easy config and it had the leading slash).
Next 2 questions:
a) Why BASIC UI does not update in real-time (or with a minor lag)?
b) The reed switch is contacted to my gas-meter.
1 Rotation of the gas-meter disc = X m3 of Gas flow.
I want to define a variable that accumulates number of rotations (i.e. number of state changes from 0 to 1)
Ideally logging it and plotting.