Announcement

Collapse
No announcement yet.

Gateway showing as 'Unauthorised'

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

    #16
    Well, props for dedication! Lockdown in London, so pretty early nights to cope with home-schooling...

    Am running BETA 3.0.0.21.

    I'm SSHing into the SEL, so not seeing the boot / HS initialisation, if that's what we need? Can get a monitor on it in a squeeze, but assuming there'll be a log the startup somewhere?

    In case you wanted to see my Plugin config page:

    Click image for larger version  Name:	Screenshot 2020-04-05 at 23.56.22.png Views:	0 Size:	28.6 KB ID:	1375336
    Also notice the Device config page now has 'App "key"' on it, if that's a thing.

    Click image for larger version  Name:	Screenshot 2020-04-05 at 23.56.02.png Views:	0 Size:	127.0 KB ID:	1375335
    Thanks for all so far.

    R.

    Comment


      #17
      Originally posted by rahaaas View Post
      Well, props for dedication! Lockdown in London, so pretty early nights to cope with home-schooling...

      Am running BETA 3.0.0.21.

      I'm SSHing into the SEL, so not seeing the boot / HS initialisation, if that's what we need?
      How do you start HS? Via SSH?

      When you enter the hub KEY - the plugin should generate the appName - then request the appKey from Gateway. Since you don't even have the appName - means there's some problem before trying to get the appKey.

      Did you try both config pages? I fixed the Device Config, may be you get more lucky.

      I'll have to add more logging to trace the whole path....

      Comment


        #18
        Yep. Tried both config pages.

        HA runs on its own headless SEL box, and so the server starts automatically at boot.

        Comment


          #19
          Originally posted by rahaaas View Post
          Yep. Tried both config pages.

          HA runs on its own headless SEL box, and so the server starts automatically at boot.
          Do you mean HS? Yeah, for troubleshooting probably the easiest is to connect a display. You can try SSH and restart HS from the SSH window too.

          Comment


            #20
            Originally posted by alexbk66 View Post
            I'll have to add more logging to trace the whole path....
            Ok, please try ver. 3.0.0.22 (BETA) - added more logging, also I generate the appKey earlier.

            If still doesn't work - please send me the logs.

            Comment


              #21
              Can’t get a display hooked up easily today. Have had a scoot through the logs in usr/local/Homeseer/Logs, and nothing standing out as relevant. Not sure where else I should be looking, to be honest...

              The HS Log itself with 3.0.0.22 (BETA). The two top lines just then log on repeat until stopped:
              Apr-06 11:16:17 AK Ikea [164]: Not ok: hubkey 'XXXXXXXXXXXXXXXX', app '', appkey: ''
              Apr-06 11:16:17 AK Ikea Warning [164]: CheckTradfriController: app '' key '' ok False
              Apr-06 11:16:16 AK Ikea Warning [164]: SaveIkeaDevice receiver: Unknown
              Apr-06 11:16:16 AK Ikea Warning [164]: Set hub key: XXXXXXXXXXXXXXXX, receiver: [newIkea] New Receiver (192.168.1.97)
              Apr-06 11:16:16 AK Ikea [164]: Not ok: hubkey '', app '', appkey: ''
              Apr-06 11:16:16 AK Ikea Warning [164]: CheckTradfriController: app '' key '' ok False
              Apr-06 11:16:15 AK Ikea [164]: Not ok: hubkey '', app '', appkey: ''
              Apr-06 11:16:07 AK Ikea Warning [164]: CheckTradfriController: app '' key '' ok False
              Apr-06 11:16:06 AK Ikea [164]: Not ok: hubkey '', app '', appkey: ''
              Apr-06 11:16:06 AK Ikea Warning [164]: CheckTradfriController: app '' key '' ok False
              Apr-06 11:16:05 AK Ikea [164]: Not ok: hubkey '', app '', appkey: ''
              Apr-06 11:16:05 AK Ikea Warning [164]: CheckTradfriController: app '' key '' ok False
              Apr-06 11:16:04 AK Ikea Warning [164]: SaveIkeaDevice receiver: Unknown
              Apr-06 11:16:04 AK Ikea Warning [164]: Set hub key: , receiver: [newIkea] New Receiver (192.168.1.97)
              Apr-06 11:16:04 AK Ikea Warning [164]: SaveIkeaDevice receiver: Unknown
              Apr-06 11:16:04 AK Ikea Warning [164]: [newIkea] New Receiver (127.0.0.1): Setting new IP address: 192.168.1.97:80
              Apr-06 11:15:53 AK Ikea [0]: * Set Ikea [newIkea] New Receiver (127.0.0.1) (HSPI_AKIkea.DeviceIkeaBridge) Same: False
              Apr-06 11:15:53 AK Ikea Saved device: newIkea (newIkea), id: Unknown, url: 127.0.0.1:80
              Apr-06 11:15:38 AK Ikea Warning Running on 'linux' - using Locator.MonoZeroconf.DeviceLocator
              Apr-06 11:15:38 AK Ikea ERROR Locator.MonoZeroconf.DeviceLocator: FATAL CreateListener: No Zeroconf providers could be found or initialized. Necessary daemon may not be running.

              Comment


                #22
                Originally posted by rahaaas View Post
                Can’t get a display hooked up easily today. Have had a scoot through the logs in usr/local/Homeseer/Logs, and nothing standing out as relevant. Not sure where else I should be looking, to be honest...

                The HS Log itself with 3.0.0.22 (BETA). The two top lines just then log on repeat until stopped:

                Thank you, I'll compare with my logs - what's strange "Set hub key: , " doesn't have any hubKey...

                Comment


                  #23
                  BTW, if your Zeroconf (mDNS) didn't work - how did you create the bridge device? What's the sequence? I'll try to reproduce.

                  [EDIT]

                  Actually, if I disable mDNS and add receiver manually - I think I can reproduce the problem

                  Comment


                    #24
                    Ok the problem is - from mDNS I get the Gateway ID, but when you add the receiver manually - the ID is empty.

                    So, I will set the ID to the hubKey in this case.

                    Comment


                      #25
                      Yep - that’s it. I’m manually adding the IP and Security Key from the plugin manager, then going to the Device Config.

                      Know it’s not terminal, but bit odd that ZeroConf isn’t working. I wonder if that’s related to the old Mono (it’s back on 3.2.8)?

                      And is the lack of .ini files is because there are no preferences being written yet..?

                      Comment


                        #26
                        Originally posted by rahaaas View Post
                        Yep - that’s it. I’m manually adding the IP and Security Key from the plugin manager, then going to the Device Config.

                        Know it’s not terminal, but bit odd that ZeroConf isn’t working. I wonder if that’s related to the old Mono (it’s back on 3.2.8)?

                        And is the lack of .ini files is because there are no preferences being written yet..?
                        I'm fixing manual device creation now, that's the priority.

                        Regarding Zeroconf - we'll sort it out later, but why did you change back to Mono 3? Users are happy with 5.x

                        Comment


                          #27
                          Awesome.

                          I reverted back because the upgrade totally destroyed my Events - seems to be an issue that upgrading from 3 kills all the IF functions, which relied on the old framework, with the worst case being recreating them all from scratch. Which would be a horror. Hope Malcolm from the other thread swerved this.

                          Rolling back and doing a full restore from a mercifully recent backup got them back. I’m a bit too reliant on Events to risk losing them again until I get some time to explore whether an export / import or similar will work / recreate the critical ones... eugh.

                          I don’t know how typical I am, but I’d imagine there would be a certain amount of the user base still on 3.x, as it looks to be what HS’ own systems came with until mid-2018. But I totally understand your frustration at supporting such legacy cruft.

                          Comment


                            #28
                            ok, ver BETA 3.0.0.23 should fix your problem, hopefully

                            Comment


                              #29
                              Well. Yes! Some progress...

                              Nothing initially. Then an error in the plug-in status as before (not listed). A reinstall got it working...

                              Picked up the Gateway, and then had a think. No devices found (should be 6x FUTYR blinds, a couple of remotes and a repeater).

                              Then the warning triangle:

                              Click image for larger version

