Fresh Starling install: Connection error

Posted on
Tue Nov 01, 2022 2:58 pm
hwitten offline
Posts: 627
Joined: Dec 26, 2007
Location: British Columbia

Fresh Starling install: Connection error

Big THANK YOU for the plugin.
A bit of a hiccup to get it going.

Have tried with and without TLS.
Checked and double-checked Hub IP and API Key.
Entered API key manually in case cut/paste acted up.
Deleted/created Starling Hub device several times.

Code: Select all
Event Log: Starling Bridge Error           Access Starling Hub failed with a connection error. Retrying . . .


Indigo 2022.1.2
Starling Bridge Plugin Information:
================================================================================
Plugin Name: Starling Bridge
Plugin Version: 2022.0.5
Plugin ID: com.autologplugin.indigoplugin.starlingBridge
Indigo Version: 2022.1.2
Indigo License: ActiveSubscription
Indigo API Version: 3.1
Architecture: arm64
Python Version: 3.10.2
Mac OS Version: 11.7
Plugin Process ID: 56229
================================================================================

All Nest devices are showing in Create New Devices using Type Starling Bridge..

What did I miss?

Starling works ok in HomeKit.

Forgot: Running Indigo on M1 - Big Sur.

Got a successful connect via http from web browser using the API key.

Posted on
Wed Nov 02, 2022 3:24 am
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Fresh Starling install: Connection error

The version of the plugin you have installed (v2022.0.5) is an older one.

Try the latest pre-release, available here: Starling Bridge Pre-Release 2022.0.19

Hopefully that will get you working. :)

Posted on
Wed Nov 02, 2022 11:38 am
hwitten offline
Posts: 627
Joined: Dec 26, 2007
Location: British Columbia

Re: Fresh Starling install: Connection error

No luck.

Code: Select all
   
   Starting plugin "Starling Bridge 2022.0.19" (pid 60280)
   Starling Bridge Warning         Filtering active for the following Nest device(s):
                                   Hub Device(s)

   Started plugin "Starling Bridge 2022.0.19"
   Starling Bridge Error           Access Starling Hub failed with a connection error. Retrying . . .


When I try from a browser:
{"apiVersion":2.5,"apiReady":true,"connectedToNest":true,"appName":"HWnest","permissions":{"read":true,"write":true,"camera":false}}

====

When I first updated the Plugin I got this error:
Code: Select all
   Stopped plugin Starling Bridge
   Upgrading plugin Starling Bridge to newer version 2022.0.19 (previous version moved to trash)
   Loading plugin "Starling Bridge 2022.0.19" using API v3.0
   Starting plugin "Starling Bridge 2022.0.19" (pid 60076)
   Starling Bridge Warning         Filtering active for the following Nest device(s):
                                   Hub Device(s)

   Started plugin "Starling Bridge 2022.0.19"
   Starling Bridge Error           Access Starling Hub failed: 401 Client Error: Unauthorized for url: http://192.168.2.140:3080/api/connect/v1/status?key=xVrEMuNZZcJY%0Aedit%09%0AxVrEMuNZZcJY%0Aedit%09%0AxVrEMuNZZcJY%0Aedit%09%0AxVrEMuNZZcJY


From browser:
{"status":"Error","code":"INVALID_API_KEY","message":"API key specified is invalid, or does not have the right permissions for this request."}

API Key looks right and only got that error the very first time.

Posted on
Wed Nov 02, 2022 12:42 pm
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Fresh Starling install: Connection error

I think the key is incorrect.

It looks like the key has some line feeds in it (\x0A is the escaped hexadecimal Line Feed) and so you can't see the whole field in the Indigo UI as the field is only one line deep.

You can try performing a CMD-A and then delete or keep pressing the delete button to clear the field.

You can check the key in the Hub by right clicking the Indigo Starling Hub device and click Print Device Details to Event Log. You will see an ownerProps : com.autologplugin.indigoplugin.starlingBridge : (dict) entry that contains a field named api_key. This is the key the plugin is using to send to the Starling Hub.

Posted on
Wed Nov 02, 2022 2:27 pm
hwitten offline
Posts: 627
Joined: Dec 26, 2007
Location: British Columbia

Re: Fresh Starling install: Connection error

Key is correct and no leading or trailing spaces.

I'll generate new key and try it.

Should Hub Security be on or off? (SSL/TLS)

Posted on
Wed Nov 02, 2022 2:35 pm
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Fresh Starling install: Connection error

hwitten wrote:
Key is correct and no leading or trailing spaces.

I'll generate new key and try it.

Should Hub Security be on or off? (SSL/TLS)

You checked using the print device to event log?

