From d04b85ac974f73a68e4e57bce494cda4ac5d6b87 Mon Sep 17 00:00:00 2001 From: Maxim Prokhorov Date: Mon, 4 Jan 2021 05:02:28 +0300 Subject: [PATCH] domoticz: send co2 ppm as nvalue ref. https://gitter.im/tinkerman-cat/espurna?at=5ff1f6934eba353cdf164311 tnx @w00ty --- code/espurna/domoticz.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/code/espurna/domoticz.cpp b/code/espurna/domoticz.cpp index 8ab527d3..176e839b 100644 --- a/code/espurna/domoticz.cpp +++ b/code/espurna/domoticz.cpp @@ -246,6 +246,11 @@ void domoticzSendMagnitude(unsigned char type, unsigned char index, double value ); char svalue[2] = {status, '\0'}; domoticzSend(key, static_cast(value), svalue); + // https://www.domoticz.com/wiki/Domoticz_API/JSON_URL's#Air_quality + // nvalue contains the ppm + // svalue is not used (?) + } else if (MAGNITUDE_CO2 == type) { + domoticzSend(key, static_cast(value), ""); // Otherwise, send char string (nvalue is only for integers) } else { domoticzSend(key, 0, buffer);