Name:	Screenshot 2020-04-06 at 15.14.25.png
Views:	72
Size:	60.4 KB
ID:	1375459

                              Aaaaaaand the log meantime:
                              Apr-06 15:10:11 AK Ikea ERROR [164]: Request failed() : /15004
                              Apr-06 15:10:11 AK Ikea ERROR [164]: ERROR MakeRequest(/15001): System.ArgumentNullException: Argument cannot be null. Parameter name: s at System.Text.Encoding.GetBytes (System.String s) [0x00000] in :0 at Tradfri.TradfriController.MakeDTLSClientEndPoint (System.String Octet_k, System.String KeyIdentifier) [0x00000] in :0 at Tradfri.TradfriController.ConnectAppKey (System.String appKey, System.String appName) [0x00000] in :0 at Tradfri.TradfriController.ConnectAppKey () [0x00000] in :0 at Tradfri.TradfriController+d__41.MoveNext () [0x00000] in :0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in :0 at System.Runtime.CompilerServices.TaskAwaiter`1[System.String].GetResult () [0x00000] in :0 at Tradfri.TradfriController+d__39.MoveNext () [0x00000] in :0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in :0 at System.Runtime.CompilerServices.TaskAwaiter`1[System.String].GetResult () [0x00000] in :0 at Tradfri.TradfriController+d__37`1[System.Collections.Generic.List`1[System.Int64]].MoveNext () [0x00000] in :0
                              Apr-06 15:10:11 AK Ikea ERROR [164]: Request failed() : /15001
                              Apr-06 15:10:10 AK Ikea ERROR [164]: ERROR MakeRequest(/15004): System.ArgumentNullException: Argument cannot be null. Parameter name: s at System.Text.Encoding.GetBytes (System.String s) [0x00000] in :0 at Tradfri.TradfriController.MakeDTLSClientEndPoint (System.String Octet_k, System.String KeyIdentifier) [0x00000] in :0 at Tradfri.TradfriController.ConnectAppKey (System.String appKey, System.String appName) [0x00000] in :0 at Tradfri.TradfriController.ConnectAppKey () [0x00000] in :0 at Tradfri.TradfriController+d__41.MoveNext () [0x00000] in :0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in :0 at System.Runtime.CompilerServices.TaskAwaiter`1[System.String].GetResult () [0x00000] in :0 at Tradfri.TradfriController+d__39.MoveNext () [0x00000] in :0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in :0 at System.Runtime.CompilerServices.TaskAwaiter`1[System.String].GetResult () [0x00000] in :0 at Tradfri.TradfriController+d__37`1[System.Collections.Generic.List`1[System.Int64]].MoveNext () [0x00000] in :0
                              Apr-06 15:10:10 AK Ikea ERROR [164]: Request failed() : /15004
                              Apr-06 15:10:10 AK Ikea ERROR [164]: ERROR MakeRequest(/15001): System.ArgumentNullException: Argument cannot be null. Parameter name: s at System.Text.Encoding.GetBytes (System.String s) [0x00000] in :0 at Tradfri.TradfriController.MakeDTLSClientEndPoint (System.String Octet_k, System.String KeyIdentifier) [0x00000] in :0 at Tradfri.TradfriController.ConnectAppKey (System.String appKey, System.String appName) [0x00000] in :0 at Tradfri.TradfriController.ConnectAppKey () [0x00000] in :0 at Tradfri.TradfriController+d__41.MoveNext () [0x00000] in :0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in :0 at System.Runtime.CompilerServices.TaskAwaiter`1[System.String].GetResult () [0x00000] in :0 at Tradfri.TradfriController+d__39.MoveNext () [0x00000] in :0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in :0 at System.Runtime.CompilerServices.TaskAwaiter`1[System.String].GetResult () [0x00000] in :0 at Tradfri.TradfriController+d__37`1[System.Collections.Generic.List`1[System.Int64]].MoveNext () [0x00000] in :0
                              Apr-06 15:10:10 AK Ikea ERROR [164]: Request failed() : /15001
                              Apr-06 15:10:09 AK Ikea ERROR [164]: ERROR MakeRequest(/15004): System.ArgumentNullException: Argument cannot be null. Parameter name: s at System.Text.Encoding.GetBytes (System.String s) [0x00000] in :0 at Tradfri.TradfriController.MakeDTLSClientEndPoint (System.String Octet_k, System.String KeyIdentifier) [0x00000] in :0 at Tradfri.TradfriController.ConnectAppKey (System.String appKey, System.String appName) [0x00000] in :0 at Tradfri.TradfriController.ConnectAppKey () [0x00000] in :0 at Tradfri.TradfriController+d__41.MoveNext () [0x00000] in :0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in :0 at System.Runtime.CompilerServices.TaskAwaiter`1[System.String].GetResult () [0x00000] in :0 at Tradfri.TradfriController+d__39.MoveNext () [0x00000] in :0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in :0 at System.Runtime.CompilerServices.TaskAwaiter`1[System.String].GetResult () [0x00000] in :0 at Tradfri.TradfriController+d__37`1[System.Collections.Generic.List`1[System.Int64]].MoveNext () [0x00000] in :0
                              Apr-06 15:10:09 AK Ikea ERROR [164]: Request failed() : /15004
                              Apr-06 15:10:09 AK Ikea ERROR [164]: ERROR MakeRequest(/15001): System.ArgumentNullException: Argument cannot be null. Parameter name: s at System.Text.Encoding.GetBytes (System.String s) [0x00000] in :0 at Tradfri.TradfriController.MakeDTLSClientEndPoint (System.String Octet_k, System.String KeyIdentifier) [0x00000] in :0 at Tradfri.TradfriController.ConnectAppKey (System.String appKey, System.String appName) [0x00000] in :0 at Tradfri.TradfriController.ConnectAppKey () [0x00000] in :0 at Tradfri.TradfriController+d__41.MoveNext () [0x00000] in :0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in :0 at System.Runtime.CompilerServices.TaskAwaiter`1[System.String].GetResult () [0x00000] in :0 at Tradfri.TradfriController+d__39.MoveNext () [0x00000] in :0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in :0 at System.Runtime.CompilerServices.TaskAwaiter`1[System.String].GetResult () [0x00000] in :0 at Tradfri.TradfriController+d__37`1[System.Collections.Generic.List`1[System.Int64]].MoveNext () [0x00000] in :0
                              Apr-06 15:10:09 AK Ikea ERROR [164]: Request failed() : /15001
                              Apr-06 15:10:08 AK Ikea ERROR [164]: ConnectGateway: System.MissingMethodException: Method not found: 'System.Array.Empty'. at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.S erializeConvertable (Newtonsoft.Json.JsonWriter writer, Newtonsoft.Json.JsonConverter converter, System.Object value, Newtonsoft.Json.Serialization.JsonContract contract, Newtonsoft.Json.Serialization.JsonContainerContract collectionContract, Newtonsoft.Json.Serialization.JsonProperty containerProperty) [0x00000] in :0 at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.S erializeValue (Newtonsoft.Json.JsonWriter writer, System.Object value, Newtonsoft.Json.Serialization.JsonContract valueContract, Newtonsoft.Json.Serialization.JsonProperty member, Newtonsoft.Json.Serialization.JsonContainerContract containerContract, Newtonsoft.Json.Serialization.JsonProperty containerProperty) [0x00000] in :0 at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.S erializeObject (Newtonsoft.Json.JsonWriter writer, System.Object value, Newtonsoft.Json.Serialization.JsonObjectContract contract, Newtonsoft.Json.Serialization.JsonProperty member, Newtonsoft.Json.Serialization.JsonContainerContract collectionContract, Newtonsoft.Json.Serialization.JsonProperty containerProperty) [0x00000] in :0
                              Apr-06 15:09:51 AK Ikea Warning [164]: [newIkea] New Receiver (127.0.0.1): Setting new IP address: 192.168.1.97:80
                              Apr-06 15:09:38 AK Ikea [0]: * Set Ikea [newIkea] New Receiver (127.0.0.1) (HSPI_AKIkea.DeviceIkeaBridge) Same: False
                              Apr-06 15:09:38 AK Ikea Saved device: newIkea (newIkea), id: Unknown, url: 127.0.0.1:80
                              Apr-06 15:09:34 AK Ikea Warning Running on 'linux' - using Locator.MonoZeroconf.DeviceLocator
                              Apr-06 15:09:34 AK Ikea ERROR Locator.MonoZeroconf.DeviceLocator: FATAL CreateListener: No Zeroconf providers could be found or initialized. Necessary daemon may not be running.
                              Apr-06 15:09:34 Plug-In Finished initializing plug-in AK Ikea
                              Apr-06 15:09:34 Starting Plug-In AK Ikea loaded in 2763 milliseconds
                              Apr-06 15:09:34 Starting Plug-In Plugin AK Ikea started successfully in 840 milliseconds

                              Comment


                                #30
                                Originally posted by rahaaas View Post
                                Well. Yes! Some progress...

                                System.MissingMethodException: Method not found: 'System.Array.Empty'.
                                That's the .NET version problem. I'll check the dependency of Newtonsoft.Json library - since it's not my code - I don't have much control, unless I compile from source.

                                Comment

                                Working...
                                X