ESP8266 Air quality sensor
Moderator: leecollings
- jvdz
- Posts: 2189
- Joined: Tuesday 30 December 2014 19:25
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.107
- Location: Netherlands
- Contact:
Re: ESP8266 Air quality sensor
This is a setting for the MHZ19b and supported both according the manual.
Jos
Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
- jvdz
- Posts: 2189
- Joined: Tuesday 30 December 2014 19:25
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.107
- Location: Netherlands
- Contact:
Re: ESP8266 Air quality sensor
Not sure I fully understand you post here.
You mean the standard ESPEASY setting using the HTTP & IDX settings like i show in the screenshot don't work for an Dummy Air Quality sensor but working for a custom sensor? Guess you are using the standard Mega ESPEASY?
The standard one needs the Rules approach. My version has a different device defined that fixes the used URL to update the Air Quality sensor.
Jos
You mean the standard ESPEASY setting using the HTTP & IDX settings like i show in the screenshot don't work for an Dummy Air Quality sensor but working for a custom sensor? Guess you are using the standard Mega ESPEASY?
The standard one needs the Rules approach. My version has a different device defined that fixes the used URL to update the Air Quality sensor.
Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
- Igrek
- Posts: 9
- Joined: Sunday 22 October 2017 11:28
- Target OS: NAS (Synology & others)
- Domoticz version: 3.8153
- Location: Moscow
- Contact:
Re: ESP8266 Air quality sensor
I understood.
The air quality sensor requires the data in parameter "&nvalue =". The standard ESPEASY plugin transmits "&svalue=". I also copied a line from another rule with "&svalue=". This works with a dummy custom type but does not work with an dummy air quality sensor.
Thanks for the tips!
The air quality sensor requires the data in parameter "&nvalue =". The standard ESPEASY plugin transmits "&svalue=". I also copied a line from another rule with "&svalue=". This works with a dummy custom type but does not work with an dummy air quality sensor.
Thanks for the tips!
- LouiS22
- Posts: 433
- Joined: Friday 27 February 2015 13:21
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Budapest, Hungary
- Contact:
Re: ESP8266 Air quality sensor
So, if you download the latest mega dev version (i believe v12), you can use my rule for sure.Igrek wrote: ↑Wednesday 08 November 2017 7:10 I understood.
The air quality sensor requires the data in parameter "&nvalue =". The standard ESPEASY plugin transmits "&svalue=". I also copied a line from another rule with "&svalue=". This works with a dummy custom type but does not work with an dummy air quality sensor.
Thanks for the tips!
-
- Posts: 39
- Joined: Tuesday 11 July 2017 10:26
- Target OS: NAS (Synology & others)
- Domoticz version: 2020.2
- Location: Germany
- Contact:
Re: ESP8266 Air quality sensor
Dear Jos,
finally I have got all components on hand.
Already prepared the components and tried to flash your firmware version after compiling with ATOM.
Unfortunately I get an error message while trying to flash.
warning espcomm_sync failed
error: espcomm_open failed
error: espcomm_upload_mem failed ....
Kind regards
Domoticz Beta | Aeon Labs Z-Wave USB Stick Gen5 | Cyrus SmartHome 4-in-1 Multisensor | Qubino ZMNHCD1 - Roller Shutter | NEO COOLCAM NAS-WR01ZE Power Plug | Fibaro FGRGB-101 | WEMOS D1 MINI (ESP8266) Sensors CO2/TEMP/BARO |
- jvdz
- Posts: 2189
- Joined: Tuesday 30 December 2014 19:25
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.107
- Location: Netherlands
- Contact:
Re: ESP8266 Air quality sensor
Correct... I use the firmware.bin from directory: ESPEasy\.pioenvs\normal_4096 to flash my WEMOS D1 Mini.
Are you doing the initial flash via USB cable? if so, how are you doing this?
What are the exact error messages you get in the console?
Jos
Are you doing the initial flash via USB cable? if so, how are you doing this?
What are the exact error messages you get in the console?
Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
-
- Posts: 39
- Joined: Tuesday 11 July 2017 10:26
- Target OS: NAS (Synology & others)
- Domoticz version: 2020.2
- Location: Germany
- Contact:
Re: ESP8266 Air quality sensor
Yes. And now, after disconnecting all sensors before flashing, it worked like a charm. So if using ATOM only connect the "clean" WEMOS D1 Mini without any additional sensors ... then it will work ... OK ... I will go on with your tutorial ...
Domoticz Beta | Aeon Labs Z-Wave USB Stick Gen5 | Cyrus SmartHome 4-in-1 Multisensor | Qubino ZMNHCD1 - Roller Shutter | NEO COOLCAM NAS-WR01ZE Power Plug | Fibaro FGRGB-101 | WEMOS D1 MINI (ESP8266) Sensors CO2/TEMP/BARO |
-
- Posts: 39
- Joined: Tuesday 11 July 2017 10:26
- Target OS: NAS (Synology & others)
- Domoticz version: 2020.2
- Location: Germany
- Contact:
Re: ESP8266 Air quality sensor
In the devices tab I cannot configure whats shon on your screenshot. there are some environmental sensortypes, but no one for gas ...
Perhabs wrong image ... do I need to compile with testing modules ...
=> You need to compile "TESTING" // I was using wrong files to compile the bin .... //
https://www.letscontrolit.com/wiki/inde ... lugin_list
Kind regards
Last edited by nixalsschrott on Sunday 17 December 2017 17:32, edited 4 times in total.
Domoticz Beta | Aeon Labs Z-Wave USB Stick Gen5 | Cyrus SmartHome 4-in-1 Multisensor | Qubino ZMNHCD1 - Roller Shutter | NEO COOLCAM NAS-WR01ZE Power Plug | Fibaro FGRGB-101 | WEMOS D1 MINI (ESP8266) Sensors CO2/TEMP/BARO |
- jvdz
- Posts: 2189
- Joined: Tuesday 30 December 2014 19:25
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.107
- Location: Netherlands
- Contact:
Re: ESP8266 Air quality sensor
... you are sure you have the appropriate sourcecode in your directory: espeasy\ESPEasy\src ?
It should contain file _P049_MHZ19.ino and if so check the content whether line 12 doesn't look like this:
Jos
It should contain file _P049_MHZ19.ino and if so check the content whether line 12 doesn't look like this:
Code: Select all
#ifdef PLUGIN_BUILD_TESTING
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
-
- Posts: 39
- Joined: Tuesday 11 July 2017 10:26
- Target OS: NAS (Synology & others)
- Domoticz version: 2020.2
- Location: Germany
- Contact:
Re: ESP8266 Air quality sensor
Huhu ...
OK, now flashed the correct "Testing" Compilation ...
I also can select the correct sensor now.
But after setting up the values, I get no input ...
===> also refers to wrong files
Log shows:
Kind regards
OK, now flashed the correct "Testing" Compilation ...
I also can select the correct sensor now.
But after setting up the values, I get no input ...
===> also refers to wrong files
Log shows:
Kind regards
Last edited by nixalsschrott on Sunday 17 December 2017 17:33, edited 1 time in total.
Domoticz Beta | Aeon Labs Z-Wave USB Stick Gen5 | Cyrus SmartHome 4-in-1 Multisensor | Qubino ZMNHCD1 - Roller Shutter | NEO COOLCAM NAS-WR01ZE Power Plug | Fibaro FGRGB-101 | WEMOS D1 MINI (ESP8266) Sensors CO2/TEMP/BARO |
- jvdz
- Posts: 2189
- Joined: Tuesday 30 December 2014 19:25
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.107
- Location: Netherlands
- Contact:
Re: ESP8266 Air quality sensor
I think you aren't using my version, but the standard ESPEasy Mega version!
That one requires the indicated Rule.
so: Either use the version I have published on Github and use the Normal 4096 build with the standard settings
-or-
use the standard Mega version, flash the TEST 4096 build and add the Rule to the Rules option in ESPEasy.
Jos
That one requires the indicated Rule.
so: Either use the version I have published on Github and use the Normal 4096 build with the standard settings
-or-
use the standard Mega version, flash the TEST 4096 build and add the Rule to the Rules option in ESPEasy.
Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
-
- Posts: 39
- Joined: Tuesday 11 July 2017 10:26
- Target OS: NAS (Synology & others)
- Domoticz version: 2020.2
- Location: Germany
- Contact:
Re: ESP8266 Air quality sensor
OK. Sorry. I followed your link but on the website I switched to "releases" and then indeed downloaded the "original" firmware.
I know did flash your version .... fianlly .. but still getting the error "ConnectFailures 0 FreeMem 21704"
Also under devices there are no values shown ...
By the way .. I often read that the MH-Z19b should be connected to 5Volt .. manual shows 3.3V and 5V is possible. Actually I have connected to 3.3V.
I know did flash your version .... fianlly .. but still getting the error "ConnectFailures 0 FreeMem 21704"
Also under devices there are no values shown ...
By the way .. I often read that the MH-Z19b should be connected to 5Volt .. manual shows 3.3V and 5V is possible. Actually I have connected to 3.3V.
Domoticz Beta | Aeon Labs Z-Wave USB Stick Gen5 | Cyrus SmartHome 4-in-1 Multisensor | Qubino ZMNHCD1 - Roller Shutter | NEO COOLCAM NAS-WR01ZE Power Plug | Fibaro FGRGB-101 | WEMOS D1 MINI (ESP8266) Sensors CO2/TEMP/BARO |
- jvdz
- Posts: 2189
- Joined: Tuesday 30 December 2014 19:25
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.107
- Location: Netherlands
- Contact:
Re: ESP8266 Air quality sensor
Looking at the log there indeed seems to be an issue with getting the information from the mhz19.
I have no experience with that as it simply worked for me as I have detailed in my post.
Had a quick look in the manual for the MH-Z19b regarding your comment about 5v and it states:
... this of course is valid for the b version only!
Jos
I have no experience with that as it simply worked for me as I have detailed in my post.
Had a quick look in the manual for the MH-Z19b regarding your comment about 5v and it states:
So I would think it indeed should have 5v in stead of 3.3v and also checked my setup which is indeed connected to 5v.Technical Parameters and Structure:
Working voltage 4.5 ~ 5.5 V DC
Average current < 60mA (@5V)
Peak current peak 150mA (@5V)
... this of course is valid for the b version only!
Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
-
- Posts: 39
- Joined: Tuesday 11 July 2017 10:26
- Target OS: NAS (Synology & others)
- Domoticz version: 2020.2
- Location: Germany
- Contact:
Re: ESP8266 Air quality sensor
OK. Tried with 5V but do not get any results either.
And you are still sure with the pin connection, since I have read also different pins to use with MH-Z19B.
"Assembling
Connect the following:
MH-Z19 Tx → Wemos pin D8
MH-Z19 Rx → Wemos pin D7
MH-Z19 gnd → Wemos gnd pin
MH-Z19 vcc → Wemos 3.3V pin // 5.0V pin
"
And also GPIOs are GPIO14 and GPIO12 ...?
===> After changing GPIO Device Settings to 1st GPIO:15 (D8) and 2nd GPIO:13 (D7) it is working ... I get values for PPM and Temp!
Can`t figure out the problem. Anything else I have to adjust within the WEMOS D1?
Kind regards and thank`s for any help ...
And you are still sure with the pin connection, since I have read also different pins to use with MH-Z19B.
"Assembling
Connect the following:
MH-Z19 Tx → Wemos pin D8
MH-Z19 Rx → Wemos pin D7
MH-Z19 gnd → Wemos gnd pin
MH-Z19 vcc → Wemos 3.3V pin // 5.0V pin
"
And also GPIOs are GPIO14 and GPIO12 ...?
===> After changing GPIO Device Settings to 1st GPIO:15 (D8) and 2nd GPIO:13 (D7) it is working ... I get values for PPM and Temp!
Can`t figure out the problem. Anything else I have to adjust within the WEMOS D1?
Kind regards and thank`s for any help ...
Domoticz Beta | Aeon Labs Z-Wave USB Stick Gen5 | Cyrus SmartHome 4-in-1 Multisensor | Qubino ZMNHCD1 - Roller Shutter | NEO COOLCAM NAS-WR01ZE Power Plug | Fibaro FGRGB-101 | WEMOS D1 MINI (ESP8266) Sensors CO2/TEMP/BARO |
-
- Posts: 39
- Joined: Tuesday 11 July 2017 10:26
- Target OS: NAS (Synology & others)
- Domoticz version: 2020.2
- Location: Germany
- Contact:
Re: ESP8266 Air quality sensor
Dear Jos,
I still have two sensors here - one BMP-180 (GY-68 ) and one DHT22 (AM2303).
Which Pins to I connect to and which virtual switches di I have to create?
Kind regards matty
Domoticz Beta | Aeon Labs Z-Wave USB Stick Gen5 | Cyrus SmartHome 4-in-1 Multisensor | Qubino ZMNHCD1 - Roller Shutter | NEO COOLCAM NAS-WR01ZE Power Plug | Fibaro FGRGB-101 | WEMOS D1 MINI (ESP8266) Sensors CO2/TEMP/BARO |
-
- Posts: 68
- Joined: Wednesday 03 February 2016 19:22
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: ESP8266 Air quality sensor
Thanks for al your hard work! Can you supply a photo from your hardware set up? What kind of power supply and case are you using?
- jvdz
- Posts: 2189
- Joined: Tuesday 30 December 2014 19:25
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.107
- Location: Netherlands
- Contact:
Re: ESP8266 Air quality sensor
@nixalsschrott,
Is the MHZ19 working now for you as you post seems inclusive for me or is the Bold part added later and I should stop reading there?
The Bmp180 & DHT22 are connected as described in this webpage: https://diyprojects.io/esp-easydht22bmp ... -barometer
Jos
Is the MHZ19 working now for you as you post seems inclusive for me or is the Bold part added later and I should stop reading there?
The Bmp180 & DHT22 are connected as described in this webpage: https://diyprojects.io/esp-easydht22bmp ... -barometer
Code: Select all
Component Pin Arduino Pin Wemos D1 mini
DHT22 VDC 5V 5V
GND GND GND
Data GPIO-14 D5
BMP180 VDC 5V 5V
GND GND GND
SDA GPIO-4 D2
SCK GPIO-5 D1
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
Who is online
Users browsing this forum: No registered users and 0 guests