Announcement

Collapse
No announcement yet.

3.0.0.66 errors on plugin start

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

    3.0.0.66 errors on plugin start

    I'm getting the following errors when starting up:


    10/10/2020 2:20:21 PM
    HomeSeer
    Info
    Plugin AK Shelly with ID: and Instance: has disconnected

    10/10/2020 2:20:19 PM
    Legacy-Plugin
    AK Shelly ERROR
    Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: <. Path '', line 0, position 0. at: Newtonsoft.Json.JsonTextReader.ParseValue() at: Newtonsoft.Json.JsonTextReader.Read() at: Newtonsoft.Json.Linq.JObject.Load(JsonReader reader, JsonLoadSettings settings) at: Newtonsoft.Json.Linq.JObject.Parse(String json, JsonLoadSettings settings) at: HSPI_AKShelly.DeviceShellyRoot.Execute[T](String command, Object json, Int32 timeout, Method method, Boolean dontClearErr) at: HSPI_AKShelly.DeviceShellyRoot.GetSettings(String cmd) at: HSPI_AKShelly.DeviceShellyRoot.InitCallback(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)

    10/10/2020 2:20:19 PM
    Legacy-Plugin
    AK Shelly ERROR
    Unexpected character encountered while parsing value: <. Path '', line 0, position 0.

    10/10/2020 2:20:19 PM
    Legacy-Plugin
    AK Shelly ERROR
    UnhandledException!!!



    I have tried to disable plugin, reboot and start again, but same issue. If I leave the plugin active, eventually it reports a plugin error and sometimes shows "loaded remotely". Either way, I can't access the config page etc.

    What's my best course of action?

    #2
    Originally posted by richardfj View Post
    I'm getting the following errors when starting up:

    Code:
    [SIZE=16px][COLOR=#212529][FONT=Roboto][FONT=B612 Mono][COLOR=#FF0000]Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: <. Path '', line 0, position 0.
    at: Newtonsoft.Json.JsonTextReader.ParseValue()
    at: Newtonsoft.Json.JsonTextReader.Read()
    at: Newtonsoft.Json.Linq.JObject.Load(JsonReader reader, JsonLoadSettings settings)
    at: Newtonsoft.Json.Linq.JObject.Parse(String json, JsonLoadSettings settings)
    at: HSPI_AKShelly.DeviceShellyRoot.Execute[T](String command, Object json, Int32 timeout, Method method, Boolean dontClearErr)
    at: HSPI_AKShelly.DeviceShellyRoot.GetSettings(String cmd)
    at: HSPI_AKShelly.DeviceShellyRoot.InitCallback(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)[/COLOR][/FONT][/FONT][/COLOR][/SIZE]
    The "Unexpected character" is "<" - which means that instead of JSON response you get HTML, which is often returned error form your router.

    Is there any additional info in the logs?

    I'll check the source code and add log for the received message which should help troubleshooting.

    Comment


      #3
      richardfj please enable Log for the device and see if there's more clue

      [EDIT]

      Ver 3.0.0.66 (in BETA section of the updater) - I added error handling/logging, please install and check errors in the log

      Comment


        #4
        Originally posted by alexbk66 View Post
        richardfj please enable Log for the device and see if there's more clue

        [EDIT]

        Ver 3.0.0.66 (in BETA section of the updater) - I added error handling/logging, please install and check errors in the log
        I was "lucky" to have same issue - when one of the shellies IP address changed. Normally mDNS (Zeroconf) should pickup the change and update the address internally.

        But because the new IP was pointing to another existing device (not Shelly) - the device was returning HTML error reply which Shelly couldn't handle

        404 Not Found

        Anyways, I hope ver. 3.0.0.68 (in BETA section) fixes your problem.

        Comment


          #5
          I realized the same thing myself. I had attempted to move the Shelly relays to a separate VLAN, so the IPs had changed. As soon as I cleared up the IP addresses, the plugin started normally and I could change the setting in HS no problem.

          On a related note, have you had any luck getting the Shelly relays to work on a VLAN? I tried for days, but for some reason the relays refuse to grab an IP address (static or DHCP) when I connect to a VLAN that isn’t the default. I’m using a UniFi system in case that matters.

          Comment


            #6
            Originally posted by richardfj View Post
            I realized the same thing myself. I had attempted to move the Shelly relays to a separate VLAN, so the IPs had changed. As soon as I cleared up the IP addresses, the plugin started normally and I could change the setting in HS no problem.

            On a related note, have you had any luck getting the Shelly relays to work on a VLAN? I tried for days, but for some reason the relays refuse to grab an IP address (static or DHCP) when I connect to a VLAN that isn’t the default. I’m using a UniFi system in case that matters.
            What exactly is a problem on VLAN, I mean how does it manifest? Quite possible that mDNS (Zeroconf) won't work, but you can add devices manually (hope it still works - haven't checked for a long time).

            Most reliable mDNS is Bonjour Print Services for Windows - if you install it and restart the plugin - AKShelly should detect the service and switch to Mono.Zeroconf provider.

            Also, you should be able to verify communication without HS/AKShelly, just in the browser (Firefox is the best for JSON) go to http://192.168.1.3/shelly (where IP adress of your Shelly) and it should reply with JSON:

            {"type":"SHSW-PM","mac":"A4CF12F3F9F4","auth":false,"fw":"20200827-070450/v1.8.3@4a8bc427","longid":1,"num_outputs":1,"num_meters":1}

            Click image for larger version

Name:	Screenshot 2020-10-12 235206.jpg
Views:	93
Size:	23.6 KB
ID:	1425569

            Comment


              #7
              Actually, it’s not an issue of the plugin. The Shelly relay won’t grab a connection to my network at all.

              My default VLAN is 192.168.0.0/24, and I can either connect the Shelly relays via static (eg 192.168.0.10) or DHCP (although static seems much more reliable). I do a factory reset on the relay, connect it to the SSID that is provisioned on the default VLAN and everything works as normal.

              If I try to connect the relay to the SSID that is on my IoT VLAN (1) (which is 192.168.1.0/24), and assign a static IP when setting it up, eg. 192.168.1.10, it won’t connect. The relay authenticates to the SSID and I show the relay as authenticated in the controller log, but it doesn’t get an IP address and is inaccessible.

              I can connect other devices to the IoT VLAN and everything works as expected.

              So, not a plugin issue. Just curious if you had run into anything similar.

              Comment


                #8
                Originally posted by richardfj View Post
                So, not a plugin issue. Just curious if you had run into anything similar.
                No, but you can try Shelly support resources:

                https://shelly.cloud/support/
                https://www.shelly-support.eu/lexikon/
                https://www.facebook.com/groups/shel...6781668087857/


                [EDIT] All I can think of - firewall? Just for test try to disable temporary.

                Comment


                  #9
                  Thanks. Will do.

                  Comment


                    #10
                    Good luck

                    Comment

                    Working...
                    X