AdyRock / com.somfy.tahoma

Somfy TaHoma app for Homey
GNU General Public License v3.0
7 stars 3 forks source link

Total crash... #37

Closed felixoslo closed 3 years ago

felixoslo commented 3 years ago

Whooo... I installed the app, installed a device with horizontal Awning io and Homey hang after a few minutes totally, from all devices, android iPad etc. The only rescue was to reboot Homey and really really fast uninstall the app before Homey managed to load it. I tested it three times with the same result every time.

AdyRock commented 3 years ago

What version of Homey firmware are you using?

felixoslo commented 3 years ago

release "4.14.15-g3c513a6eca" nodeVersion "v12.16.1" homeyVersion "7.1.3-rc.8"

Fra: Adrian Rockall @.> Sendt: lørdag 28. august 2021 09:58 Til: AdyRock/com.somfy.tahoma @.> Kopi: Thomas Klevenberg (klevenberg.no) @.>; Author @.> Emne: Re: [AdyRock/com.somfy.tahoma] Total crash... (#37)

What version of Homey firmware are you using?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/AdyRock/com.somfy.tahoma/issues/37#issuecomment-907590071, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJMGFB2CGFTIZWMXCOB4ZYTT7CJHNANCNFSM5C6OHLVA. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

AdyRock commented 3 years ago

If you are on slack, have a look at this: https://athomcommunity.slack.com/archives/C04E9KJAD/p1630056493004400?thread_ts=1630056493.004400&cid=C04E9KJAD Could try the procedure offered by Jeroen and report the results? Note: as the web app seems to be robust you can remove the offending device from there after running the test.

felixoslo commented 3 years ago

Doesn’t have access….:(

But I am allowing beta versions in Homey

Fra: Adrian Rockall @.> Sendt: lørdag 28. august 2021 09:58 Til: AdyRock/com.somfy.tahoma @.> Kopi: Thomas Klevenberg (klevenberg.no) @.>; Author @.> Emne: Re: [AdyRock/com.somfy.tahoma] Total crash... (#37)

What version of Homey firmware are you using?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/AdyRock/com.somfy.tahoma/issues/37#issuecomment-907590071, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJMGFB2CGFTIZWMXCOB4ZYTT7CJHNANCNFSM5C6OHLVA. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

AdyRock commented 3 years ago

Another user has posted a similar vid on slack and he has been asked to do the following:

Can you run

new Promise(async (resolve) => { const devices = await Homey.devices.getDevices(); const result = []; Object.values(devices).forEach(device => { if (device.capabilities.includes(null)) { result.push(device); } }) resolve(result); })

in Homey Developer Tools should return 0 items if all ok

Obviously, this needs to be run when you are having the problem  If it doesn’t return 0 can you copy / paste the result in a reply.

felixoslo commented 3 years ago

Result without the device installed:

"root":{1 item "error":string"unexpected token: identifier" }

With device installed:

"root":{1 item "error":string"unexpected token: identifier" }

Fra: Adrian Rockall @.> Sendt: lørdag 28. august 2021 11:35 Til: AdyRock/com.somfy.tahoma @.> Kopi: Thomas Klevenberg (klevenberg.no) @.>; Author @.> Emne: Re: [AdyRock/com.somfy.tahoma] Total crash... (#37)

Another user has posted a similar vid on slack and he has been asked to do the following:

Can you run

new Promise(async (resolve) => { const devices = await Homey.devices.getDevices(); const result = []; Object.values(devices).forEach(device => { if (device.capabilities.includes(null)) { result.push(device); } }) resolve(result); })

in Homey Developer Tools should return 0 items if all ok

Obviously, this needs to be run when you are having the problem If it doesn’t return 0 can you copy / paste the result in a reply.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/AdyRock/com.somfy.tahoma/issues/37#issuecomment-907600902, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJMGFB6T27B755X5WZ2RI7LT7CUV5ANCNFSM5C6OHLVA. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

AdyRock commented 3 years ago

Hmm, looks like something strange occurred with the copy and paste on my phone. Can you try this:

new Promise(async (resolve) => {
  const devices = await Homey.devices.getDevices();
  const result = [];

  Object.values(devices).forEach(device => {
    if (device.capabilities.includes(null)) {
      result.push(device);
    }
  })

  resolve(result);
})
felixoslo commented 3 years ago

Without device installed:

"root":[]0 items

With device installed - I need to be really fast since Homey crashes:

"root":[1 item 0:{32 items "__athom_api_type":string"HomeyAPI.ManagerDevices.Device" "id":string"3688d366-9697-4ad9-96df-75a8f42973af" "name":string"Markise" "driverUri":string"homey:app:com.somfy.tahoma" "driverId":string"io_horizontal_awning" "zone":string"9919ee1e-ffbc-480b-bc4b-77fb047e9e68" "zoneName":string"Hjem" "iconObj":{2 items "id":string"cbe6d93201102b69d40772ee6f5b0208" "url":string"/icon/cbe6d93201102b69d40772ee6f5b0208/icon.svg" } "settings":{3 items "invertUpDown":booltrue "invertTile":booltrue "invertPosition":booltrue } "settingsObj":booltrue "class":string"sunshade" "energyObj":{4 items "W":NULL "batteries":NULL "cumulative":NULL "generator":NULL } "capabilities":[5 items 0: string"windowcoverings_state" 1: string"windowcoverings_set" 2: string"quick_open" 3: string"lock_state" 4: NULL ] "capabilitiesObj":{4 items "windowcoverings_state":{11 items "value":string"up" "lastUpdated":string"2021-08-28T10:10:55.061Z" "type":string"enum" "getable":booltrue "setable":booltrue "title":string"Status for vindusbeskyttelse" "desc":NULL "units":NULL "values":[3 items 0:{2 items "id":string"up" "title":string"Opp" } 1:{2 items "id":string"idle" "title":string"Ikke aktiv" } 2:{2 items "id":string"down" "title":string"Ned" } ] "id":string"windowcoverings_state" "options":{}0 items } "windowcoverings_set":{15 items "value":int0 "lastUpdated":string"2021-08-28T10:10:55.062Z" "type":string"number" "getable":booltrue "setable":booltrue "title":string"Posisjon" "desc":string"Innstill vindusbeskyttelsens posisjon. 0 % er lukket, 100 % er åpen" "units":string"%" "decimals":int2 "min":int0 "max":int1 "chartType":string"stepLine" "id":string"windowcoverings_set" "options":{}0 items "values":undefined } "quick_open":{11 items "value":boolfalse "lastUpdated":string"2021-08-28T10:10:55.060Z" "type":string"boolean" "getable":booltrue "setable":booltrue "title":string"Open" "desc":NULL "units":NULL "id":string"quick_open" "options":{}0 items "values":undefined } "lock_state":{12 items "value":string"" "lastUpdated":string"2021-08-28T10:10:55.019Z" "type":string"string" "getable":booltrue "setable":boolfalse "title":string"Lock State" "desc":NULL "units":NULL "iconObj":{2 items "id":string"fe94a2732c723a5265cb8c8db8a61d58" "url":string"/icon/fe94a2732c723a5265cb8c8db8a61d58/icon.svg" } "id":string"lock_state" "options":{}0 items "values":undefined } } "flags":[]0 items "ui":{3 items "quickAction":string"quick_open" "components":[3 items 0:{2 items "id":string"slider" "capabilities":[1 item 0: string"windowcoverings_set" ] } 1:{2 items "id":string"ternary" "capabilities":[1 item 0: string"windowcoverings_state" ] } 2:{2 items "id":string"sensor" "capabilities":[1 item 0: string"lock_state" ] } ] "componentsStartAt":int0 } "ready":booltrue "available":booltrue "repair":boolfalse "unpair":boolfalse "unavailableMessage":NULL "speechExamples":[1 item 0: string"Open the window coverings" ] "images":[]0 items "insights":[]0 items "color":string"#FAB800" "data":{4 items "id":string"36be83bb-9371-4fda-a6c3-7519727f20c1" "deviceURL":string"io://0825-2753-3533/16085196" "label":string"Markise" "controllableName":string"io:HorizontalAwningIOComponent" } "icon":undefined "iconOverride":undefined "energy":undefined "virtualClass":undefined "uiIndicator":undefined "capabilitiesOptions":undefined } ]

Fra: Adrian Rockall @.> Sendt: lørdag 28. august 2021 12:02 Til: AdyRock/com.somfy.tahoma @.> Kopi: Thomas Klevenberg (klevenberg.no) @.>; Author @.> Emne: Re: [AdyRock/com.somfy.tahoma] Total crash... (#37)

Hmm, looks like something strange occurred with the copy and paste on my phone. Can you try this:

new Promise(async (resolve) => {

const devices = await Homey.devices.getDevices();

const result = [];

Object.values(devices).forEach(device => {

if (device.capabilities.includes(null)) {

  result.push(device);

}

})

resolve(result);

})

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/AdyRock/com.somfy.tahoma/issues/37#issuecomment-907603852, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJMGFB7WV2KUEEOISKDJG6LT7CXYXANCNFSM5C6OHLVA. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

AdyRock commented 3 years ago

OK, that confirms it is the same issue as one of my other users and a user of another app by a different developer. For some reason a NULL capability is being added and the mobile apps can't cope with that. I have searched my code and I can't find anything that would add that NULL, plus it has worked for a long time with many users. So my suspicion is there is some strange issue with rc8 but I am confused as I am also on rc8 and I have tried adding devices and I have no problems. If I find a solution I will report back here. Also when the next rc comes out could you try again to see if the problem is still there.

felixoslo commented 3 years ago

Super thx!! Can’t Homey support help?

Fra: Adrian Rockall @.> Sendt: lørdag 28. august 2021 12:22 Til: AdyRock/com.somfy.tahoma @.> Kopi: Thomas Klevenberg (klevenberg.no) @.>; Author @.> Emne: Re: [AdyRock/com.somfy.tahoma] Total crash... (#37)

OK, that confirms it is the same issue as one of my other users and a user of another app by a different developer. For some reason a NULL capability is being added and the mobile apps can't cope with that. I have searched my code and I can't find anything that would add that NULL, plus it has worked for a long time with many users. So my suspicion is there is some strange issue with rc8 but I am confused as I am also on rc8 and I have tried adding devices and I have no problems. If I find a solution I will report back here. Also when the next rc comes out could you try again to see if the problem is still there.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/AdyRock/com.somfy.tahoma/issues/37#issuecomment-907606043, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJMGFBZJWCXPQ2QNI63AIMLT7C2E7ANCNFSM5C6OHLVA. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

AdyRock commented 3 years ago

I have been working on this with Jeroen from Ahom since the 24th. He has checked my code (but it's a large app) and is looking into the problem from Athom's side. At the moment yours is the third case I know of so the information you provided is useful in confirming the problem is the same.

AdyRock commented 3 years ago

Athom have released a new rc10. Could you install that and then add the device again to see if it fixes the problem.

felixoslo commented 3 years ago

Look like that solved it!

Fra: Adrian Rockall @.> Sendt: mandag 30. august 2021 16:11 Til: AdyRock/com.somfy.tahoma @.> Kopi: Thomas Klevenberg (klevenberg.no) @.>; Author @.> Emne: Re: [AdyRock/com.somfy.tahoma] Total crash... (#37)

Athom have released a new rc10. Could you install that and then add the device again to see if it fixes the problem.

- You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/AdyRock/com.somfy.tahoma/issues/37#issuecomment-908376730, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJMGFBYWS6CCKGB37IPFMKTT7OGQDANCNFSM5C6OHLVA. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

AdyRock commented 3 years ago

Excellent. A relief to know it's working.