Community
OpenEnergyMonitor

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

mqtt
temperature
wifi
emoncms
Tags: #<Tag:0x00007fc660d7d0d8> #<Tag:0x00007fc660d7cf98> #<Tag:0x00007fc660d7ce58> #<Tag:0x00007fc660d7cd18>

(Vladimir Savchenko) #1

Hi Guys,

(NB: This post is a bit marketing a device that I am producing and selling. I’ve got @glyn.hudson’s permission to post here)

I would like to make you aware of a range of devices that I’ve been developing for the last two years together several other home automation communities (Domotica, OpenHAB, FHEM, Domoticz).

They can be plugged to any private Home automation system and report key environmental data like CO2, Dust (PM 2.5, 10), Temperature, Pressure, Humidity, and also Light via HTTP or MQTT over WiFi or via RF 433/315 MHz (RFXCom).

I am currently distributing them via my online shop. Until 15.Jan.2017 i am also running a promotion campaign with Free Shipping and 3-8% off

It is all OpenSource and OpenHardware (this is the core of the devices, just put into a larger box), so eventually one could build it alone and get the full functionality (even the enclosure prints for less than 1 hour) (I will post instructions on a suitable site during the next week or so).

Another key aspect was price, as alternative products easily reach €150 - €300 lacking some of the capabilities, but having great marketing and nice injection moulded cases. While the vThing - CO2/Dust monitor can cost between €60-€130, depending on the sensors you like.

This is what they look like:
If Temperature Sensor is included

Only Dust or only CO2

Only Temperature:

The device is configured via a Chrome App and a USB Cable (WiFi-only config is planned). It is powered via a MicroUSB cable (battery-only version is also planned, but it can be powered via a USB Power Bank (consumes between 10 - 80 mA depending on sensor selection).

The configuration looks like this:

The Firmware is pretty versatile and hackable, so it is very easy to extend it. The devices are future-proof. This means - the expensive components (CO2 Sensors, Dust sensors) are not hard soldered. So as soon as I release an upgraded version - e.g. having a Battery, Bluetooth, Display or other sensors - it will be very easy and cost-efficient to upgrade.

The device can be equipped with different kinds of sensors (more detail here):

  • CO2 - All NDIR, Calibration and Maintenance free - Figaro CDM7160 or Cubic CM1102. Or alternatively the Auto-Calibrating Cubic CM1106, which tracks the lowest CO2 level each 3 days and establishes it as baseline (400 ppm)
  • Dust - Cubic PM2005 - High-Precision Laser Dust Sensor, measures PM2.5 and PM10 in µm/m3
  • Temperature
  • SI7021 - High Precision (±0.3 °C) + Humidity
  • BME280 - Temp(±0.5 °C) / Humidity / Pressure
  • BMP180 - Temp(±0.5 °C) / Pressure
  • Light (LUX) - For the standalone WiFi Lux Meter
  • BH1750 - 0.1 - 120,000 LUX - can measure direct sunlight w/o getting saturated
  • TSL2561 - 0.01 - 50,000 LUX - Measures very low-light and also IR light
  • VOC - I have plans to add VOC metering to the device, I just need some spare time to build the extension. Afterwards, adding the sensor to the device will be quite straightforward

I would be really glad to work with you guys and extend the HW and SW based on your needs. In fact, my core idea was a CO2 Meter with a low-quality sensor and optional WiFi. Everything else has come as community requested features.

Thank you for your time!
Regards, Vladimir

Edit - added super/subscript notation. BT, Moderator
also various other typographical enhancements, RW


(Bill Thomson) #2

Vlad,

I’ve bumped your user account up a level. You should be able to upload now.

Regards,

Bill


(Vladimir Savchenko) #3

Thank you Bill!

Yeah :slight_smile: i had prepared all links and photos and then i had to strip them before sending
I will fix it now :slight_smile:


(James Roberts) #4

Awesome, just what I’ve been after, particularly a lux sensor having been unable to get my sensors sensors working satisfactorily!

How robust are the enclosures, will they stand up to external mounting?

Can the lux sensor be battery powered, how long do the batteries last?

Cheers
James


(Vladimir Savchenko) #5

Thanks! Maybe if you could tell what would be satisfactory for you. The current sensor fulfills some wishes of other forum members. in particularly they wanted some sensor that would not over saturate on direct sunlight and would operate inside the house to steer some curtains.

The current enclosure is not so strong i guess, but i can design a bit sronger one. But perhaps none that would be water resistent. Though there are some interesting ones from AliExpress with transparent covers - that could be used for external sensors. I have bought a bunch some time ago, but haven’t had time to try to fit something inside yet.

Yeah, i guess this will be the deal-breaker. I have plans to design a more power-efficient and battery operated device, that could last an year or more on 2 AA batteries, but up to now haven’t had the time for this. Eventually you could power it from some solar Power Bank as the power consumption is < 1ma/h. Most probably it will not be able to design this before March 2017. As now i have some 100 VOC sensors that i want to integrate with the CO2 Monitor, so that one could monitor also VOC gases, and i believe this would take my spare time for the next 1-2 months. (and i have already bought the chips :)) )

