I want to send commandy by MQTT to my ESP8266.
Status
- ESPeasy is running smoothly.
- ESP is connected to my MQTT Server and the ESP sends messages by MQTT to the server. I just receive a test message send every X seconds. I can check with MQTT explorer that messages are sent from ESP to the MQTT server.
I cannot see that the ESP receives MQTT messages or reacts on MQTT messages.
Rule
Code: Select all
on MQTT#ESP8266_NAS/power_off=on do
logentry,"power_off = %eventvalue%"
gpio,D6,1 // Turn light on
TimerSet 1,10 //Timer 1 waits 10 seconds, then action below is done
endon
https://nerdiy.de/de_de/howto-espeasy-m ... bonnieren/
Update:
I now read that you can directly send commands via MQTT like that:
topic: /%sysname%/gpio/12/cmd
to power GPIO 12
payload: „Pulse,12,1,500“
to set GPIO 12 to high (1) for 500 ms.
Log
The configuration of MQTT, subscribed topic and
Code: Select all
8102568: WD : Uptime 135 ConnectFailures 0 FreeMem 19736 WiFiStatus 3 ESPeasy internal wifi status: Conn. IP Init
8132568: WD : Uptime 136 ConnectFailures 0 FreeMem 19736 WiFiStatus 3 ESPeasy internal wifi status: Conn. IP Init
8161195: ADC : Analog value: 0 = 0.00
8161207: EVENT: send2#Analog=2.00
8162568: WD : Uptime 136 ConnectFailures 0 FreeMem 19736 WiFiStatus 3 ESPeasy internal wifi status: Conn. IP Init
8192568: WD : Uptime 137 ConnectFailures 0 FreeMem 19736 WiFiStatus 3 ESPeasy internal wifi status: Conn. IP Init
8194331: Upload: START, filename: rules1.txt
8194586: Upload: WRITE, Bytes: 514
8194588: Upload: END, Size: 514
8194807: ESPEasy console using ESPEasySerial
8209591: Upload: START, filename: rules1.txt
8209697: Upload: WRITE, Bytes: 517
8209698: Upload: END, Size: 517
8209945: ESPEasy console using ESPEasySerial
8221197: ADC : Analog value: 0 = 0.00
8221210: EVENT: send2#Analog=2.00
8222568: WD : Uptime 137 ConnectFailures 0 FreeMem 20344 WiFiStatus 3 ESPeasy internal wifi status: Conn. IP Init
8252568: WD : Uptime 138 ConnectFailures 0 FreeMem 20344 WiFiStatus 3 ESPeasy internal wifi status: Conn. IP Init
8281195: ADC : Analog value: 0 = 0.00
8281212: EVENT: send2#Analog=2.00
8282568: WD : Uptime 138 ConnectFailures 0 FreeMem 20344 WiFiStatus 3 ESPeasy internal wifi status: Conn. IP Init
8312568: WD : Uptime 139 ConnectFailures 0 FreeMem 20344 WiFiStatus 3 ESPeasy internal wifi status: Conn. IP Init