boblemaire / IoTaWatt

IoTaWatt Open WiFi Electric Energy Monitor
https://iotawatt.com
GNU General Public License v3.0
647 stars 179 forks source link

Second IotaWatt added, first looses all configuration #335

Closed lyricnz closed 2 years ago

lyricnz commented 2 years ago

I had an Iotawatt setup with default device-name, and had configured the inputs etc, and it was all working fine.

I bought a second device, configured the wifi, and the first unit appears to have lost all it's input settings (inputs, calibration, etc). Yes, I guess there was some kind of clash on iotawatt.local? It looks like the saved data is there - once I recreated all the inputs, I can see the old data.

Any idea what happened? This seems like a case where it would be useful to be able to export/import settings for safe storage.

boblemaire commented 2 years ago

You can download the config.txt with the file manager. If you want to upload it again, rename it to config+1.txt.

When you have two IoTaWatt by the same name, there is the possibility that the browser app loaded the default config from one and then subsequently uploaded it to the other. There are a lot of variables that would determine how iotawatt.local is resolved at any specific time. Hopefully you have renamed one of them and this will not be an ongoing problem.

lyricnz commented 2 years ago

Is there any way to detect if there's an existing iotawatt.local before the new device is registered with that name? Then it could add unique suffix etc

lyricnz commented 2 years ago

FWIW I have renamed both of them, so if I ever add a third, I won't experience this.