(SSL/TLS option: doesn't matter which you use, though it is more secure if turned on, which probably isn't an issue on a local network?

Posted on
Wed Nov 02, 2022 2:40 pm
hwitten offline
Posts: 627
Joined: Dec 26, 2007
Location: British Columbia

Re: Fresh Starling install: Connection error

Changed API key. Deleted old one. Restarted Starling Hub.

Reloaded Plugin.

Access Starling Hub failed: 401 Client Error: Unauthorized for url: http://192.168.2.140:3080/api/connect/v ... rEMuNZZcJY

The key= is correct as new key

The edit, etc. is the old key.

Posted on
Wed Nov 02, 2022 2:48 pm
hwitten offline
Posts: 627
Joined: Dec 26, 2007
Location: British Columbia

Re: Fresh Starling install: Connection error

Yes re Print Device details to event log.
This is current one showing new api key.

works in browser: http://192.168.2.140:3080/api/connect/v ... dmRWWfuK0N

pasted from event log: http://192.168.2.140:3080/api/connect/v ... rEMuNZZcJY

gives error:
{"status":"Error","code":"INVALID_API_KEY","message":"API key specified is invalid, or does not have the right permissions for this request."}

Plugin sending too much?


Nov 2, 2022 at 1:40:38 PM
Script address : 192.168.2.140
batteryLevel : None
buttonGroupCount : 0
configured : True
description :
deviceTypeId : starlingHub
displayStateId : status
displayStateImageSel : SensorOff
displayStateValRaw : Disconnected
displayStateValUi : Disconnected
enabled : True
energyAccumBaseTime : None
energyAccumTimeDelta : None
energyAccumTotal : None
energyCurLevel : None
errorState :
folderId : 0
globalProps : MetaProps : (dict)
com.autologplugin.indigoplugin.starlingBridge : (dict)
address : 192.168.2.140 (string)
api_key : kzdmRWWfuK0N
edit
xVrEMuNZZcJY
edit
xVrEMuNZZcJY
edit
xVrEMuNZZcJY (string)
starling_hub_ip : 192.168.2.140 (string)
starling_hub_ssl_tls : false (bool)
id : 657958290
lastChanged : 2022-11-02 13:37:31
lastSuccessfulComm : 2022-11-02 13:37:31
model : Starling Hub
name : Starling Hub
ownerProps : com.autologplugin.indigoplugin.starlingBridge : (dict)
address : 192.168.2.140 (string)
api_key : kzdmRWWfuK0N
edit
xVrEMuNZZcJY
edit
xVrEMuNZZcJY
edit
xVrEMuNZZcJY (string)
starling_hub_ip : 192.168.2.140 (string)
starling_hub_ssl_tls : false (bool)
pluginId : com.autologplugin.indigoplugin.starlingBridge
pluginProps : emptyDict : (dict)
protocol : Plugin
remoteDisplay : True
sharedProps : com.indigodomo.indigoserver : (dict)
states : States : (dict)
api_ready : false (bool)
api_version : 0 (integer)
app_name : (string)
connected_to_nest : false (bool)
permission_camera : false (bool)
permission_read : false (bool)
permission_write : false (bool)
status : Disconnected (string)
status_message : HTTP Error (string)
subModel : Other,ui=Hub
subType : Other
supportsAllLightsOnOff : False
supportsAllOff : False
supportsStatusRequest : False
version : None

Posted on
Wed Nov 02, 2022 3:29 pm
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Fresh Starling install: Connection error

hwitten wrote:
...
api_key : kzdmRWWfuK0N
edit
xVrEMuNZZcJY
edit
xVrEMuNZZcJY
edit
xVrEMuNZZcJY (string)
...


As I suspected, the key is wrong and has been corrupted. It spans across multiple lines.

I suggest you:
  1. Delete the Indigo Starling Hub device.
  2. Then reload the plugin to be on the safe side.
  3. Then create a new Starling Hub device but don't copy and paste the API Key type it in manually.
  4. Then once it is saved, print the device to the log so we can check the key is being saved correctly.

Let's see how that goes? :)

Posted on
Wed Nov 02, 2022 3:37 pm
hwitten offline
Posts: 627
Joined: Dec 26, 2007
Location: British Columbia

Re: Fresh Starling install: Connection error

Perfect.

Thank you.

Script address : 192.168.2.140
batteryLevel : None
buttonGroupCount : 0
configured : True
description :
deviceTypeId : starlingHub
displayStateId : status
displayStateImageSel : SensorOn
displayStateValRaw : Connected
displayStateValUi : Connected
enabled : True
energyAccumBaseTime : None
energyAccumTimeDelta : None
energyAccumTotal : None
energyCurLevel : None
errorState :
folderId : 0
globalProps : MetaProps : (dict)
com.autologplugin.indigoplugin.starlingBridge : (dict)
address : 192.168.2.140 (string)
api_key : kzdmRWWfuK0N (string)
starling_hub_ip : 192.168.2.140 (string)
starling_hub_ssl_tls : false (bool)
version : API: 2.5 (string)
id : 1189308906
lastChanged : 2022-11-02 14:34:51
lastSuccessfulComm : 2022-11-02 14:34:51
model : Starling Hub
name : Starling Nest
ownerProps : com.autologplugin.indigoplugin.starlingBridge : (dict)
address : 192.168.2.140 (string)
api_key : kzdmRWWfuK0N (string)
starling_hub_ip : 192.168.2.140 (string)
starling_hub_ssl_tls : false (bool)
version : API: 2.5 (string)
pluginId : com.autologplugin.indigoplugin.starlingBridge
pluginProps : emptyDict : (dict)
protocol : Plugin
remoteDisplay : True
sharedProps : com.indigodomo.indigoserver : (dict)
states : States : (dict)
api_ready : true (bool)
api_version : 2.5 (real)
app_name : Nest2 (string)
connected_to_nest : true (bool)
permission_camera : false (bool)
permission_read : true (bool)
permission_write : true (bool)
status : Connected (string)
status_message : OK (string)
subModel : Other,ui=Hub
subType : Other
supportsAllLightsOnOff : False
supportsAllOff : False
supportsStatusRequest : False
version : API: 2.5

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest