sensor mqtt json name
This commit is contained in:
parent
d64b731cb1
commit
013ccc67b0
@ -56,7 +56,7 @@ public:
|
||||
if (sensors.isConverted()) {
|
||||
const double value = sensors.read(address);
|
||||
const time_t timestamp = sensors.getTimestamp();
|
||||
const unsigned long millisNow=millis();
|
||||
const unsigned long millisNow = millis();
|
||||
const bool doPublish = !isnan(value) && (abs(lastSentValue - value) >= valueThreshold || millisNow - lastSentMillis >= minIntervalMillis);
|
||||
if (doPublish) {
|
||||
lastSentValue = value;
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
|
||||
Dallas dallas(SENSOR_GPIO);
|
||||
|
||||
DallasSensor sensor(dallas, 0x3D0417C1D740FF28, "sensor", 0.1, 5, 60 * 1000);
|
||||
DallasSensor sensor(dallas, 0x3D0417C1D740FF28, "temperatur.ist", 0.1, 5, 60 * 1000);
|
||||
|
||||
ArduPID pid;
|
||||
|
||||
@ -77,12 +77,12 @@ void patrixLoop() {
|
||||
lastDebug = now;
|
||||
int heaterPercent = (int) round(100.0 * heaterPWM / CONTROL_PWM_MAX);
|
||||
debug(
|
||||
"p: %.12f | i: %.12f | d: %.12f | current: %5.2f | target: %5.2f | heater: %3d%% | %s",
|
||||
"p: %.12f | i: %.12f | d: %.12f | dst: %4.1f^C | cur: %5.2f^C | heat: %3d%% | %s",
|
||||
proportional == 0 ? NAN : proportional,
|
||||
integral == 0 ? NAN : integral,
|
||||
derivative == 0 ? NAN : derivative,
|
||||
temperatureCurrent,
|
||||
temperatureTarget,
|
||||
temperatureCurrent,
|
||||
heaterPercent,
|
||||
emergencyStr
|
||||
);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user