MQTT-connect event
Moderators: grovkillen, Stuntteam, TD-er
MQTT-connect event
Is there an event like 'MQTT#Connected' or 'Controller#Connected' ?
I would like to publish a modified/logical-calculated state on boot, but with 'On System#Boot do' the publish is too early (MQTT connect is a moment later) and with a timer the solution is unhappy
I would like to publish a modified/logical-calculated state on boot, but with 'On System#Boot do' the publish is too early (MQTT connect is a moment later) and with a timer the solution is unhappy
Re: MQTT-connect event
Currently there is no such event, but I think there should be one.
Re: MQTT-connect event
Or alternatively an event like 'System#IsBooted' at the end of the boot-process
I'd like to help and try to add it, but currently the self-compiled images do not work on my PUYA-ESP-01. So I can't test anything on it.
I'd like to help and try to add it, but currently the self-compiled images do not work on my PUYA-ESP-01. So I can't test anything on it.
Re: MQTT-connect event
I went back to Mega 20180104. In this version the on system#boot do works.
Hope it will be fixed in later releases again
In the ne versions the ESP is also connected to the MQTT with ESP_"MACADRESS" and not with the name given in the SW ex: ESP_TAB4
Peter
Hope it will be fixed in later releases again
In the ne versions the ESP is also connected to the MQTT with ESP_"MACADRESS" and not with the name given in the SW ex: ESP_TAB4
Peter
Re: MQTT-connect event
Yes, that's maybe a way.
But I need the Vcc-option from the latest firmware for my project. That's the stalemate!
But I need the Vcc-option from the latest firmware for my project. That's the stalemate!
Re: MQTT-connect event
VCC-Option?
What exactly does that mean.
What exactly does that mean.
Re: MQTT-connect event
I just added a number of new events to be used in rules.
See Pull Request: https://github.com/letscontrolit/ESPEasy/pull/1032
These will be in the next build, which will be made around 5 am (in about 4 hours)
See Pull Request: https://github.com/letscontrolit/ESPEasy/pull/1032
These will be in the next build, which will be made around 5 am (in about 4 hours)
Re: MQTT-connect event
Thanks for that. I'll look at the new version with the additinal events....
Re: MQTT-connect event
Is it possible, that the 'send to controller'-function from the device-categorie, fires the publish before the 'MQTT#Connected'-event ?
Re: MQTT-connect event
Yep, that's possible and probably that 'send to controller' event will never reach the MQTT broker, since the controller plugins will stop trying if there is no connection.
Re: MQTT-connect event
Any hint to find the correct position in the ESPEasy sourcecode, where the Function 'Send To Controller' is triggered
Re: MQTT-connect event
Controller.ino, the function void sendData(struct EventStruct *event)
Re: MQTT-connect event
I'll see, if I can fix it
I often use only the single bootstate-publish of the devices. Afterwards, the ESP goes into deep sleep again. Here you see, what I mean...
Edit:
That's too high for me ! I don't understand the process with the boot-state-event and the initial publish from it.
I can live with it: Re-publish the state with the MQTT#Connected-event
I often use only the single bootstate-publish of the devices. Afterwards, the ESP goes into deep sleep again. Here you see, what I mean...
Edit:
That's too high for me ! I don't understand the process with the boot-state-event and the initial publish from it.
I can live with it: Re-publish the state with the MQTT#Connected-event
Re: MQTT-connect event
In my opinion it's, because we have the following init-sequence:
1. PluginInit() (included the _P001_Switch, which try to send the boot-state)
2. WifiConnect
3. MQTTConnect
But how it should be send at Pos. 1 ?
1. PluginInit() (included the _P001_Switch, which try to send the boot-state)
2. WifiConnect
3. MQTTConnect
But how it should be send at Pos. 1 ?
Re: MQTT-connect event
Hi, that's really great, THANK YOU, very useful!! :]TD-er wrote: ↑09 Mar 2018, 00:49 I just added a number of new events to be used in rules.
See Pull Request: https://github.com/letscontrolit/ESPEasy/pull/1032
These will be in the next build, which will be made around 5 am (in about 4 hours)
Please excuse my English, thanks!
Who is online
Users browsing this forum: No registered users and 138 guests