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

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).

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

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

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!

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

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:

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

I really wish this project were still going.
I need multiple WIFI based devices (20+) to log temperature across a large estate so we can match mechanical systems energy usage to environmental data and refine our HVAC scheduling/programming.