AnaviTechnology / anavi-thermometer-sw

Open source Arduino sketch for the smart WiFi dev board ANAVI Thermometer
GNU General Public License v3.0
27 stars 17 forks source link

MQTT server is not saved persistently #1

Closed cederlys closed 5 years ago

cederlys commented 5 years ago

I got my thermometers the other day. Setup was easy. I used my own MQTT server, and things just worked as long as the thermometer was powered up. But after removing power and re-applying it, I received no updates at the MQTT server. Sniffing the network I discovered that the updates were sent to iot.eclipse.org instead of my server.

The thermometer does remember which WiFi network to connect to, and the WiFi password, but apparently not the MQTT server name.

As a workaround I've edited the source code and changed mqtt_server to the server I want to use, and re-flashed the thermometer. Now it seems to work. But I was under the impression that I shouldn't need to do that.

leon-anavi commented 5 years ago

Hi @cederlys,

Sorry for the inconvenience. This must have been caused by wrong configurations of the flash size in Arduino IDE when the default firmware has been flashed. I have updated the instructions in the user's manual.

Could you please select 4M (1M SPIFFS) for Flash Size in menu Tools and after that flash again the default firmware?

With this update of the configuration in Arduino IDE the default firmware will be able to access the SPI flash and store the configured mqtt broker. Sorry again for the inconvenience.

Thanks, Leon

cederlys commented 5 years ago

Yes, that seems to have fixed the issue. Thanks.

leon-anavi commented 5 years ago

Thank you for the feedback and the confirmation. I will close the issue.

Thanks, Leon