Add Main Door Mysensors

This commit is contained in:
2020-11-15 17:21:35 +03:00
parent b577488bbd
commit e735f1d055
9 changed files with 249 additions and 1 deletions

View File

@@ -149,7 +149,7 @@ void reconnect() {
// подписываемся или переподписываемся на топик;
// можно подписаться не только на один, а на несколько топиков
char v[6];
ltoa(delta, v, 10);
itoa(delta, v, 10);
client.publish("/home/smallroom/ldelta", v);
client.subscribe("/home/smallroom/ldelta");
} else {
@@ -179,6 +179,8 @@ void publishMin()
client.publish("/home/smallroom/light", strFVal);
ultoa(cRun, strFVal, 10);
client.publish("/home/smallroom/millis", strFVal);
itoa(delta, strFVal, 10);
client.publish("/home/smallroom/ldelta", strFVal);
//digitalWrite(LED_BLUE, LOW);
}
}