Closed tonbor closed 2 months ago
Do you have an example of how the MQTT payload is supposed to look like - or even better - a link to the Domoticz specification? I don't use this myself, I just implemented this upon a user's request.
https://www.domoticz.com/wiki/Domoticz_API/JSON_URL%27s#Rain
Op di 19 mrt. 2024 18:00 schreef Matthias Prinke @.***>:
Do you have an example of how the MQTT payload is supposed to look like - or even better - a link to the Domoticz specification? I don't use this myself, I just implemented this upon a user's request.
— Reply to this email directly, view it on GitHub https://github.com/matthias-bs/BresserWeatherSensorReceiver/issues/144#issuecomment-2007690857, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKD7IIRSS3E6EZUCHDEM7MDYZBVJRAVCNFSM6AAAAABE3BDHOGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMBXGY4TAOBVG4 . You are receiving this because you authored the thread.Message ID: @.*** com>
the domoticz example is not correct (any more) because of new implementation of rain calculation String(weatherSensor.sensor[i].w.rain_mm 100, 1); should be rain mm per hour domo2_payload = String("{"idx":") + String(DOMO_RAIN_IDX) + String(","nvalue":0,"svalue":"") + String(rainGauge.pastHour() 100, 1);
if (weatherSensor.sensor[i].w.rain_ok) { domo2_payload = String("{"idx":") + String(DOMO_RAIN_IDX) + String(","nvalue":0,"svalue":"") + String(weatherSensor.sensor[i].w.rain_mm * 100, 1); domo2_payload += String(";") + String(weatherSensor.sensor[i].w.rain_mm, 1); domo2_payload += String(""}"); Serial.printf("%s: %s\n", MQTT_PUB_DOMO, domo2_payload.c_str()); client.publish(MQTT_PUB_DOMO, domo2_payload.c_str(), false, 0); }