401 Unauthorized and other funny issues

  • Hello dear community,

    I have problem with only 1 Shelly 2.5 in my Network, all others working fine.

    Input:

    • Shelly 2.5 controlling shutters, so it is in "Roller Shutter" mode.
    • Shelly is in a WLAN with good signal, there are 2 more shellys without problems in the same Box.
    • Shelly is password protected.
    • Firmware: 20210720-184734/v1.11.0-g6abd92e

    Problems:

    1. Since I add Shelly to the App and I can see it and change settings, but, as soon I try to put, any percent to open/close is, see this nice 401 error. From the WLAN or LTE:
      Der Inhalt kann nicht angezeigt werden, da Sie keine Berechtigung haben, diesen Inhalt zu sehen.

      When I try to click on close - device being lost...
      Der Inhalt kann nicht angezeigt werden, da Sie keine Berechtigung haben, diesen Inhalt zu sehen.
    2. When I goes to shelly http server directly OR shelly cloud: I can control it without problems. BUT some settings could not be changed, e.g. enable reboot could not be enabled, but shown as enabled from the application:
      Der Inhalt kann nicht angezeigt werden, da Sie keine Berechtigung haben, diesen Inhalt zu sehen.

      But always dropped from the webUI:
      Der Inhalt kann nicht angezeigt werden, da Sie keine Berechtigung haben, diesen Inhalt zu sehen.

    3. Here is debug log.
      4535839649 mgos_http_server.c:180 0x3fff2cac HTTP connection from 192.168.0.22:39394
      4538932537 cloud_aes.c:569 free mem: 36368 / 26704, bytes to send: 288 4539027796 cloud_common.c:1129 Cmd: status 4539032019 cloud_common.c:144 Confirmed status serial 119 4539036913 cloud_common.c:1132 Cloud clear status timer 4539042992 cloud_aes.c:569 free mem: 36484 / 26704, bytes to send: 32 4539315253 shelly_sntp.c:433 minute tick at 10:31:00

      control Via UI

      4870054386 mgos_http_server.c:180 0x3fff2cec HTTP connection from 192.168.0.58:57588
      4870062399 roller.c:82 ========= roller 0 move direction=1 time=0 4870067541 roller.c:101 ========= roller 0 moved 0, at pos=96 4870072030 switch.c:1107 Relay on pin 4 changed state 0 to 1 4870076164 powermeter.c:97 pm measure interval: 200 4870102893 mgos_http_server.c:180 0x3fff2e1c HTTP connection from 192.168.0.58:57589 4870118638 json.c:420 RAM: 49944 total, 34704 free 4870297377 json.c:420 RAM: 49944 total, 35380 free 4870305353 cloud_aes.c:569 free mem: 35284 / 26704, bytes to send: 1248 4870310818 cloud_common.c:1542 Stop status keep alive timer 4870362114 cloud_common.c:1129 Cmd: status 4870366327 cloud_common.c:144 Confirmed status serial 128 4870370281 cloud_common.c:1132 Cloud clear status timer 4870377301 cloud_aes.c:569 free mem: 36368 / 26704, bytes to send: 32 4871263202 mgos_http_server.c:180 0x3fff2e74 HTTP connection from 192.168.0.58:57590

    Einmal editiert, zuletzt von GAS85 (30. Juli 2021 um 10:38)

  • Der Inhalt kann nicht angezeigt werden, da Sie keine Berechtigung haben, diesen Inhalt zu sehen.

    Hi,

    Remove "Restrict the web interface of.......", it´s working for me

  • Der Inhalt kann nicht angezeigt werden, da Sie keine Berechtigung haben, diesen Inhalt zu sehen.

    Hi,

    Remove "Restrict the web interface of.......", it´s working for me

    Yap, then it works. But this is not a good idea to have it in common LAN free accessible.

    Meanwhile I found how to solve it, but not what is exact root cause.

    When Bug appears: When user restrict access with User Name and Password, before to attach it to the Android/iOS App, or when attached via direct access to the web interface.

    In this case something is wrong with an app: some functions are not working, but some of them are working fine. Seems it not saving password correct, or not using it correct in all modules.

    How to solve it:

    Remove "Restrict the web interface of......."

    2. Restrict it with password via Android/iOS Application, not via direct WebUI access.

    3. Profit. You will never see 401 error in Application again, and Unit is User/Password protected.