Maxim Prokhorov 4 years ago
parent
commit
d04b85ac97
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      code/espurna/domoticz.cpp

+ 5
- 0
code/espurna/domoticz.cpp View File

@ -246,6 +246,11 @@ void domoticzSendMagnitude(unsigned char type, unsigned char index, double value
);
char svalue[2] = {status, '\0'};
domoticzSend(key, static_cast<int>(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<int>(value), "");
// Otherwise, send char string (nvalue is only for integers)
} else {
domoticzSend(key, 0, buffer);


Loading…
Cancel
Save