Announcement

Collapse
No announcement yet.

Gateway showing as 'Unauthorised'

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

  • rahaaas
    replied
    Originally posted by alexbk66 View Post
    I found this
    Perfectly happy to update Mono / whatever the other dependencies are when I can, as long as the system doesn’t explode again...

    Kind of depends on whether you want to support these probably quite common, albeit legacy, systems. Can’t believe it’s not come up before.

    Happy to give the Mono tracing a go in the meantime.

    Your Linux is obviously light years ahead of mine... So. Oooookay. So that would be:
    export MONO_OPTIONS=--trace=E:all export MONO_LOG_MASK=asm export MONO_LOG_LEVEL=debug Right..? Not all that clear where the Mono logs are.

    Leave a comment:


  • rahaaas
    replied
    Originally posted by alexbk66 View Post
    Regarding HS events - you might have a look at my AK Smart Device plugin - the aim was exactly to minimise the use of HS events!
    Will do! It’s going to be a big old job, but sure they’d all benefit from an update. Unless HS4 lives up to the hype .

    Leave a comment:


  • alexbk66
    replied
    I found this

    useful parameters are MONO_LOG_LEVEL=debug and MONO_LOG_MASK=asm, which will make Mono output detailed information about assemblies being loaded. It will come in handy when there is something wrong with the project dependencies.

    Leave a comment:


  • alexbk66
    replied
    Regarding HS events - you might have a look at my AK Smart Device plugin - the aim was exactly to minimise the use of HS events!

    Leave a comment:


  • alexbk66
    replied
    Originally posted by alexbk66 View Post

    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.
    Yeah, it looks like you have .NET before 4.6 - I'm trying to find correlation between Mono version and .NET version - I'm not Linux expert myself.

    I could possibly try to reduce .NET version requirement even further - to say 4.5, but it's probably is better to upgrade Mono.

    Leave a comment:


  • alexbk66
    replied
    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.

    Leave a comment:


  • rahaaas
    replied
    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

    Leave a comment:


  • alexbk66
    replied
    ok, ver BETA 3.0.0.23 should fix your problem, hopefully

    Leave a comment:


  • rahaaas
    replied
    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.

    Leave a comment:


  • alexbk66
    replied
    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

    Leave a comment:


  • rahaaas
    replied
    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..?

    Leave a comment:


  • alexbk66
    replied
    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.

    Leave a comment:


  • alexbk66
    replied
    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

    Leave a comment:


  • alexbk66
    replied
    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...

    Leave a comment:


  • rahaaas
    replied
    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.

    Leave a comment:

Working...
X