swttt / com.swttt.homekit

Homekit for Homey
https://apps.athom.com/app/com.swttt.homekit
GNU Affero General Public License v3.0
35 stars 20 forks source link

v3.0.0 restart and crash #104

Closed Strike2001 closed 5 years ago

Strike2001 commented 5 years ago

v3.0.0 runs after 5-6 times i restart / start again the app and after a short time homebridge restarts itself 1-2 times and then crashes . maybe after set all states to HK the app crashes

robertklep commented 5 years ago

What do you mean with "homebridge restarts itself 1-2 times and then crashes"?

Strike2001 commented 5 years ago

i installed the app on homey 2.0.19RC via cli , with disabled experimental homekit ,after restart homey i found the new homebridge hub from v3.0.0 and start to sort the devices to the their correct rooms , after this opening homekit app and all devices show no connection / not reachable in homey itself the app show that it crashed , a restart of the app , runs for round about 1-2 min then the same error comes again all devices not response ( show the red text) , the app itself try 1-2 times to solve itself by restart homebridge and them stays in crashed state till i manual restart .

Von meinem iPhone gesendet

Am 30.12.2018 um 09:27 schrieb Robert Klep notifications@github.com:

What do you mean with "homebridge restarts itself 1-2 times and then crashes"?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

robertklep commented 5 years ago

If you run (not install) the app from the CLI, you might get some error messages that can be useful for us to determine what the problem is.

So instead of athom app install you use athom app run, leave the window open, perform the same actions and wait for the app to crash. When it does, check the terminal window for errors and please post them here.

Strike2001 commented 5 years ago

ok , give me 10-15 minutes ( little breakfast) , to reboot and install 3.0 install new because otherwise it would be not found , the reset homekit temp delete button also not works , only a new jnstallation solves this by me, after reboot with no more homekit app enabled or installed before . , Von meinem iPhone gesendet

Am 30.12.2018 um 10:15 schrieb Robert Klep notifications@github.com:

If you run (not install) the app from the CLI, you might get some error messages that can be useful for us to determine what the problem is.

So instead of athom app install you use athom app run, leave the window open, perform the same actions and wait for the app to crash. When it does, check the terminal window for errors and please post them here.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

Strike2001 commented 5 years ago

here i saw the error

Von meinem iPhone gesendet

Am 30.12.2018 um 10:15 schrieb Robert Klep notifications@github.com:

If you run (not install) the app from the CLI, you might get some error messages that can be useful for us to determine what the problem is.

So instead of athom app install you use athom app run, leave the window open, perform the same actions and wait for the app to crash. When it does, check the terminal window for errors and please post them here.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

robertklep commented 5 years ago

I don't see any errors?

Strike2001 commented 5 years ago

on upgrade a tempteture state it

Von meinem iPhone gesendet

Am 30.12.2018 um 10:58 schrieb Robert Klep notifications@github.com:

I don't see any errors?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

robertklep commented 5 years ago

Can you make a photo or a screenshot of the exact error log?

Strike2001 commented 5 years ago

