rules for STA available

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
riker1
Normal user
Posts: 344
Joined: 26 Dec 2017, 18:02

rules for STA available

#1 Post by riker1 » 04 Jun 2018, 13:49

Hi
I experienced that the esp is not always able to connect to the Router

How can I define a rule to send a message/ or switch an GPIO do show if network connect - STA Mode is running?

Or send a mail, MQTT when esp is falling back to AP Mode

Thanks for the help.

Thomas

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: rules for STA available

#2 Post by TD-er » 05 Jun 2018, 14:06

How should a MQTT message be sent when STA is failing?
There is an event when wifi is connected and you could set a "LWT" (Last Will and Testament) in the MQTT config.
If the node is disconnected from the broker, the broker will send that LWT message.

riker1
Normal user
Posts: 344
Joined: 26 Dec 2017, 18:02

Re: rules for STA available

#3 Post by riker1 » 05 Jun 2018, 16:44

Hi
Have a route from 4.1 set
to 0.x
So could send a mail
Or mqtt

so if ESP is fallback to AP, with 192.168.4.1 it still can send emails, and mqtt via route.

I experienced a lot of wifi disconnects and connects.
why is ESP often get disconnected and reconnecting?

riker1
Normal user
Posts: 344
Joined: 26 Dec 2017, 18:02

Re: rules for STA available

#4 Post by riker1 » 05 Jun 2018, 17:40

TD-er wrote: 05 Jun 2018, 14:06
There is an event when wifi is connected and you could set a "LWT" (Last Will and Testament) in the MQTT config.
If the node is disconnected from the broker, the broker will send that LWT message.
where do i configure the LWT? in mqtt controller config? or mosquitto?

mrwee
Normal user
Posts: 225
Joined: 31 Aug 2016, 12:52

Re: rules for STA available

#5 Post by mrwee » 05 Jun 2018, 18:09

riker1 wrote: 05 Jun 2018, 16:44 I experienced a lot of wifi disconnects and connects.
why is ESP often get disconnected and reconnecting?
Have ~20-30 x ESP8266 modules running. Most with ESP Easy, and none disconnect/connect from either Wi-Fi nor MQTT. Maybe you should troubleshoot there first?

riker1
Normal user
Posts: 344
Joined: 26 Dec 2017, 18:02

Re: rules for STA available

#6 Post by riker1 » 05 Jun 2018, 18:16

mrwee wrote: 05 Jun 2018, 18:09
riker1 wrote: 05 Jun 2018, 16:44 I experienced a lot of wifi disconnects and connects.
why is ESP often get disconnected and reconnecting?
Have ~20-30 x ESP8266 modules running. Most with ESP Easy, and none disconnect/connect from either Wi-Fi nor MQTT. Maybe you should troubleshoot there first?
Hi
maybe it is related to device delay, not sure.
will try to trubbbleshoot.

thanks

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: rules for STA available

#7 Post by TD-er » 06 Jun 2018, 22:49

riker1 wrote: 05 Jun 2018, 16:44 [...]
I experienced a lot of wifi disconnects and connects.
why is ESP often get disconnected and reconnecting?
I don't experience those myself, but I've seen so many reported issues already that I'm very curious to the used configuration.
What plugins?
Is there a MQTT import plugin active?
Are there just disconnects, or is it also reboots?
Can you post some logs from such a reconnect?
Is there a controller configured (e.g. Domoticz MQTT) which is not enabled?

Post Reply

Who is online

Users browsing this forum: No registered users and 37 guests