jeanmarc77 / meterN

meterN is a lightweight set of PHP/JS files that makes a " Home energy metering & monitoring " solution.
GNU General Public License v3.0
5 stars 2 forks source link

having "null" value on a meter #6

Closed ptoni2000 closed 1 year ago

ptoni2000 commented 1 year ago

I would like to know if possible to put a "null" value in a meter to not display it in the graph, this is the case: a temperature detected by micro inverters that do not respond to polling at night, simply putting 0 is not good as it is a valid value.

jeanmarc77 commented 1 year ago

Hi, You mean for a "sensor" ? If so, i believe you will get "Communication error", if you return a null value if you enable "Warn connection lost". Can you git it a try ?

ptoni2000 commented 1 year ago

You see the graph for temperature on https://casa.tonitabaro.net/metern/ i would like to have on the graph during the night someting like: https://www.highcharts.com/demo/area-missing

jeanmarc77 commented 1 year ago

Ok i get the idea, it's neat.. But the problem is with testing "Communication error", if a meter/sensor returns null. How can i detect it ?

ptoni2000 commented 1 year ago

what if using nan or someting like the "c" FLT_MAX as a value?

jeanmarc77 commented 1 year ago

Hi, Can you give a try using this https://github.com/jeanmarc77/meterN/blob/main/scripts/datasets/IEC62056.php and https://github.com/jeanmarc77/meterN/blob/main/scripts/metern.php ?

ptoni2000 commented 1 year ago

Hi, Can you give a try using this https://github.com/jeanmarc77/meterN/blob/main/scripts/datasets/IEC62056.php and https://github.com/jeanmarc77/meterN/blob/main/scripts/metern.php ?

works great, thanks!