Luen Ruuvi Gatewayn tiedot http:n avulla komennolla curl -v http://<RUUVI_GW_IP>/history -H “Authorization: Bearer TOKEN”. Käytössä on uusin firmware v1.13.1
Homma pelaa niin kauan kuin Ruuvi Gatewayn käyttämä internet-yhteys toimii. Jos internet-yhteys katkeaa hetkellisesti esimerkiksi laajakaistamodeemin uudelleenkäynnistämisestä johtuen, em. komento alkaa herjata: HTTP/1.0 401 Unauthorized. Vasta kun asetukset palauttaa Gatewayn Setup Wizardin avulla, alkaa komento toimia jälleen kuten pitääkin.
Onko tämä Gatewayn ominaisuus? Saisiko Gatewayn jollakin tavalla selviämään internet-yhteyden katkeamisesta?
Google translates as:
I read Ruuvi Gateway information using http with the command curl -v http://<RUUVI_GW_IP>/history -H “Authorization: Bearer TOKEN”. The latest firmware v1.13.1 is used
The thing works as long as the internet connection used by Ruuvi Gateway works. If the internet connection is momentarily interrupted, for example due to the restart of the broadband modem, the above command starts to blaspheme: HTTP/1.0 401 Unauthorized. Only when you restore the settings using the Gateway’s Setup Wizard, the command starts working again as it should.
Is this a Gateway feature? Would there be any way for the Gateway to survive the loss of the internet connection?
Marko replied:
Thanks for the bug report, I forwarded the message to the developer. You can follow the progress of the case here: Gateway access using bearer token lost (HTTP/1.0 401 Unauthorised) after network connection loss/restore · Issue #780 · ruuvi/ruuvi.gateway_esp.c · GitHub 4
Hi @dno,
I have not been able to reproduce this problem. I have checked for loss of network connection over Wi-Fi and Ethernet (I tried to reboot the broadband modem). After reconnection, the “/history” request with a valid bearer token works fine. The only situation where a 401 error may be returned is when using an invalid bearer token.
Please try to erase the entire gateway configuration by long pressing the configure button, then configure the gateway from scratch. If the problem persists, please connect the Gateway to a PC and save the logs from the virtual COM-port when attempting to access “/history”.