Closed davidt94 closed 3 years ago
Hi @cjones813, it seems that the authentication request to Visonic failed. Are you sure you added the correct configuration and authentication details?
The error is thrown at parsing the response from Visonic: https://github.com/tkleijkers/visonic-powerlink3/blob/eea8666d6abf60c852d2da572dc9c0bfb33185a5/index.js#L82
Hi @tkleijkers, Yes I am sure its the correct config. Visonic have done an update to include 2 factor authentication, do you think this could be why?
I indeed think that Visonic changed their API and thus the authentication flow should be corrected. I am not active on development on this project, so someone can make a pull-request to fix this or I may fix it in the future.
Thanks for the reply. yes, I now need to enter a username and password on the VisonicGo app unfortunately. That is a shame, I would happily make a donation to anybody that is able to fix this 👍
Thanks!
Same problem for me. It seems Tyco has changed the way the login is managed.
I have had to log in to the app again.
I don't know if it helps but I found this document
https://www.visonic.com/Data/Uploads/Alarm_Install_App_User_Guide_English_D_307194.pdf
I don't know if it helps but I found this document
https://www.visonic.com/Data/Uploads/Alarm_Install_App_User_Guide_English_D_307194.pdf
This is another app
I based the API request on https://github.com/barcar/visonic_control. If someone knows how the new API works, I can update this package. However this API is not documented by Tyco / Visonic so someone has to sniff the request from the app to the API.
+1 for a fix. I was hoping to get this working too.
I based the API request on https://github.com/barcar/visonic_control. If someone knows how the new API works, I can update this package. However this API is not documented by Tyco / Visonic so someone has to sniff the request from the app to the API.
That's my project. I think they switched to SSL pinning so I couldn't sniff the traffic.
I couldn't figure out what changed by myself but I think this person has... https://github.com/And3rsL/VisonicAlarm2. Their commits reference upgrading to API v8 which is what I see listed at https://visonic.tycomonitor.com/rest_api/version = so maybe there is hope.
I updated the visonic_powerlink3 package to use the new REST API of Visonic. Please let me know if it works.
I'm getting this error when trying to install:
No matching version found for visonic-powerlink3@^1.1.0.
From what I can see I've got 1.0.0 installed and can't see 1.1.0. Not an NPM expert so could be my stupidity.
I'm getting this error when trying to install:
No matching version found for visonic-powerlink3@^1.1.0.
From what I can see I've got 1.0.0 installed and can't see 1.1.0. Not an NPM expert so could be my stupidity.
Experiencing the same issue. Did you manage to get it installed?
The updated version is not yet on npm. I did not publish the package to npm myself and asked the publisher to give me permission to update the package. You can however clone the git repository and link the package yourself for now.
The updated version is not yet on npm. I did not publish the package to npm myself and asked the publisher to give me permission to update the package. You can however clone the git repository and link the package yourself for now.
I’m confused... when I look at https://github.com/tkleijkers/visonic-powerlink3 I don’t see any commits after v1.0.1 in July. Is there another repository?
Thanks. I have managed to get it installed, but get the follow error once the config has been added.
I have managed to get it installed, but get the follow error
Me too.
Seems as though 'homebridge-visonic-powerlink3' was updated, 'but visonic-powerlink3' wasn't. @tkleijkers Is this correct?
My fault. Pushing the update to github failed and I didn't notice. https://github.com/tkleijkers/visonic-powerlink3 is now updated with the code to connect to the new API. Please notice to add your username and password in the config. I didn't test it myself in homebridge yet (didn't have the time).
Many thanks! Successfully installed and no longer crashing homebridge.
Added config including my username and password but then get the following error.
[Burglar Alarm] Executing request https://visonic.tycomonitor.com/rest_api/8.0/status [Burglar Alarm] Updating status (1) [Burglar Alarm] Error polling: Error: Error getting raw status: Error: Failed to get authentication session-token: Bad Request Params
Looks like the user login succeeded but the login to the panel fails. Are the setting (panelWebName and userCode etc) correct? Maybe you can turn on debug:true to get some more logging.
I missed the params in this package. They are added. I see now some other things which should be updated in the package. I will look into it when I have more time available.
I missed the params in this package. They are added. I see now some other things which should be updated in the package. I will look into it when I have more time available.
No problem. Many thanks for your time on this. Double checked all settings in the config and they are correct.
I checked my config and all looks ok. I'm seeing this in debug mode:
[10/21/2020, 10:20:54 PM] [Visonic] Initializing PowerLink3 accessory... [10/21/2020, 10:20:54 PM] [Visonic] getCurrentState [10/21/2020, 10:20:54 PM] [Visonic] Response from getUserToken HTTP call: [10/21/2020, 10:20:54 PM] [Visonic] error: null [10/21/2020, 10:20:54 PM] [Visonic] response: {"statusCode":400,"body":{"error":10001,"error_message":"Bad Request Params","error_reason_code":"BadRequestParams","extras":[{"key":"email","value":"required"},{"key":"password","value":"required"}]},"headers":{"server":"nginx","date":"Wed, 21 Oct 2020 21:20:54 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/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":49}}} [10/21/2020, 10:20:54 PM] [Visonic] body: {"error":10001,"error_message":"Bad Request Params","error_reason_code":"BadRequestParams","extras":[{"key":"email","value":"required"},{"key":"password","value":"required"}]} [10/21/2020, 10:20:54 PM] [Visonic] Executing request https://visonic.tycomonitor.com/rest_api/8.0/status [10/21/2020, 10:20:54 PM] [Visonic] Updating status (1) [10/21/2020, 10:20:54 PM] [Visonic] Error polling: Error: Error getting raw status: Error: Failed to get authentication session-token: Bad Request Params`
I see now some other things which should be updated in the package. I will look into it when I have more time available.
Thanks for your help.
I recently updated to the latest version, wasn't in a hurry as everything working apart from one small issue on automations getting fired on both Arm and Disarm despite conditions set in HomeKit. Updated and now it is crashing home bridge with the following message:
[11/3/2020, 7:11:05 AM] [Visonic Home Alarm] Updating status (1)
[11/3/2020, 7:11:05 AM] SyntaxError: Unexpected token < in JSON at position 0
at JSON.parse (
Is this the same issue? I there any way to install the previous version as these do not seem to be versioned in GitHub?
UPDATE: I've rolled back to V1.1 and V1 and still have the same problem. If I empty the config entries to minimum (accessory and name) then it runs but this is in the log (as above): [11/3/2020, 8:57:25 AM] [Visonic Home Alarm] Executing request https://undefined/rest_api/8.0/status [11/3/2020, 8:57:25 AM] [Visonic Home Alarm] Updating status (1) [11/3/2020, 8:57:25 AM] [Visonic Home Alarm] Error polling: Error: Error getting raw status: Error: Failed to get authentication session-token: Error: ETIMEDOUT
This is my config details: "accessory": "PowerLink3", "name": "Visonic Home Alarm", "host": "logonmysecurity.com", "userCode": "XXXX", "appType": "com.visonic.PowerMaxApp", "userId": "89b14b39-dbe1-4364-b3d8-6303b026b397", "panelWebName": "148e29”
Note this is running in Homebridge within a Docker container on a Synology NAS. The host does not provide userEmail our userPassword, only four digit code. Frustrating as was working fine until update.
Has anyone had any success in getting this to work?
Thanks for your effort so far tkleijkers but I think we are still missing something.
Has anyone had any success in getting this to work?
Thanks for your effort so far tkleijkers but I think we are still missing something.
Yes don't work for me as well :/
Keep trying by putting the entries back into the config file and restart. Every time Homebridge fails and won't run, then delete from config and everything runs. Lots of other updates to other plugins without issue. Just frustrated because it was working.
Keep trying by putting the entries back into the config file and restart. Every time Homebridge fails and won't run, then delete from config and everything runs. Lots of other updates to other plugins without issue. Just frustrated because it was working.
Ok but in Userid, i can put random guid ?
I will have to look into it but don't have the time currently.
I will have to look into it but don't have the time currently.
Ok i wait the update, i look forward :)
@tkleijkers it seems like you are not passing the user ID and email to the powerlink3 lib...
EDIT: you've only added those to GitHub but not pushed to NPM.... no chance it will work
I created a pull request for both this plugin and it's visonic-powerlink3 library to fix what's caused it to break + small improvement.
I created a pull request for both this plugin and it's visonic-powerlink3 library to fix what's caused it to break + small improvement.
Sounds promising, apologies if not up to speed but how do I install this update? Running Homebridge in Docker on Synology NAS but this does not show an update version. Does it need to be merged with main package?
yes it does
Do you have this working now?
I am not sure how to install the pull request on my setup, through Homebridge UI I usually have an Update option.
you can't at the moment... the fix is both in this plugin and in the library it uses... the plugin owner will have to merge both my pull requests and push to NPM before you can use it
Understood, thanks for the update and what you have done.
I'm working now on setting one last improvement to improve the speed of the loading... at the moment getting the state will delay the entire homebridge until it is returned... fixing
I will look at it today! 👍🏻 Thanks for the PR
I published version 1.2.0 on NPM. If @nitaybz pushes an update I will publish this one as well. Many thanks to @nitaybz!
I already made all the changes needed... should be ok now, faster loading and no night mode in Home app
Okay, it seems to work at my side. I will close this issue. Thanks again.
Sorry, still not working for me on my Synology NAS Docker installation. I tried uninstalling and reinstalling and did notice these errors: USER: root DIR: /homebridge CMD: npm install --save homebridge-visonic-powerlink3@latest
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated har-validator@5.1.5: this library is no longer supported
Homebridge runs until I update the config with my details then it crashes Homebridge which won't run until I remove my config details.
can you post the logs? this warning is not the issue
Sure, here is the log from the most recent attempt. You will see the SyntacError message just the the rest api all to the website. homebridge.log.txt
I believe your configuration is wrong... probably the "host" part as it can't be reached... it should be left as in the example on the readme... don't change it to the device IP or anything like that...
Indeed as @nitaybz mentions the host should be as in the example. Powerlink3 cannot be reached directly.
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!