Regards, Vladimir


(Tom Bamford) #6

Thanks this looks really interesting, the Wifi thermometer is just the thing for around the house.

In terms of power consumption, how does the BME280 and SI7021 compare or are difference negligible?
Admittedly I’m not sure why I would want to measure pressure inside the house, but I may be missing a trick.


(Vladimir Savchenko) #7

Power consumption for both sensors is the same - the actual sensor does not make any difference. In fact the main power consumer when powered via 5 V USB is the USB2Serial (ch340g) chip, which consumes ~12 mA and for some reason, does not go to sleep. It is possible to dedicate some USB cable to the device, carefully cut through the shielding and disconnect the green and white wires (D+/D-). Also some USB Power Banks (the one i have) do allow it to go to sleep. This way the energy consumption will drop to ~4 mAh (2 min send interval) or 2 mAh (4 min send interval) or 1 mAh (10 min interval).

Actually, due to the low power consumption, most USB Power banks would shut down after several minutes, so I added an option to keep alive the USB Power bank by short bursts of power consumption each minute (configurable), which also adds ~1-2 mAh

About the Pressure - well I offer choices :slight_smile: Some people take one with pressure and several SI7021. In fact, in terms of accuracy - I tested 5 BME280, and they are ~ +/- 0.3 °C from each other, compared to the SI7021 which are < 0.1 °C from each other (but for some reason all BMEs measure ~0.5 °C more than the SI, so I added a temperature calibration option to add whatever calibration factor you like in the firmware)

Just a side remark, I am almost out of Si7021 sensors, and am expecting the next bunch to arrive within 1-2 weeks (ordered them ~3 weeks ago but it takes time)


(James Roberts) #8

That’s exactly what I want, a sensor which won’t over saturate; I want to use it to drive indoor lighting, and at a later date, curtains. Temp & Humidity are a bonus.

No problem, I can try another if need be - it’ll be easier (neater) to mount externally rather inside a window (which is influenced by curtains/blinds).

That’s interesting, I could power these by cabling back to a 12v feed I have internally and then stepping down to 5v for USB - which could be easy if I can mount externally.

I’ll place an order for one (maybe two) this week!

Cheers
James


(Vladimir Savchenko) #9

Great :slight_smile:

It is indeed possible to power directly the device with 5v (or even 3.3v), so you will not need to do it necessary via the USB cable


(Tom Bamford) #10

Thanks for the reply, I’d already ordered two Si7021 just in case :slight_smile:

I think I’ll need to pickup some power banks, as the one we have is only 2800mAh, so with an average consumption of 10mAh it won’t last two weeks.
I’ll have a look for ones that allow to go to sleep.

Look forward to receiving them and integrating them with emoncms!


(Glyn Hudson) #11

@Vladimir_Savchenko sent me a CO2 unit to test. Posting to Emoncms works great :thumbsup:

Config is done via a ChromeApp which then communicates with the device via serial

By default (if ‘host’ is left blank) the Emoncms integration posts to Emoncms.org. See example below setting the ‘Host’ to post to a local emonPi Emoncms

I also tested MQTT wich also worked great. Posting data via MQTT is supported on the emonPi and would be my preferred way to post data to local emonPi Emoncms, as it’s easier to share the data between other services e.g openHAB. Using emon as the base-topic the MQTT messages are automatically converted to Emoncms inputs on the emonPi


