Closed GusMuche closed 3 years ago
After some search :
To test it :
Conclusion :
Please feel free to react and give your impression
I will test your code if you want, I have a running homebridge docker and a working Zipato V3 environment with one zipatile as master and two zipabox 1 as slaves
I just publish a new version in dev with the address of v3 as connection.
To test this :
Hi, the starting line: [7/5/2020, 11:07:27 AM] [ZipaboxPlatform] [BOXAPI] [initUser] URL pour init : https://my3.zipato.com:443/zipato-web/v2user/init
should be: https://my3.zipato.com:443/zipato-web/v2/user/init pay attention the the / between v2 and user.
i think that typo is the reason for this:
[BOXAPI] [initUser] Error occurred : FetchError: invalid json response body at https://my3.zipato.com/zipato-web/Index;jsessionid=4D236598B2A1546568D42106ECE10665 reason: Unexpected token < in JSON at position 121
at /homebridge/node_modules/homebridge-zipabox-platform-dev/node_modules/node-fetch/lib/index.js:272:32
at processTicksAndRejections (internal/process/task_queues.js:97:5) {
type: 'invalid-json'
}
[7/5/2020, 11:07:28 AM] [ZipaboxPlatform] [PTFM] [connectTheBox] Unexpexted error before security : FetchError: invalid json response body at https://my3.zipato.com/zipato-web/Index;jsessionid=4D236598B2A1546568D42106ECE10665 reason: Unexpected token < in JSON at position 121
at /homebridge/node_modules/homebridge-zipabox-platform-dev/node_modules/node-fetch/lib/index.js:272:32
at processTicksAndRejections (internal/process/task_queues.js:97:5) {
type: 'invalid-json'
}
[7/5/2020, 11:07:28 AM] [ZipaboxPlatform] [PTFM] [connectTheBox] Error on connectTheBox after security : Error: FetchError: invalid json response body at https://my3.zipato.com/zipato-web/Index;jsessionid=4D236598B2A1546568D42106ECE10665 reason: Unexpected token < in JSON at position 121
at ZipaPlatform.manageError (/homebridge/node_modules/homebridge-zipabox-platform-dev/lib/platform.js:118:13)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:786) UnhandledPromiseRejectionWarning: Error: Error: FetchError: invalid json response body at https://my3.zipato.com/zipato-web/Index;jsessionid=4D236598B2A1546568D42106ECE10665 reason: Unexpected token < in JSON at position 121
at ZipaPlatform.manageError (/homebridge/node_modules/homebridge-zipabox-platform-dev/lib/platform.js:143:13)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:786) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:786) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Correct, stupid typo error. I've written the code too quick.
Just publish the 1.7.2 with correction of the typo
Now the login is successful, it throws this after successful login:
[7/5/2020, 11:26:45 AM] [ZipaboxPlatform] [BOXAPI] [fstatus] Error on fstatus. Bad Request
[7/5/2020, 11:26:45 AM] [ZipaboxPlatform] [PTFM] [connectTheBox] Unexpexted error before security : Error: Bad Request
at ZipaboxApi.--unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:1974) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[7/5/2020, 11:26:46 AM] [ZipaboxPlatform] [BOXAPI] > Method getDeviceUUID()
[7/5/2020, 11:26:47 AM] [ZipaboxPlatform] [BOXAPI] [fstatus] Error on fstatus. Internal Server Error
(node:1974) UnhandledPromiseRejectionWarning: Error: Internal Server Error
at ZipaboxApi.--unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 4)
Can you please make a new test with an additional parameter to the platform level ?
debugApi = “FULL”,
So the boxAPI will give more debug information. I just see here a bad request but not all the line.
Maybe can you also give me the result of the same test with the parameter “noStatus = true” in the config ? It’ll be a better starting point.
If you want I can make a user account for you on my system :-) PM me with desired username and password.
Med vänlig hälsning, Daniel Wennström Skickat från min iPhone
6 juli 2020 kl. 14:42 skrev Gus Muche notifications@github.com:
Can you please make a new test with an additional parameter to the platform level ?
debugApi = “FULL”,
So the boxAPI will give more debug information. I just see here a bad request but not all the line.
Maybe can you also give me the result of the same test with the parameter “noStatus = true” in the config ? It’ll be a better starting point.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
Didn’t find how to contact you private. Can you please send me your mail at GusMuche@gmail ?
You can also fix directly a password for me with this email address.
Some news about the V3 API :
Thanks to a V3 user, I was able to test the new API of Zipato. There's some difference between the V2 and V3, but I success after some weeks to successfully connect to the controller.
For example, the new API need to select the controller that you want to discuss with.
Also the API didn't return any result for devices status if the attributes is on virtual... but it's ok, the plugin manage this.
At now you can test the test version of the plugin. It work for switches only.
Next step is to validate all sensors and the security partition (alarm).
I received my Zipabox 2 some weeks ago.
I spend time to transfer all the rules and accessories to it.
And now I'm testing the dev version of the plugin with my full installation.
Do not hesitate to test it also. Just choose the dev plugin version.
All going good since few days...
I will update the base version next weeks if all keep good.
Publish V3 compatibility in v1.8.0
I’ve received a request to have the plugin compatible with the V3 API of Zipato.
Today I don’t have the possibility to test it, cause my Zipabox is an old v1 and cannot be updated to v3 without a additional Zipatile or Zipabox v2.
I’ll have a look on a demo possibility of the API to check the code and maybe add the possibility to request on V3 API.