knolleary / pubsubclient

A client library for the Arduino Ethernet Shield that provides support for MQTT.
http://pubsubclient.knolleary.net/
MIT License
3.82k stars 1.47k forks source link

Why ESP8266 create a wifi network? #475

Open FiReBlUe45 opened 6 years ago

FiReBlUe45 commented 6 years ago

Hello, I have a problem :/ I use the example I found here (https://github.com/knolleary/pubsubclient/blob/master/examples/mqtt_esp8266/mqtt_esp8266.ino) and like with all the other libs I have tried. I use as broker Mosquitto with the default configuration.

image

This consumes a lot of electrical energy :( I see on Wireshark hugely packets sent when I do not send MQTT message :(

You know how to modify this?

Thank you very much,

knolleary commented 6 years ago

The PubSubClient will send a 2-byte ping packet every 30 seconds or so. The example sketch you link to publishes a small message every 2 seconds. That's it. Anything else you are seeing is not coming from this library.

rezahili commented 6 years ago

Hi If u are worry about consumes of electrical energy use sleep mode it is the best way to reduce electrical energy for projects in software