that is the log after the run command ── Warning: Trying to access Homey.env.RESET_SETTINGS but the environment variable has not been set! Warning: Trying to access Homey.env.FAST_START but the environment variable has not been set! 2018-12-30 11:08:22 [log] [HomekitApp] waiting for devices to settle 2018-12-30 11:08:23 [log] [HomekitApp] devices have not yet settled, waiting for 30 seconds... 2018-12-30 11:08:53 [log] [HomekitApp] devices have settled (counted 28 in total) 2018-12-30 11:08:53 [log] [HomekitApp] starting server subscribing now happens automatically, there is no need to manually call subscribe anymore 2018-12-30 11:08:53 [log] [HomekitApp] Not adding 'Homey' (shouldn't be paired) 2018-12-30 11:08:53 [log] [HomekitApp] Not adding 'AppleTV-4K-HDR' (shouldn't be paired) 2018-12-30 11:08:53 [log] [HomekitApp] Found socket: Unknown ZigBee device 2018-12-30 11:08:53 [log] [HomekitApp] Found Sensor: Geschirrspüler 2018-12-30 11:08:53 [log] [HomekitApp] Found class with onoff: [LG] webOS TV OLED55B8LLA 2018-12-30 11:08:53 [log] [HomekitApp] Not adding 'Horizon 192.168.178.49' (shouldn't be paired) 2018-12-30 11:08:53 [log] [HomekitApp] Found socket: UPC Back 2018-12-30 11:08:53 [log] [HomekitApp] Found socket: U PC OK 2018-12-30 11:08:53 [log] [HomekitApp] Found class with onoff: mute 2018-12-30 11:08:53 [log] [HomekitApp] Found socket: Backofen 2018-12-30 11:08:53 [log] [HomekitApp] Found light: Bad Schalter R 2018-12-30 11:08:53 [log] [HomekitApp] Found socket: Geschirrspüler | Sync / Virtual Device 2018-12-30 11:08:53 [log] [HomekitApp] Found socket: Geschirrspüler 2018-12-30 11:08:53 [log] [HomekitApp] Found Sensor: Ich { MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 connect listeners added. Use emitter.setMaxListeners() to increase limit at d (/node_modules/athom-api/dist/index.js:1:1090029) at t.value (/node_modules/athom-api/dist/index.js:1:1092821) at t.value (/node_modules/athom-api/dist/index.js:1:1038876) at t.value (/node_modules/athom-api/dist/index.js:1:1092890) at t.value (/node_modules/athom-api/dist/index.js:1:1093121) at /node_modules/athom-api/dist/index.js:1:1045140 at new Promise () at new t (/node_modules/athom-api/dist/index.js:1:27620) at t. (/node_modules/athom-api/dist/index.js:1:1045110) at a (/node_modules/athom-api/dist/index.js:1:324246) name: 'MaxListenersExceededWarning', emitter: t { _security: { oauth2: [Object] }, token: { name: 'homey_auth', isQuery: false, value: '6af5235d-192d-40ec-abf8-3af9dd949c98:6241a901-8887-414b-ab86-b9547d156361:428a955dac7fda8e61a39a8e9841bf4b1d9ebbb0' }, _caches: { 'HomeyAPI.ManagerDevices.Device': [Object], 'HomeyAPI.ManagerDevices.Capability': [Object] }, _baseUrl: 'http://localhost:80', _basePath: '/api/manager/devices', _eventNS: '/realtime/manager/devices/', _eventURI: 'homey:manager:devices', authorizationUrl: '', managerName: 'ManagerDevices' }, type: 'connect', count: 11 } { MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 connect_error listeners added. Use emitter.setMaxListeners() to increase limit at d (/node_modules/athom-api/dist/index.js:1:1090029) at t.value (/node_modules/athom-api/dist/index.js:1:1092821) at t.value (/node_modules/athom-api/dist/index.js:1:1038876) at t.value (/node_modules/athom-api/dist/index.js:1:1092890) at t.value (/node_modules/athom-api/dist/index.js:1:1093121) at /node_modules/athom-api/dist/index.js:1:1045160 at new Promise () at new t (/node_modules/athom-api/dist/index.js:1:27620) at t. (/node_modules/athom-api/dist/index.js:1:1045110) at a (/node_modules/athom-api/dist/index.js:1:324246) name: 'MaxListenersExceededWarning', emitter: t { _security: { oauth2: [Object] }, token: { name: 'homey_auth', isQuery: false, value: '6af5235d-192d-40ec-abf8-3af9dd949c98:6241a901-8887-414b-ab86-b9547d156361:428a955dac7fda8e61a39a8e9841bf4b1d9ebbb0' }, _caches: { 'HomeyAPI.ManagerDevices.Device': [Object], 'HomeyAPI.ManagerDevices.Capability': [Object] }, _baseUrl: 'http://localhost:80', _basePath: '/api/manager/devices', _eventNS: '/realtime/manager/devices/', _eventURI: 'homey:manager:devices', authorizationUrl: '', managerName: 'ManagerDevices' }, type: 'connect_error', count: 11 } 2018-12-30 11:08:53 [log] [HomekitApp] Found socket: LG WebOS 2018-12-30 11:08:53 [log] [HomekitApp] Found light: Bad Schalter L 2018-12-30 11:08:53 [log] [HomekitApp] Found socket: Tv Wiedergabe 2018-12-30 11:08:53 [log] [HomekitApp] Found socket: Receiver 2018-12-30 11:08:53 [log] [HomekitApp] Found socket: Backofen | Sync / Virtual Device 2018-12-30 11:08:53 [log] [HomekitApp] Found button: wol-lgtv 2018-12-30 11:08:53 [log] [HomekitApp] Not adding 'Range Extender 6' (shouldn't be paired) 2018-12-30 11:08:53 [log] [HomekitApp] Not adding 'AWMT-003 | Badezimmer' (shouldn't be paired) 2018-12-30 11:08:53 [log] [HomekitApp] Found lock: Danalock V3 2018-12-30 11:08:53 [log] [HomekitApp] Found Sensor: Außentemperatur 2018-12-30 11:08:53 [log] [HomekitApp] Found thermostat: HomeZH 2018-12-30 11:08:53 [log] [HomekitApp] Found light: Küche Tisch 2018-12-30 11:08:53 [log] [HomekitApp] Found light: Fenster Rot 2018-12-30 11:08:53 [log] [HomekitApp] Found light: Bett 2018-12-30 11:08:53 [log] [HomekitApp] Started bridge (node:7026) UnhandledPromiseRejectionWarning: TypeError: Cannot convert undefined or null to object at Function.keys () at Object.module.exports [as createSensor] (/lib/devices/sensor.js:10:27) at HomekitApp.addDevice (/app.js:190:42) at HomekitApp.startingServer (/app.js:75:14) at at process._tickCallback (internal/process/next_tick.js:189:7) (node:7026) 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(). (rejection id: 1) (node:7026) [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. (node:7026) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'measure_temperature.outside' of null at t.value (/node_modules/athom-api/dist/index.js:1:1060479) at Object.module.exports [as createThermostat] (/lib/devices/thermostat.js:132:9) at HomekitApp.addDevice (/app.js:175:42) at HomekitApp.startingServer (/app.js:75:14) at at process._tickCallback (internal/process/next_tick.js:189:7) (node:7026) 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(). (rejection id: 2)

i have disabled the tado app , the home connect app, and openweather , so show errors but not crashed complete , so it is an error my using thermostat.js , when i enable on of the it crashed homebridge

Von meinem iPhone gesendet

Am 30.12.2018 um 11:05 schrieb Robert Klep notifications@github.com:

Can you make a photo or a screenshot of the exact error log?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

robertklep commented 5 years ago

Thanks! There are actually two errors, one for sensor, one for thermostat. We'll check and see if we can fix them.

Strike2001 commented 5 years ago

that is the error with enabled any termostat app

2018-12-30 10:57:30 [log] [HomekitApp] Started bridge /lib/devices/thermostat.js:64 callback(err, device.capabilitiesObj.target_temperature.value); ^

TypeError: Cannot read property 'value' of undefined at Characteristic.TargetTemperature. (/lib/devices/thermostat.js:64:63) at emitThree (events.js:136:13) at Characteristic.TargetTemperature.emit (events.js:217:7) at Characteristic.TargetTemperature.Characteristic.getValue (/node_modules/hap-nodejs/lib/Characteristic.js:162:10) at Bridge. (/node_modules/hap-nodejs/lib/Accessory.js:756:20) at Array.forEach () at Bridge.Accessory._handleGetCharacteristics (/node_modules/hap-nodejs/lib/Accessory.js:720:8) at emitMany (events.js:147:13) at HAPServer.emit (events.js:224:7) at HAPServer._handleCharacteristics (/node_modules/hap-nodejs/lib/HAPServer.js:926:10)

--- INFO: com.swttt.homekit has been killed --

and i found a second error by the device class lock , my danalock get not in homekit to the fully locked mode see picture .

so the notification of homekit also not work right , same problem when you add a virtual lock and set the state after 3 min to locked by flow or the autolock feature from the danalock itself , or when you use nello app same problem .

thx for your great help , with lock state is for me the greater issue 🙈 because i use 3 nello one , and 2 danalocks . hope you can find this error also

Von meinem iPhone gesendet

Am 30.12.2018 um 11:05 schrieb Robert Klep notifications@github.com:

Can you make a photo or a screenshot of the exact error log?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

robertklep commented 5 years ago

Looks like it might be related to this issue: https://github.com/athombv/homey-apps-sdk-issues/issues/23

We'll have to see if a new v2 release fixes it (or if an alternative is offered).

nhassink commented 5 years ago

I cannot reproduce your lock problem. Works over here with a virtual lock device. Can you send the picture again?

Strike2001 commented 5 years ago

i can t do it also🤣 , 🤔 now it works like before v2 (maybe your app correct this now 🙈after a while ) also home app must closed and reopen for correct background image but this is homekit problem by apple but when i go device list of homekit app on homey i must know the name of the device and search it , there is no site scroll of all devices and the log window is still empty and when you try go back to devicelist overview the is no landingpage configured you must reenter the appsettings , i add some pictures of my appview .

- via search back

- when try to go Back from log to devices no landingpage you see it on the blue / green colour.

the lock error solved by itself .

( on official release : i will spend some money for your great work / when you know somebody who can develop an app for the zigbee danalock device in his freetime ( i got some of this devices 3 to price of under what a zwave model cost 🙈)then you could not make a better start in the new year for me guys. but thx to all your work . during this days. 👍👍 and if we not write again here i wish a good start for you and your family s in the new year .🥳

Am 30.12.2018 um 14:40 schrieb nhassink notifications@github.com:

I cannot reproduce your lock problem. Works over here with a virtual lock device. Can you send the picture again?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

nhassink commented 5 years ago

I found a possible cause for your lock issues. We will fix this in the next update

Strike2001 commented 5 years ago

thank you .

Von meinem iPhone gesendet

Am 30.12.2018 um 16:24 schrieb nhassink notifications@github.com:

I found a possible cause for your lock issues. We will fix this in the next update

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

robertklep commented 5 years ago

@Strike2001 try again, we just merged a PR that should solve both the crashed and the lock problems.

Strike2001 commented 5 years ago

it Runs now 3 Days stable and no more errors only the icons of VD not shown because there are some problems with image path 🙈 when you have infos where homey 2.0 the iconObj files created i or you can tell it ArianKranenburg ;)

thx and happy new year.

Von meinem iPhone gesendet

Am 30.12.2018 um 20:32 schrieb Robert Klep notifications@github.com:

@Strike2001 try again, we just merged a PR that should solve both the crashed and the lock problems.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

robertklep commented 5 years ago

Thanks for testing, and a happy new year for you as well!

Regarding the icons for virtual devices, there's already an open issue for this.