ESP8266 Air quality sensor

Everything about esp8266 and more.

Moderator: leecollings

Post Reply
Mads
Posts: 40
Joined: Thursday 18 January 2018 20:57
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: ESP8266 Air quality sensor

Post by Mads »

jvdz wrote: Thursday 18 January 2018 21:09 Your rule is missing an equal sign after nvalue!
/json.htm?param=udevice&type=command&idx=12&nvalue=1320.00

Jos
Thx, but that didn't help either :/
Image
Attachments
Skærmbillede 2018-01-18 kl. 21.18.27.png
Skærmbillede 2018-01-18 kl. 21.18.27.png (34.78 KiB) Viewed 3268 times
User avatar
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

Post by jvdz »

Ok, please show me the whole rule you have to check for its total syntax.

Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
Mads
Posts: 40
Joined: Thursday 18 January 2018 20:57
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: ESP8266 Air quality sensor

Post by Mads »

on CO2#PPM do
SendToHTTP 192.168.1.188,8080,/json.htm?param=udevice&type=command&idx=12&nvalue=[CO2#PPM]
endon
User avatar
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

Post by jvdz »

A comma was missing before the IP address. Try this version:

Code: Select all

on CO2#PPM do
  SendToHTTP,192.168.1.188,8080,/json.htm?param=udevice&type=command&idx=12&nvalue=[CO2#PPM]
endon
Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
Mads
Posts: 40
Joined: Thursday 18 January 2018 20:57
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: ESP8266 Air quality sensor

Post by Mads »

:cry: :cry:

Nope.

I know the esp is connected to the controller. Testet it with a relay and could turn it on/off.

It is the wrong firmware on the esp?
User avatar
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

Post by jvdz »

Ok just try the url from a browser to see whether that works. One reason for failure could be when you use https or userid&password with domoticz.

Code: Select all

http://192.168.1.188:8080/json.htm?param=udevice&type=command&idx=12&nvalue=111
Just put it in your browser hit enter and see whether it returns ok or an error.
Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
Mads
Posts: 40
Joined: Thursday 18 January 2018 20:57
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: ESP8266 Air quality sensor

Post by Mads »

jvdz wrote: Thursday 18 January 2018 21:59 Ok just try the url from a browser to see whether that works. One reason for failure could be when you use https or userid&password with domoticz.

Code: Select all

http://192.168.1.188:8080/json.htm?param=udevice&type=command&idx=12&nvalue=111
Just put it in your browser hit enter and see whether it returns ok or an error.
Jos
its make an error

{
"status" : "ERR"
}

it is the IDX from hardware or from devices list?
Mads
Posts: 40
Joined: Thursday 18 January 2018 20:57
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: ESP8266 Air quality sensor

Post by Mads »

stupid me..

Wrong IDX. I took It from the hardware list..

Find out it was IDX 9.

Just changede it, and got this:

{
"status" : "OK",
"title" : "Update Device"
}

//there was a reading in Domoticz, but now it just 0PPM on the dashboard :/ it goes between 0-111.. has I something to do with the calibration?
User avatar
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

Post by jvdz »

Mads wrote: Thursday 18 January 2018 22:09 //there was a reading in Domoticz, but now it just 0PPM on the dashboard :/ it goes between 0-111.. has I something to do with the calibration?
Not sure I understand this. When you update the ESP rules things should work fine and the value in the log should be displayed in the domoticz device.

Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
Mads
Posts: 40
Joined: Thursday 18 January 2018 20:57
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: ESP8266 Air quality sensor

Post by Mads »

jvdz wrote: Thursday 18 January 2018 22:29
Mads wrote: Thursday 18 January 2018 22:09 //there was a reading in Domoticz, but now it just 0PPM on the dashboard :/ it goes between 0-111.. has I something to do with the calibration?
Not sure I understand this. When you update the ESP rules things should work fine and the value in the log should be displayed in the domoticz device.

Jos
Yeah but nothing happening in domoticz. I can see that the "last seen on, the time" is updated.

But the readings just says 0 PPM
And if i look in the log, nothing has changed the last 24 hour.
Attachments
Screenshot_20180119-070732.jpg
Screenshot_20180119-070732.jpg (192.21 KiB) Viewed 3240 times
User avatar
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

Post by jvdz »

What exactly is shown in the Domoticz Devices page for this device?
It should be something like:
Knipsel.PNG
Knipsel.PNG (28.26 KiB) Viewed 3234 times


It should already update when you do the manual URL as we discussed.

Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
Mads
Posts: 40
Joined: Thursday 18 January 2018 20:57
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: ESP8266 Air quality sensor

Post by Mads »

Have this
Attachments
Screenshot_20180119-095305.jpg
Screenshot_20180119-095305.jpg (267.76 KiB) Viewed 3232 times
User avatar
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

Post by jvdz »

So... which exact url are you now using when testing with the browser? and that does give the OK back?
If it does it really should so the proper data specified in the url in the device under DATA.
Also ensure the ESPEAsy is not writing anything to Domoticz at this time to ensure there is no interference.
So DIsable the Rules and also check in the Device that the "Send to Controller" is unchecked!

Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
Mads
Posts: 40
Joined: Thursday 18 January 2018 20:57
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: ESP8266 Air quality sensor

Post by Mads »

jvdz wrote:So... which exact url are you now using when testing with the browser? and that does give the OK back?
If it does it really should so the proper data specified in the url in the device under DATA.
Also ensure the ESPEAsy is not writing anything to Domoticz at this time to ensure there is no interference.
So DIsable the Rules and also check in the Device that the "Send to Controller" is unchecked!

Jos
Hi.

I am using this URL.

http://192.168.1.188:8080/json.htm?para ... nvalue=111

And it's retur with this:

OK

Update device

I Will try to uncheck when i get home tomorrow.

Sendt fra min ONEPLUS A3003 med Tapatalk

User avatar
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

Post by jvdz »

The URL looks good, so my guess indeed is that the value is overridden by the ESPEasy settings in the Device, which will send the wrong information to domoticz.

Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
Mads
Posts: 40
Joined: Thursday 18 January 2018 20:57
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: ESP8266 Air quality sensor

Post by Mads »

jvdz wrote:The URL looks good, so my guess indeed is that the value is overridden by the ESPEasy settings in the Device, which will send the wrong information to domoticz.

Jos
Hey jos.

This is the settings in the ESPeasyImage

Sendt fra min ONEPLUS A3003 med Tapatalk

User avatar
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

Post by jvdz »

So uncheck the tickmark before the IDX 9 field as that will send wrong information to Domoticz.
Did you also do the other steps I mentioned and then do the URL to see if the value get properly updated?

Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
Mads
Posts: 40
Joined: Thursday 18 January 2018 20:57
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: ESP8266 Air quality sensor

Post by Mads »

jvdz wrote:So uncheck the tickmark before the IDX 9 field as that will send wrong information to Domoticz.
Did you also do the other steps I mentioned and then do the URL to see if the value get properly updated?

Jos
Yes i have deleted the rules.
And when is using the link IT says

Status OK
Update device.

Got this now. (but i Dont think IT updates the last seen. )Image

Sendt fra min ONEPLUS A3003 med Tapatalk

User avatar
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

Post by jvdz »

Great, so that means it works. Now only add the Rule back and leave the Device tickbox unchecked.
This should trigger the update to domoticz each time the MHZ19 is updated on ESPEasy.

Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
Mads
Posts: 40
Joined: Thursday 18 January 2018 20:57
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: ESP8266 Air quality sensor

Post by Mads »

jvdz wrote:Great, so that means it works. Now only add the Rule back and leave the Device tickbox unchecked.
This should trigger the update to domoticz each time the MHZ19 is updated on ESPEasy.

Jos
Can i setup to update om every minutter?

Sendt fra min ONEPLUS A3003 med Tapatalk

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest