Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NDIR sensor in relation to Domoticz controller #232

Open
rvakkeren opened this issue Apr 18, 2017 · 16 comments
Open

NDIR sensor in relation to Domoticz controller #232

rvakkeren opened this issue Apr 18, 2017 · 16 comments

Comments

@rvakkeren
Copy link

@rvakkeren rvakkeren commented Apr 18, 2017

Steps to reproduce

Using ESP Easy with the NDIR MH-Z19 plugin

Expected behavior

Domoticz should be updated, but it only updates the sensor with a zero-value.

Actual behavior

The Domoticz API requires the following syntax for a Air Quality sensor "/json.htm?type=command&param=udevice&idx=IDX&nvalue=PPM".

Instead of a nvalue, a svalue is used by ESP Easy. That's why the data isn't processed in Domoticz.

@psy0rz

This comment has been minimized.

Copy link
Member

@psy0rz psy0rz commented Apr 19, 2017

i have this sensor myself and will test (and fix) this in the future.

@remyderuysscher

This comment has been minimized.

Copy link

@remyderuysscher remyderuysscher commented Nov 19, 2017

Wow, this bug is pretty severe. Can't believe it's still open.

@TD-er

This comment has been minimized.

Copy link
Member

@TD-er TD-er commented Nov 19, 2017

If this is still an issue, I will write a fix for it.
Is it an idea to add the option to select the output format?

@TD-er

This comment has been minimized.

Copy link
Member

@TD-er TD-er commented Nov 19, 2017

Just a question... Does the Senseair sensor work like expected?
It looks like both Domoticz controllers output only "&svalue=" statements.
Controller Plugin 001 (Domoticz HTTP) does not even contain the "nvalue" string.
Controller Plugin 002 (Domoticz MQTT) does only output a '0' for "nvalue".

So this issue is bigger than only adding an option to a single plugin. It will be an extension to at least both Domoticz controllers and perhaps even others and IMHO is that something for after the 2.0 release.

@psy0rz and @Grovkillen
Do you agree this is actually a totally different kind of bug?

@Grovkillen

This comment has been minimized.

Copy link
Member

@Grovkillen Grovkillen commented Nov 20, 2017

Yes I believe that this is a revamp of the way we need to publish to Domoticz. A thing for 2.1 for sure.

@Grovkillen Grovkillen added this to the 2.1.0 milestone Nov 20, 2017
@psy0rz

This comment has been minimized.

Copy link
Member

@psy0rz psy0rz commented Nov 20, 2017

@remyderuysscher i'm indeed using this sensor myself, but i added it as "Custom sensor". Then it works without problems.

Maybe its enough to just update the documentation on the wiki to explain this?

@remyderuysscher

This comment has been minimized.

Copy link

@remyderuysscher remyderuysscher commented Nov 21, 2017

I'm still not getting any reading in domoticz with a custom sensor type using the REST API. I compiled the the MEGA build from 29/10/2017. With plugin sets normal, testing and development on.

@Grovkillen

This comment has been minimized.

Copy link
Member

@Grovkillen Grovkillen commented Nov 21, 2017

@remyderuysscher

This comment has been minimized.

Copy link

@remyderuysscher remyderuysscher commented Nov 21, 2017

@TD-er

This comment has been minimized.

Copy link
Member

@TD-er TD-er commented Nov 21, 2017

Just add it as a "Custom sensor", via the "Dummy" (Virtual) devices.
Then select Domoticz HTTP as controller and couple that to the sensor device.
Then you can use these sensors in Domoticz.
I've several of them working here.

@remyderuysscher

This comment has been minimized.

Copy link

@remyderuysscher remyderuysscher commented Nov 22, 2017

@svde

This comment has been minimized.

Copy link

@svde svde commented May 14, 2018

I use this rule:

on CO2#PPM do
SendToHTTP domoticz-fqdn,80,/json.htm?type=command&param=udevice&idx=228&nvalue=[CO2#PPM]
endon

@sincze

This comment has been minimized.

Copy link

@sincze sincze commented Mar 19, 2019

on CO2#PPM do
SendToHTTP domoticz-fqdn,80,/json.htm?type=command&param=udevice&idx=228&nvalue=[CO2#PPM]
endon

i used that rule as well, It works.
However now I changed to Domoticz that requires authentication.... and it does not work anymore.

(ESP_Easy_mega-20190315_normal_ESP8266_4M.bin)

Created Controllers (Domoticz HTTP)
I tried with Device - Generic Dummy Device (SENSOR_TYPE_SINGLE).
But it seems it is unable to call a /json.htm?type=command&param=udevice&idx=IDX&nvalue=PPM

Generic Dummy that I use for Temperature work correctly
/json.htm?type=command&param=udevice&idx=IDX&nvalue=0&svalue=TEMP

@TD-er

This comment has been minimized.

Copy link
Member

@TD-er TD-er commented Mar 19, 2019

As far as I know, all data we send to Domoticz in one of both controllers only send "svalue" data, not "nvalue".
So I just use a "custom sensor" in Domoticz and send my CO2 values to that IDX and it sends it as "svalue" since we do not yet support sending "nvalues"

@sincze

This comment has been minimized.

Copy link

@sincze sincze commented Mar 20, 2019

That would indeed be a nice work around and nvalue feature request :).

@sincze

This comment has been minimized.

Copy link

@sincze sincze commented Mar 20, 2019

Jups it does the trick,
nvalue_cheated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants
You can’t perform that action at this time.