Closed andyblac closed 4 years ago
Originally, the plugin was developed as a simple platform and, by resuming development, I stayed on the same line of development.
What you are asking for corresponds to a major modification of the plugin to make it converge on a dynamic platform allowing to reuse the cached accessories when restarting homebridge.
I myself had noticed this problem but it did not pose a major problem for me at this stage of development.
It was a mistake on my part because the modification to a dynamic platform is more complex than I had envisaged and requires deeper changes in the code than I expected (and especially I am not a professional computer scientist but an enthusiast, so I dabble a lot ...)
It's on track, but it will take some time to get code that is functional and adaptable to the suite for new feature additions.
I understand, just a bit of a pain, when it happens, as I have to redo all my automations linked to Risco-Alarm.
the dynamic platform is almost ready but I have a problem modifying the detectors, so I wait for a response before I can finish the development. I'll keep you posted as soon as it's ready
I just released version 1.1.0 which turns the platform from static to dynamic. The sparameters don't change, but I added the contacts. see the README for more info. For the next update, I will try to make the platform even more dynamic, i.e. there will be no need to restart homebridge to take into account the custom detectors and this should be modified in real time .
cool thx I'll test it out.
installed and redid all my automations again, let hope for the last time 😄 , could you add Smoke Alarm and Vibration to list of types. thanks.
Regarding the smoke detector, no worries and I have 2 at home, I had planned to add them soon. For vibration detectors, neither Apple nor Homebridge includes them. Apparently it exists anyway and some models have been integrated into the homebridge-hue plugin so we must be able to do something that works. On the other hand, I don't have one to test so I would surely need a hand to validate the operation.
And normally, as the accessories are now cached, it should effectively no longer be necessary to reassign them to the automations (unless an accessory is deleted, then nothing can be done to keep this info - or rather, I prefer not to tweak this side...)
yeah no worries, if you need debug I can help with that, I don't do automations on detectors only the main alarm. so that will not be an issue.
Aqara do a vibration sensor so HomeKit should support it
yes, I had already seen and it is this device which is managed by the homebridge-hue plugin. But there is no predefined service for "vibration" so I don't know how it is handled. I have to look at how it was integrated into the plugin to adapt it and see what happens.
looks like it handled via 'motion"
just got this error, homebridge restart and working again.
[8/17/2020, 12:12:37] [RiscoAlarm] Error on login:
Error: Request failed with status code 200
at createError (/usr/lib/node_modules/homebridge-risco-platform/node_modules/axios/lib/core/createError.js:16:15)
at settle (/usr/lib/node_modules/homebridge-risco-platform/node_modules/axios/lib/core/settle.js:17:12)
at IncomingMessage.handleStreamEnd (/usr/lib/node_modules/homebridge-risco-platform/node_modules/axios/lib/adapters/http.js:236:11)
at IncomingMessage.emit (events.js:228:7)
at endReadableNT (_stream_readable.js:1185:12)
at processTicksAndRejections (internal/process/task_queues.js:81:21) {
config: [Object],
request: [ClientRequest],
response: [Object],
isAxiosError: true,
toJSON: [Function]
}
[8/17/2020, 12:13:07] [RiscoAlarm] Error on login:
Error: Request failed with status code 200
at createError (/usr/lib/node_modules/homebridge-risco-platform/node_modules/axios/lib/core/createError.js:16:15)
at settle (/usr/lib/node_modules/homebridge-risco-platform/node_modules/axios/lib/core/settle.js:17:12)
at IncomingMessage.handleStreamEnd (/usr/lib/node_modules/homebridge-risco-platform/node_modules/axios/lib/adapters/http.js:236:11)
at IncomingMessage.emit (events.js:228:7)
at endReadableNT (_stream_readable.js:1185:12)
at processTicksAndRejections (internal/process/task_queues.js:81:21) {
config: [Object],
request: [ClientRequest],
response: [Object],
isAxiosError: true,
toJSON: [Function]
}
[8/17/2020, 12:13:07] [RiscoAlarm] Error on IsInvalidResponse : Error: Too many wrong consecutive answers. Possible connection problem. Consider the session to be disconnected.
at RiscoPanelSession.IsValidResponse (/usr/lib/node_modules/homebridge-risco-platform/Risco.js:92:31)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:94:5)
[8/17/2020, 12:13:08] [RiscoAlarm] Error on login:
Error: Request failed with status code 200
at createError (/usr/lib/node_modules/homebridge-risco-platform/node_modules/axios/lib/core/createError.js:16:15)
at settle (/usr/lib/node_modules/homebridge-risco-platform/node_modules/axios/lib/core/settle.js:17:12)
at IncomingMessage.handleStreamEnd (/usr/lib/node_modules/homebridge-risco-platform/node_modules/axios/lib/adapters/http.js:236:11)
at IncomingMessage.emit (events.js:228:7)
at endReadableNT (_stream_readable.js:1185:12)
at processTicksAndRejections (internal/process/task_queues.js:81:21) {
config: [Object],
request: [ClientRequest],
response: [Object],
isAxiosError: true,
toJSON: [Function]
}
[8/17/2020, 12:13:08] [RiscoAlarm] Error on IsInvalidResponse : Error: Too many wrong consecutive answers. Possible connection problem. Consider the session to be disconnected.
at RiscoPanelSession.IsValidResponse (/usr/lib/node_modules/homebridge-risco-platform/Risco.js:92:31)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:94:5)
[8/17/2020, 12:13:09] [RiscoAlarm] Error on login:
Error: Request failed with status code 200
at createError (/usr/lib/node_modules/homebridge-risco-platform/node_modules/axios/lib/core/createError.js:16:15)
at settle (/usr/lib/node_modules/homebridge-risco-platform/node_modules/axios/lib/core/settle.js:17:12)
at IncomingMessage.handleStreamEnd (/usr/lib/node_modules/homebridge-risco-platform/node_modules/axios/lib/adapters/http.js:236:11)
at IncomingMessage.emit (events.js:228:7)
at endReadableNT (_stream_readable.js:1185:12)
at processTicksAndRejections (internal/process/task_queues.js:81:21) {
config: [Object],
request: [ClientRequest],
response: [Object],
isAxiosError: true,
toJSON: [Function]
}
[8/17/2020, 12:13:09] [RiscoAlarm] Error on IsInvalidResponse : Error: Too many wrong consecutive answers. Possible connection problem. Consider the session to be disconnected.
at RiscoPanelSession.IsValidResponse (/usr/lib/node_modules/homebridge-risco-platform/Risco.js:92:31)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:94:5)
[8/17/2020, 12:13:09] [RiscoAlarm] Error on login:
Error: Request failed with status code 200
at createError (/usr/lib/node_modules/homebridge-risco-platform/node_modules/axios/lib/core/createError.js:16:15)
at settle (/usr/lib/node_modules/homebridge-risco-platform/node_modules/axios/lib/core/settle.js:17:12)
at IncomingMessage.handleStreamEnd (/usr/lib/node_modules/homebridge-risco-platform/node_modules/axios/lib/adapters/http.js:236:11)
at IncomingMessage.emit (events.js:228:7)
at endReadableNT (_stream_readable.js:1185:12)
at processTicksAndRejections (internal/process/task_queues.js:81:21) {
config: [Object],
request: [ClientRequest],
response: [Object],
isAxiosError: true,
toJSON: [Function]
}
[8/17/2020, 12:13:13] [RiscoAlarm] Error on login:
Error: Request failed with status code 200
at createError (/usr/lib/node_modules/homebridge-risco-platform/node_modules/axios/lib/core/createError.js:16:15)
at settle (/usr/lib/node_modules/homebridge-risco-platform/node_modules/axios/lib/core/settle.js:17:12)
at IncomingMessage.handleStreamEnd (/usr/lib/node_modules/homebridge-risco-platform/node_modules/axios/lib/adapters/http.js:236:11)
at IncomingMessage.emit (events.js:228:7)
at endReadableNT (_stream_readable.js:1185:12)
at processTicksAndRejections (internal/process/task_queues.js:81:21) {
config: [Object],
request: [ClientRequest],
response: [Object],
isAxiosError: true,
toJSON: [Function]
}
[8/17/2020, 12:13:13] [RiscoAlarm] Error on IsInvalidResponse : Error: Too many wrong consecutive answers. Possible connection problem. Consider the session to be disconnected.
at RiscoPanelSession.IsValidResponse (/usr/lib/node_modules/homebridge-risco-platform/Risco.js:92:31)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:94:5)
[8/17/2020, 12:13:16] [RiscoAlarm] Error on login:
Error: Request failed with status code 200
at createError (/usr/lib/node_modules/homebridge-risco-platform/node_modules/axios/lib/core/createError.js:16:15)
at settle (/usr/lib/node_modules/homebridge-risco-platform/node_modules/axios/lib/core/settle.js:17:12)
at IncomingMessage.handleStreamEnd (/usr/lib/node_modules/homebridge-risco-platform/node_modules/axios/lib/adapters/http.js:236:11)
at IncomingMessage.emit (events.js:228:7)
at endReadableNT (_stream_readable.js:1185:12)
at processTicksAndRejections (internal/process/task_queues.js:81:21) {
config: [Object],
request: [ClientRequest],
response: [Object],
isAxiosError: true,
toJSON: [Function]
}
[8/17/2020, 12:13:16] [RiscoAlarm] Error on IsInvalidResponse : Error: Too many wrong consecutive answers. Possible connection problem. Consider the session to be disconnected.
at RiscoPanelSession.IsValidResponse (/usr/lib/node_modules/homebridge-risco-platform/Risco.js:92:31)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:94:5)
[8/17/2020, 12:13:17] [RiscoAlarm] Error on login:
Error: Request failed with status code 200
at createError (/usr/lib/node_modules/homebridge-risco-platform/node_modules/axios/lib/core/createError.js:16:15)
at settle (/usr/lib/node_modules/homebridge-risco-platform/node_modules/axios/lib/core/settle.js:17:12)
at IncomingMessage.handleStreamEnd (/usr/lib/node_modules/homebridge-risco-platform/node_modules/axios/lib/adapters/http.js:236:11)
at IncomingMessage.emit (events.js:228:7)
at endReadableNT (_stream_readable.js:1185:12)
at processTicksAndRejections (internal/process/task_queues.js:81:21) {
config: [Object],
request: [ClientRequest],
response: [Object],
isAxiosError: true,
toJSON: [Function]
}
[8/17/2020, 12:13:17] [RiscoAlarm] Error on IsInvalidResponse : Error: Too many wrong consecutive answers. Possible connection problem. Consider the session to be disconnected.
at RiscoPanelSession.IsValidResponse (/usr/lib/node_modules/homebridge-risco-platform/Risco.js:92:31)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:94:5)
root : TTY=pts/0 ; PWD=/root/.homebridge ; USER=root ; COMMAND=/bin/journalctl -o cat -n 500 -f -u homebridge
pam_unix(sudo:session): session opened for user root by (uid=0)
not had this problem on my side. did it happen immediately installed? or after a certain time of operation? on the other hand, I see that we can manage a reconnection attempt on the last errors, always good to take as info for better management of exceptions
was installed about 18 hours ago. had been fine till about 30mins ago.
did you try to relaunch homebridge? I was able to connect via the risccloud web interface but maybe the problem came from them.
I am not at home, I will look at my logs at the end of the afternoon to see what happens on my side
did you try to relaunch homebridge? I was able to connect via the risccloud web interface but maybe the problem came from them.
I am not at home, I will look at my logs at the end of the afternoon to see what happens on my side
yes thats how I got it back, restarted Homebridge in WebUI.
I had a similar problem on my system in the early afternoon.
I will therefore look for a problem on the Risco side. Another solution, I have to look at how long the cookie delivered during connection is valid, it is possible that it is kept from one session to the other Risco side and that, when the plugin presents a cookie that comes to time out this problem presents itself.
This has not been the case until now but that does not prevent to consider the possibility and to monitor it to force a reconnection differently if it is found that the cookie has expired.
I'll put this under observation in my logs and see if it could come from there.
the npm package is updated to v1.1.6 and contains this fix. I close the exit, do not hesitate to reopen it if necessary
I have an issue, that if I have a power cut and after my router, switches and Homebridge has reboot, the Risco accessories in HomeKit have been reset, and all the automation are thus removed.
I think it happens when homebridge tries to connect to Risco Cloud, but my router and network has not full booted up, so it can not get the list of devices. Is there a way you can cache the HomeKit accessories, so this dose not happen. So if there is no WAN connection (no link to Risco Cloud) the Accessories will stay in HomeKit, but just show the "No Response" like other offline accessories do?
see attached for an example.