tkleijkers / homebridge-visonic-powerlink3

MIT License
1 stars 3 forks source link

Error crashing homebridge / API changed #5

Closed davidt94 closed 3 years ago

davidt94 commented 4 years ago

Hi,

I am getting the following error causing my homebridge to crash. is this something you can help with?

https://pastebin.com/EUiBymF1

many thanks!

JSVarga commented 3 years ago

For the record the configuration was using the visonic website rather than Tyco as we do not have an Id and Password and that's what I read, just use the Panel Name. This is exactly the config that was working before, I saved it down.

I'll have a play with the config, I know Visonic is just a wrapper for Tyco may they have/haven't changed in sync with Tyco.

tkleijkers commented 3 years ago

You should install the Visonic app and follow the process to create a username and password. The old API will not work anymore in this latest version.

JSVarga commented 3 years ago

My Visonic-Go app only allows a PIN, no ability to set username and password. More investigation needed my end.

davidt94 commented 3 years ago

@JSVarga You need to update the app. Once the app is updated, you can then set a username and password 👍

JSVarga commented 3 years ago

@JSVarga You need to update the app. Once the app is updated, you can then set a username and password 👍

I think I have discovered it is related to the security provider. Mine is using a host with the address of logonmysecurity.com, which is probably their own wrapper, and I set this in the app (which is up to date from App Store). It only asks me for a PIN.

I updated the Host to visonic.tycomonitor.com and it then asked for an email address, so I registered and set a password. All good until I tried to connect my panel. Got the Panel serial number from the box but it won't accept my user code.

Going to contact my security provider and take it further, I suspect they haven't updated their host, but it appears this is not an issue with the plug in. Thanks all for your help.

davidt94 commented 3 years ago

@JSVarga You need to update the app. Once the app is updated, you can then set a username and password 👍

I think I have discovered it is related to the security provider. Mine is using a host with the address of logonmysecurity.com, which is probably their own wrapper, and I set this in the app (which is up to date from App Store). It only asks me for a PIN.

I updated the Host to visonic.tycomonitor.com and it then asked for an email address, so I registered and set a password. All good until I tried to connect my panel. Got the Panel serial number from the box but it won't accept my user code.

Going to contact my security provider and take it further, I suspect they haven't updated their host, but it appears this is not an issue with the plug in. Thanks all for your help.

Ahh yes, you are correct. Your provider is using an older version of the server.

They will need to get this updated ASAP. The next update to the Visonic-Go app is going to kill that old protocol altogether, you would then loose access to the app completely.

The reason why you can't access via visonic.tycomonitor.com is because your panel is not registered on that server. You need to enter the IP address of the visonic server into your panel for this to work. You would then be registered on the visonic server.

You have 2 options while you wait for your service provider to update their server; Either use an older version on this plugin or start using the visonic server.

Hope this helps.

JSVarga commented 3 years ago

Thanks @cjones813 Given they provide me with remote monitoring I don't think using the visonic server is an option, and I originally tried reverting to previous versions of the plug-in when the problem first occurred and that didn't help.

Interesting info on the new app version will render the current access useless, it will help me to press them into upgrading their servers.

davidt94 commented 3 years ago

@JSVarga Ahh thats a problem. I would definitely push them on that. The latest server update fixed a huge security flaw that was discovered. This update also added 2 factor authentication making it even more secure.

If you drop back to version 1.0.0 that should solve your issue. That should still use the old protocol.

StuFull commented 3 years ago

@JSVarga you can configure the panel to use the tyco server and cut out the monitoring company, unless you specifically want 3rd party monitoring.

StuFull commented 3 years ago

You’ll need installer access to the panel (if you don’t have it then it’s more complicated as you need to ‘default’ the panel to factory reset).

Set the server IP (IP Reciever) to 052.058.105.181 Server name is visonic.tycomonitor.com

sagistn commented 3 years ago

Updated to the latest, still can't get it to work. I think I'm missing something in the configuration. Does anyone has an idea what's the issue here? Config: "accessory": "PowerLink3", "name": "Alarm", "host": "visonic.tycomonitor.com", "userCode": "1234", "debug": true, "appType": "com.visonic.PowerMaxApp", "userId": "sagi", "panelWebName": "xxxxx", "userEmail": "mymail@gmail.com", "userPassword": "xxxx"

