Community
OpenEnergyMonitor

Emoncms Integration with vThing - Air Monitors (CO2, Dust, Temperature, Light)

mqtt
temperature
wifi
emoncms
Tags: #<Tag:0x00007fc660ab3898> #<Tag:0x00007fc660ab3758> #<Tag:0x00007fc660ab3618> #<Tag:0x00007fc660ab34d8>

(Paul) #21

You should also try seeing if all the values are available via MQTT using

mosquitto_sub -v -u 'emonpi' -P 'emonpimqtt2016' -t 'emon/vthings1/#'

If they are, try rebooting the emonPi (see the “Newly created inputs not appearing in emonCMS via MQTT” thread) or maybe restarting just the mqtt service (See the “MQTT Strangeness” thread).


(German) #22

I think I have the correct configuration of the v.air monitor because it sends correctly one value. But in the example of MQTT configuration explains:

data/temp:%TEMP%
domoticz/in:{key:"%TEMP%", key2: "%HUM%"}

and I don´t know if the correct code are:

emon/vthings/temp:%TEMP%
emon/vthings/co2:%CO2%
emon/vthings/hum:%HUM%

or

emon/vthings:{temp":%TEMP%",co2:"%CO2%",hum:"%HUM%"} 

or other…

Because, the last one do not run,

with only a sentence (emon/vthings/temp:%TEMP%)
works fine

and with the three sentences I only see the last one, as if v.air overwrite the data.

I will try mosquito.
Thanks


(Vladimir Savchenko) #23

maybe you can try also the log file, to see what arrives there
$ tail /var/log/emonhub/emonhub.log
in general this is the correct way of sending multiple values, and the fact that in the device log there is

MQTT Connected]
[Mqtt Dest: sending: to topic:emon/vthings1/temp, msg: 22.58]
[Mqtt Dest: sending: to topic:emon/vthings1/co2, msg: 564]
[Mqtt Dest: sending: to topic:emon/vthings1/hum, msg: 59.30]
[MQTT : 1346ms

means that they have been parsed and the messages sent
what is more weird, is that you are receiving the “hum” value, but not the others


(Paul) #24

If you are publishing to emoncms directly there will be no related info in emonhub.log as it is not part of the route and therefore unaware of that traffic.

That’s precisely why I suggested checking the published MQTT via the commandline, there is a known issue with the mqtt input to emoncms, If the Pi has not been rebooted, this behaviour is unsurprising, See the first link I posted, the issue is comprehensively documented and as yet unresolved.

This issue is not unique to the vThing!


(Vladimir Savchenko) #25

yeah, i supposed that German tried it after you mentioned, but maybe he hasn’t yet checked it


(German) #26

Finally I solve this issue using HTTP instead of MQTT.
With MQTT I think that each line overwrites the previous line, and with the correct configuration of HTTP works fine.

Thanks a lot for your comments. It is a pity that I not have been able to configure the device with MQTT :sweat:


(Brian Orpin) #27

Mine run fine. Have you updated the firmware as there were some bugs in it.