Im Simu-Mode Bedienung über Tastatur

This commit is contained in:
Bernhard
2026-01-24 18:56:30 +01:00
parent 4bde0cc888
commit 450e93982e
8 changed files with 167 additions and 42 deletions

View File

@@ -301,4 +301,17 @@ void MqttClient_Publish_MotorActualPowerW(int iMotorIndex, int iMotorPowerW)
mosquitto_publish(mosq, NULL, mqtt_topic_motor2_actualpowerw, strlen(message), message, 0, false);
}
}
}
void MqttClient_SwitchPowerSupply(int on)
{
char *cmd = on ? "on" : "off";
for (int i=0; i<settings.iShellySupplyCount; i++)
{
mosquitto_publish(mosq, NULL, settings.sShellySupplyTopic[i], strlen(cmd), cmd, 0, false);
}
mylog(LOG_INFO, "MQTT: Switch supply-shellies %s", cmd);
}