Debug log: [24/02/2021, 19:34:43] [Alarm] Error polling: Error: Error getting raw status: Error: Failed to get authentication session-token: Bad Request Params [24/02/2021, 19:35:13] [Alarm] getCurrentState [24/02/2021, 19:35:13] [Alarm] Response from getUserToken HTTP call: [24/02/2021, 19:35:13] [Alarm] error: null [24/02/2021, 19:35:13] [Alarm] response: {"statusCode":200,"body":{"user_token":"439ab58e-3857-44e1-9f0e-4d957408e15b"},"headers":{"server":"nginx","date":"Wed, 24 Feb 2021 17:35:13 GMT","content-type":"application/json; charset=utf-8","transfer-encoding":"chunked","connection":"close","x-frame-options":"SAMEORIGIN, SAMEORIGIN","x-xss-protection":"1; mode=block, 1; mode=block","x-content-type-options":"nosniff, nosniff","content-security-policy":"default-src 'self'; style-src 'self' 'unsafe-inline' https://*.googleapis.com; font-src 'self' data: https:; connect-src 'self' ws://visonic.tycomonitor.com wss://visonic.tycomonitor.com; script-src 'self' https://*.google.com https://*.googleapis.com 'unsafe-inline' 'unsafe-eval'; img-src 'self' data: https://*.gstatic.com https://*.google.com","strict-transport-security":"max-age=31536000"},"request":{"uri":{"protocol":"https:","slashes":true,"auth":null,"host":"visonic.tycomonitor.com","port":443,"hostname":"visonic.tycomonitor.com","hash":null,"search":null,"query":null,"pathname":"/rest_api/8.0/auth","path":"/rest_api/8.0/auth","href":"https://visonic.tycomonitor.com/rest_api/8.0/auth"},"method":"POST","headers":{"Content-Type":"application/json","accept":"application/json","content-length":71}}} [24/02/2021, 19:35:13] [Alarm] body: {"user_token":"439ab58e-3857-44e1-9f0e-4d957408e15b"} [24/02/2021, 19:35:13] [Alarm] Got user-token: 439ab58e-3857-44e1-9f0e-4d957408e15b [24/02/2021, 19:35:14] [Alarm] Response from getSessionToken HTTP call: [24/02/2021, 19:35:14] [Alarm] error: null [24/02/2021, 19:35:14] [Alarm] response: {"statusCode":400,"body":{"error":10001,"error_message":"Bad Request Params","error_reason_code":"BadRequestParams","extras":[{"key":"panel_serial","value":"incorrect"}]},"headers":{"server":"nginx","date":"Wed, 24 Feb 2021 17:35:13 GMT","content-type":"application/json; charset=utf-8","transfer-encoding":"chunked","connection":"close","x-frame-options":"SAMEORIGIN","x-xss-protection":"1; mode=block","x-content-type-options":"nosniff"},"request":{"uri":{"protocol":"https:","slashes":true,"auth":null,"host":"visonic.tycomonitor.com","port":443,"hostname":"visonic.tycomonitor.com","hash":null,"search":null,"query":null,"pathname":"/rest_api/8.0/panel/login","path":"/rest_api/8.0/panel/login","href":"https://visonic.tycomonitor.com/rest_api/8.0/panel/login"},"method":"POST","headers":{"Content-Type":"application/json","User-Token":"439ab58e-3857-44e1-9f0e-4d957408e15b","accept":"application/json","content-length":97}}} [24/02/2021, 19:35:14] [Alarm] body: {"error":10001,"error_message":"Bad Request Params","error_reason_code":"BadRequestParams","extras":[{"key":"panel_serial","value":"incorrect"}]} [24/02/2021, 19:35:14] [Alarm] Updating status (1) [24/02/2021, 19:35:14] [Alarm] Error polling: Error: Error getting raw status: Error: Failed to get authentication session-token: Bad Request Params

nitaybz commented 3 years ago

@sagistn the answer is in the logs: [{"key":"panel_serial","value":"incorrect"}]}

the panelWebName you entered is incorrect...

sagistn commented 3 years ago

Thx for the prompt reply :) Isn't the panelWebName the panel's serial number?

nitaybz commented 3 years ago

@sagistn nope... it's in the app written under the "alarm system" name... numbers and letters like this: 123AB3

sagistn commented 3 years ago

Yes, that's what I put in... Just noticed it is case sensitive. Finally it works! thx

JSVarga commented 3 years ago

@JSVarga Ahh thats a problem. I would definitely push them on that. The latest server update fixed a huge security flaw that was discovered. This update also added 2 factor authentication making it even more secure.

If you drop back to version 1.0.0 that should solve your issue. That should still use the old protocol.

Sorry for the delay in responding, few other things going on and trouble getting through to security monitoring company. Helpdesk unsurprisingly didn't know what I was talking about but got put through to technical manager however took a few moments to get on the same page. He then explained they were experience issues with the update and many clients that they had to work through so the upgrade was going to take some time. Have to say I wasn't entirely convinced and he wouldn't give me a timeline. Might contact Visonic/Tyco directly to ask them.

On the second point I have reverted to V1.0.0, and even uninstalled and reinstalled, but can't get it to work again like it did. Don't know if that is related to other updates in Homebridge itself.