Announcement

Collapse
No announcement yet.

Shelly Motion Detector error since v4.0.0.53

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Shelly Motion Detector error since v4.0.0.53

    Hi Alex,

    Since the Shelly plug-in updated itself to v4.0.0.53 I've had lots of errors in the log file. I'm not sure if they are related to the Shelly firmware being updated as well but it's not working anymore. The plug-in keeps recycling every few seconds and I get multiple copies of the error below in the log.

    The Shelly Motion is now on f/w version 20210531-091017/v1.1.2.


    Click image for larger version  Name:	Shelly1.png Views:	0 Size:	184.8 KB ID:	1477731

    I've tried reinstalling the plug-in and deleting the device from HS but when it comes back the same thing happens.

    It looks like after the Shelly F/W update the HS device ID changed as it's now different to the entry in the Action URL on the Shelly device.
    I've also tried clearing out those entries but the old ID keeps coming back.

    Any ideas?

    #2
    Can you please post the errors as text - the screenshot is difficult to read

    Comment


      #3
      Apologies Alex, I thought the image would scale up more than it did. I don't have the actual log file anymore since I've restarted HS and because of the volume of errors I've had to temporarily disable it.
      Let me get it back running and I'll C&P the text for you shortly

      Comment


        #4
        Ignore me, I've got the log file

        Comment


          #5
          Code:
          03/06/2021 18:10:23 AK Shelly Error System.NotImplementedException: SetSetting
          at: HSPI_AKShelly.DeviceShellyRoot.SetSetting[T](String cmd, Int32 index)
          at: HSPI_AKShelly.DeviceShellyRoot.SetSetting(String cmd, Int32 index)
          at: HSPI_AKShelly.DeviceShellyRoot.SetCtrlUrlOld(String url, String which, Int32 index)
          at: HSPI_AKShelly.DeviceShellyRoot.SetCtrlUrl(states state, Int32 RefId, String which, Int32 index)
          at: HSPI_AKShelly.DeviceShellyRoot.SetCtrlUrl(String which, Int32 index)
          at: HSPI_AKShelly.DeviceShellyMotion.SetCtrlUrls()
          at: HSPI_AKShelly.DeviceShellyRoot.SetCtrlUrls(Boolean is_new)
          at: HSPI_AKShelly.DeviceShellyRoot.Init()
          at: HSPI_AKShelly.DeviceShellyRoot.TimerCallback(Object state)
          at: System.Threading.TimerQueueTimer.CallCallbackInContext(Objec t state)
          at: System.Threading.ExecutionContext.RunInternal(ExecutionConte xt executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
          at: System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
          at: System.Threading.TimerQueueTimer.CallCallback()
          at: System.Threading.TimerQueueTimer.Fire()
          at: System.Threading.TimerQueue.FireNextTimers()
          at: System.Threading.TimerQueue.AppDomainTimerCallback(Int32 id)
          03/06/2021 18:10:23 AK Shelly Error NotImplementedException - UnhandledException!!!: SetSetting
          03/06/2021 18:10:23 AK Shelly Error [559] 60A42396074E .shellymotionsensor: SetCtrlUrl (new=True) 'motion_on(0)': Expected 'http://xxxxxxxxxxxxxxxxx@192.168.0.30/json?request=controldevicebyvalue&ref=560&value=-1007', but set ''
          03/06/2021 18:10:19 AK Shelly Info Saved device: shellymotionsensor (SHMOS-01), id: 60A42396074E , url: http://192.168.0.150/
          03/06/2021 18:10:14 HomeSeer Starting Plug-In Plugin AK Shelly started successfully in 162 milliseconds
          03/06/2021 18:10:14 AK Shelly Info 03/06/2021 18:10:14 AK Shelly ver. 4.0.0.53 (4.0.1.33)
          03/06/2021 18:10:14 HomeSeer Starting Plug-In Initializing plugin AK Shelly ...
          03/06/2021 18:10:14 HomeSeer Starting Plug-In AK Shelly loaded in 15084 milliseconds
          03/06/2021 18:09:59 HomeSeer Info Plugin AKShelly with instance AK Shelly has connected. IP:127.0.0.1:61300
          03/06/2021 18:09:58 HomeSeer Warning I/O interface AK Shelly is down, executable is not running, restarting ...
          03/06/2021 18:09:38 HomeSeer Info Plugin AK Shelly with ID: AKShelly and Instance: has disconnected

          Comment


            #6
            One of many examples, from the bottom the plugin has died and then restarted and then errors. I've removed my user/password combo from the URL action.

            Comment


              #7
              on an unrelated note, I'm also seeing this warning on plug-in startup which is referenced in your "mydevices.html" file.

              03/06/2021 21:39:29 HomeSeer Warning File does not exist: C:\Program Files (x86)\HomeSeer HS4\html\AKShelly\abk.css

              Comment


                #8
                Originally posted by Solarfire View Post
                on an unrelated note, I'm also seeing this warning on plug-in startup which is referenced in your "mydevices.html" file.

                03/06/2021 21:39:29 HomeSeer Warning File does not exist: C:\Program Files (x86)\HomeSeer HS4\html\AKShelly\abk.css
                This is normal, I moved abk.css one level up so it's shared between all my plugins. I will remove the reference to this one.

                Comment


                  #9
                  Originally posted by Solarfire View Post
                  Code:
                  03/06/2021 18:10:23 AK Shelly Error System.NotImplementedException: SetSetting
                  at: HSPI_AKShelly.DeviceShellyRoot.SetSetting[T](String cmd, Int32 index)
                  at: HSPI_AKShelly.DeviceShellyRoot.SetSetting(String cmd, Int32 index)
                  at: HSPI_AKShelly.DeviceShellyRoot.SetCtrlUrlOld(String url, String which, Int32 index)
                  at: HSPI_AKShelly.DeviceShellyRoot.SetCtrlUrl(states state, Int32 RefId, String which, Int32 index)
                  at: HSPI_AKShelly.DeviceShellyRoot.SetCtrlUrl(String which, Int32 index)
                  at: HSPI_AKShelly.DeviceShellyMotion.SetCtrlUrls()
                  at: HSPI_AKShelly.DeviceShellyRoot.SetCtrlUrls(Boolean is_new)
                  at: HSPI_AKShelly.DeviceShellyRoot.Init()
                  at: HSPI_AKShelly.DeviceShellyRoot.TimerCallback(Object state)
                  at: System.Threading.TimerQueueTimer.CallCallbackInContext(Objec t state)
                  at: System.Threading.ExecutionContext.RunInternal(ExecutionConte xt executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
                  at: System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
                  at: System.Threading.TimerQueueTimer.CallCallback()
                  at: System.Threading.TimerQueueTimer.Fire()
                  at: System.Threading.TimerQueue.FireNextTimers()
                  at: System.Threading.TimerQueue.AppDomainTimerCallback(Int32 id)
                  03/06/2021 18:10:23 AK Shelly Error NotImplementedException - UnhandledException!!!: SetSetting
                  03/06/2021 18:10:23 AK Shelly Error [559] 60A42396074E .shellymotionsensor: SetCtrlUrl (new=True) 'motion_on(0)': Expected 'http://xxxxxxxxxxxxxxxxx@192.168.0.30/json?request=controldevicebyvalue&ref=560&value=-1007', but set ''
                  03/06/2021 18:10:19 AK Shelly Info Saved device: shellymotionsensor (SHMOS-01), id: 60A42396074E , url: http://192.168.0.150/
                  03/06/2021 18:10:14 HomeSeer Starting Plug-In Plugin AK Shelly started successfully in 162 milliseconds
                  03/06/2021 18:10:14 AK Shelly Info 03/06/2021 18:10:14 AK Shelly ver. 4.0.0.53 (4.0.1.33)
                  03/06/2021 18:10:14 HomeSeer Starting Plug-In Initializing plugin AK Shelly ...
                  03/06/2021 18:10:14 HomeSeer Starting Plug-In AK Shelly loaded in 15084 milliseconds
                  03/06/2021 18:09:59 HomeSeer Info Plugin AKShelly with instance AK Shelly has connected. IP:127.0.0.1:61300
                  03/06/2021 18:09:58 HomeSeer Warning I/O interface AK Shelly is down, executable is not running, restarting ...
                  03/06/2021 18:09:38 HomeSeer Info Plugin AK Shelly with ID: AKShelly and Instance: has disconnected
                  Thank you, I'll check

                  Comment


                    #10
                    Since it's been a quiet weekend, I've been trying a few things and seem to have resolved it. It wasn't an ideal solution but seems to have worked.

                    So, I ended up deleting the device from HS and then deleting and reinstalling the plugin to effectivily start from scratch.
                    That all went well and I left the plugin running for a few hours but it didn't discover the Shelly device even though I could access and manage it directly from its IP address in a browser and the Shelly app on my phone.

                    So I added a device manually from the plugin and corrected the IP address and then it all magically appeared in the console and seems to be working as expected with no errors being logged at all.

                    Quick question for you though, can I rename the device in the console (like all the others) to fix the obsure name it currently has?
                    I seem to recall this causing issues in the past with duplicate devices being generated.


                    Click image for larger version  Name:	Shelly2.png Views:	0 Size:	22.3 KB ID:	1478058

                    Comment


                      #11
                      Originally posted by Solarfire View Post
                      That all went well and I left the plugin running for a few hours but it didn't discover the Shelly device even though I could access and manage it directly from its IP address in a browser and the Shelly app on my phone. So I added a device manually from the plugin and corrected the IP address and then it all magically appeared in the console and seems to be working as expected with no errors being logged at all.

                      Quick question for you though, can I rename the device in the console (like all the others) to fix the obsure name it currently has?
                      I seem to recall this causing issues in the past with duplicate devices being generated.
                      Shelly Motion Sensor supports mDNS (Zeroconf) discovery only after reboot for saving battery. So what I have to do to add a new motion sensor - go to moble app and select reboot in device settings. Then it will appear in HS. I discussed this with Shelly, but since the aim is to save battery - it's not feasible to constantly broadcast mDNS pakets, and they don't see a better solution.

                      Yes, you can change anything including device name. In my plugins I only use device address to identify devices, and the address users can't change. So renaming the device can't cause any duplicate issues.

                      Comment


                        #12
                        And I still need to check the error above, whatever the reason - it shouldn't crash the plugin.

                        Comment


                          #13
                          Looks like I spoke too soon. Having renamed the device yesterday I've woken up to a log file full of errors and duplicate devices in the console.
                          The entry I renamed and the original one is back.

                          The plugin is crashing every minute or probably every time it loads.

                          Click image for larger version  Name:	Shelly3.png Views:	0 Size:	110.1 KB ID:	1478450

                          Code:
                          07/06/2021 11:21:26 HomeSeer Info Plugin AK Shelly with ID: AKShelly and Instance: has disconnected
                          07/06/2021 11:21:24 AK Shelly Error System.NotImplementedException: SetSetting
                          at: HSPI_AKShelly.DeviceShellyRoot.SetSetting[T](String cmd, Int32 index)
                          at: HSPI_AKShelly.DeviceShellyRoot.SetSetting(String cmd, Int32 index)
                          at: HSPI_AKShelly.DeviceShellyRoot.SetCtrlUrlOld(String url, String which, Int32 index)
                          at: HSPI_AKShelly.DeviceShellyRoot.SetCtrlUrl(states state, Int32 RefId, String which, Int32 index)
                          at: HSPI_AKShelly.DeviceShellyRoot.SetCtrlUrl(String which, Int32 index)
                          at: HSPI_AKShelly.DeviceShellyMotion.SetCtrlUrls()
                          at: HSPI_AKShelly.DeviceShellyRoot.SetCtrlUrls(Boolean is_new)
                          at: HSPI_AKShelly.DeviceShellyRoot.Init()
                          at: HSPI_AKShelly.DeviceShellyRoot.TimerCallback(Object state)
                          at: System.Threading.TimerQueueTimer.CallCallbackInContext(Objec t state)
                          at: System.Threading.ExecutionContext.RunInternal(ExecutionConte xt executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
                          at: System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
                          at: System.Threading.TimerQueueTimer.CallCallback()
                          at: System.Threading.TimerQueueTimer.Fire()
                          at: System.Threading.TimerQueue.FireNextTimers()
                          at: System.Threading.TimerQueue.AppDomainTimerCallback(Int32 id)
                          07/06/2021 11:21:24 AK Shelly Error NotImplementedException - UnhandledException!!!: SetSetting
                          07/06/2021 11:21:24 AK Shelly Error [589] 60A42396074E .shellymotionsensor: SetCtrlUrl (new=True) 'motion_on(0)': Expected 'http://xxxxxxxxxxxxxxxxxxxx@192.168.0.30/json?request=controldevicebyvalue&ref=590&value=-1007', but set ''
                          07/06/2021 11:21:22 AK Shelly Info Saved device: shellymotionsensor (SHMOS-01), id: 60A42396074E , url: http://192.168.0.150/
                          07/06/2021 11:21:17 HomeSeer Starting Plug-In Plugin AK Shelly started successfully in 42 milliseconds
                          07/06/2021 11:21:17 AK Shelly Info 07/06/2021 11:21:17 AK Shelly ver. 4.0.0.53 (4.0.1.33)
                          07/06/2021 11:21:17 HomeSeer Starting Plug-In Initializing plugin AK Shelly ...
                          07/06/2021 11:21:17 HomeSeer Starting Plug-In AK Shelly loaded in 15083 milliseconds
                          07/06/2021 11:21:02 HomeSeer Info Plugin AKShelly with instance AK Shelly has connected. IP:127.0.0.1:57925
                          07/06/2021 11:21:02 HomeSeer Warning I/O interface AK Shelly is down, executable is not running, restarting ...
                          07/06/2021 11:20:42 HomeSeer Info Plugin AK Shelly with ID: AKShelly and Instance: has disconnected

                          Comment


                            #14
                            There's also an issue with the I/O URL Actions. The plug-in isn't updating them for the new device ID number for the new device in HS. If I delete the I/O URL Actions from the Shelly App they keep re-appearing after a device reboot. No idea what's putting them back but I can't remove them and they keep resetting with an old device number, even with the plug-in disabled.

                            Comment


                              #15
                              What exactly did you do, just rename the device?

                              Comment

                              Working...
                              X