(Tom Bamford) #12

Thanks @Vladimir_Savchenko received them the other week and got them feeding data back to emonhub perfectly!

I am having this exact issue with one of the power banks, but not sure where I can configure this, is it in the vThings - Device Configuration Tool?
All I can see in Settings is Update Interval, but I’ve no idea what point this power bank shuts down.

Thanks


(Vladimir Savchenko) #13

hmmm, you can try updating to the latest firmware (from the settings menu), but i belive i added this longer time ago
in general the device wakes up every 30 seconds by default, for 1-2 seconds and then goes to sleep.
you can try to increase the update interval to 30 seconds - then it will wake up for ~8 seconds, and see if this will keep the powerbank alive - then each time it wakes up, it will also send data


(Vladimir Savchenko) #14

Hi Guys,

I just wanted to remind you that there is 1 week (until 15.Jan (next Sunday)) time remaining until the end of the promotion.

In addition i’ve been quite busy with the firmware this Christmas so the latest firmware will add a couple new features:

  1. Complete configuration and setup over WiFi, no more USB Connection is required
  2. The build int Light Sensor is now active. It is just analog, so no output in LUX, but you can measure if it is dark or light or somewhere in between
  3. Slightly larger enclosures as heat emission from the ICs could not be avoided via software :frowning:

Regards. Vladimir


(German) #15

Hi.
I buy an v.air monitor with temperature, humidity and CO2 (CM1106), and I am trying to send the information to my EmonHub via MQTT.
I write in the vThings device configuration tool
emon/vthings/temp:%TEMP%
emon/vthings/co2:%CO2%
emon/vthings/hum:%HUM%

and when I tested only send the last line, (in this case Humidity).
It is necesary to add something like & or {} or “”

Thanks in advance!


(Vladimir Savchenko) #16

Hi German,

Could you send me in a Private Message the log from the device when it is sending the data

Thanks, Vladimir


(Paul) #17

Providing there is no sensitive data, it would be nice to try and keep the info in the forum so that the thread is complete (doesn’t just jump from “I’ve got a problem” to “thanks it’s sorted”) then others can benefit from the support and we can also, all get some insight into how the device works and integrates with emoncms.


(Vladimir Savchenko) #18

yeah… of course, just that there are some URLs and IPs in the log files, which might be considered private, this is why i mentioned the private message. Of course in any case i would post later some details, once the issue is resolved


(German) #19

This is the log file:

---Sending data---
CustomHTTPDest::process]
[Calling HTTP: [http://192.168.43.74/emoncms/input/post.json?node=vthings&json={Co2:564}&apikey=abc123]]
[Error Code: -1 = connection refused
Failed
Response Code: -1]
[Calling HTTP: [http://192.168.0.101/emoncms/input/post.json?json={co2vair:564,tempvair:22.58,humvair:59.30,press:%PRES%,pm25:%PM25%,pm10:%PM10%,lux:%LUX%}&apikey=def456]]
[CLOSED
Response Code: 401]
[CustomHTTP : 9214ms
SerialDumpDest::process
IP	: 192.168.0.104
CHIPID	: 1337A6
RUNTIME	: 433
GMTTIME	: 4294967295
RSSI	: -63
CO2	: 564
TEMP	: 22.58
TEMPR	: 23.18
HUM	: 59.30
SerialDump : 192ms
MQTTDest::process]
[Sending via MQTT: 192.168.0.101,1883]
[Connecting to server :vESPrino,emonpi,emonpimqtt2016
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
RFDest::process
RFX10 : 0ms
Blynk : 0ms
RGBLed : 0ms]

With this file, I only see the humidity value of 59.3

Thanks in advance!

[edit - fudged 2x apikeys, they were not the same so “fudged” them differently - pb66]


(Vladimir Savchenko) #20

hmm this is weird, seems like the MQTT sending complets w/o errors
if you try to send only temp or co2, does it succeed?
have you made sure that they are correctly configured in emocms?
And eventually test it standalone ?

mosquitto_pub -u 'emonpi' -P 'emonpimqtt2016' -t 'emon/vthings1/co2' -m '1234'