Im Simu-Mode Bedienung über Tastatur
This commit is contained in:
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user