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

**URL:** <https://community.openenergymonitor.org/t/emoncms-integration-with-vthing-air-monitors-co2-dust-temperature-light/2367>\
**Category:** Integrations\
**Tags:** wifi, mqtt, temperature, emoncms\
**Created:** [1 December 2016 02:38 UTC](https://community.openenergymonitor.org/t/emoncms-integration-with-vthing-air-monitors-co2-dust-temperature-light/2367 "2016-12-01T02:38:31Z")\
**Posts on this page:** 8\
**Page:** 2

<div class="post-metadata">

**Author:** ![pb66](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/pb66/32/27_2.png) [@pb66](https://community.openenergymonitor.org/u/pb66)\
**Post date:** [2 June 2017 12:03 UTC](https://community.openenergymonitor.org/t/emoncms-integration-with-vthing-air-monitors-co2-dust-temperature-light/2367/21 "2017-06-02T12:03:38Z")

</div>

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

```auto
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”](https://community.openenergymonitor.org/t/newly-created-inputs-not-appearing-in-emoncms-via-mqtt/2515) thread) or maybe restarting just the mqtt service (See the [“MQTT Strangeness”](https://community.openenergymonitor.org/t/mqtt-strangeness/4082/12) thread).

---

<div class="post-metadata">

**Author:** ![GermanR](https://community.openenergymonitor.org/letter_avatar_proxy/v4/letter/g/b782af/32.png) [@GermanR](https://community.openenergymonitor.org/u/GermanR)\
**Post date:** [2 June 2017 12:30 UTC](https://community.openenergymonitor.org/t/emoncms-integration-with-vthing-air-monitors-co2-dust-temperature-light/2367/22 "2017-06-02T12:30:16Z")

</div>

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:

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

```

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

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

```

or

```auto
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

---

<div class="post-metadata">

**Author:** ![Vladimir\_Savchenko](https://community.openenergymonitor.org/letter_avatar_proxy/v4/letter/v/71e660/32.png) [@Vladimir\_Savchenko](https://community.openenergymonitor.org/u/Vladimir_Savchenko)\
**Post date:** [2 June 2017 12:55 UTC](https://community.openenergymonitor.org/t/emoncms-integration-with-vthing-air-monitors-co2-dust-temperature-light/2367/23 "2017-06-02T12:55:29Z")

</div>

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

```auto
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

---

<div class="post-metadata">

**Author:** ![pb66](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/pb66/32/27_2.png) [@pb66](https://community.openenergymonitor.org/u/pb66)\
**Post date:** [2 June 2017 13:12 UTC](https://community.openenergymonitor.org/t/emoncms-integration-with-vthing-air-monitors-co2-dust-temperature-light/2367/24 "2017-06-02T13:12:45Z")

</div>

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.

> [@Vladimir\_Savchenko](#):
>
> 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

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!

---

<div class="post-metadata">

**Author:** ![Vladimir\_Savchenko](https://community.openenergymonitor.org/letter_avatar_proxy/v4/letter/v/71e660/32.png) [@Vladimir\_Savchenko](https://community.openenergymonitor.org/u/Vladimir_Savchenko)\
**Post date:** [2 June 2017 13:14 UTC](https://community.openenergymonitor.org/t/emoncms-integration-with-vthing-air-monitors-co2-dust-temperature-light/2367/25 "2017-06-02T13:14:44Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![GermanR](https://community.openenergymonitor.org/letter_avatar_proxy/v4/letter/g/b782af/32.png) [@GermanR](https://community.openenergymonitor.org/u/GermanR)\
**Post date:** [5 June 2017 16:15 UTC](https://community.openenergymonitor.org/t/emoncms-integration-with-vthing-air-monitors-co2-dust-temperature-light/2367/26 "2017-06-05T16:15:38Z")

</div>

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 😓

---

<div class="post-metadata">

**Author:** ![borpin](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/borpin/32/193_2.png) [@borpin](https://community.openenergymonitor.org/u/borpin)\
**Post date:** [19 July 2017 20:33 UTC](https://community.openenergymonitor.org/t/emoncms-integration-with-vthing-air-monitors-co2-dust-temperature-light/2367/27 "2017-07-19T20:33:05Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Mitch\_Mel](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/mitch_mel/32/20171_2.png) [@Mitch\_Mel](https://community.openenergymonitor.org/u/Mitch_Mel)\
**Post date:** [20 January 2022 19:49 UTC](https://community.openenergymonitor.org/t/emoncms-integration-with-vthing-air-monitors-co2-dust-temperature-light/2367/28 "2022-01-20T19:49:13Z")

</div>

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.

[Previous page](https://community.openenergymonitor.org/t/emoncms-integration-with-vthing-air-monitors-co2-dust-temperature-light/2367.md?page=1)
