I’ve tried the script, but I keep getting these error messages:
Script Error
TypeError: Cannot read properties of undefined (reading ‘toLowerCase’)
at SCPT Alle Infos abfragen.js:674:21
at Array.forEach ()
at SCPT Alle Infos abfragen.js:665:29
at process.processTicksAndRejections (node:internal/process/task_queues:103:5)
at async HomeyScriptApp.runScript (/app/app.js:364:22)
at async Object.runScript (/app/api.js:30:22)
ok, that´s the difference. However, thanks for the early morning reply.
I tried also Homey Pro Tagged Overview v1.4, that comes also up with an error message
Script Error
TypeError: Cannot read properties of undefined (reading ‘toLowerCase’)
at test.js:716:23
at Array.forEach ()
at test.js:711:31
at process.processTicksAndRejections (node:internal/process/task_queues:103:5)
at async HomeyScriptApp.runScript (/app/app.js:364:22)
at async Object.runScript (/app/api.js:30:22)
Sounds like you have a device that is invalid or corrupt, just tested it on my HP23 with lots of zigbee devices, but don’t get the error message.
Could you check on the developer pages to see if any devices look weird in the “Type” column, should either say, coordinator, router or enddevice
Or in the not so surprising options, maybe the HP26 changed something in the back-end.
I have approx. 70 Zigbee devices. The Type column is filled in most case with coordinator, router or enddevices. In a few cases however, this field is empty. Those devices are all (different types of) Aqara sensors (which are enddevices). Not sure if that helps.
hmmm, empty type values, the code currently doesn’t respond (properly) to that endeed.
But also sounds like an Homey issue, can a few of you with the issue give a small list what kind of devices? Manufacturer (seems mostly aqara?) and Model ID, then I can give that to Athom to look into.
In the meantime I will add an extra check into the code to catch this.
Have an empty type field with Aqara enddevices since quite a while. Opened a ticket. Athom said they couldn’t find anything. All of my zigbee enddevices are Aqaras. Type: lumi.weather, | lumi.sensor_wleak.aq1, and lumi.sensor_magnet.aq2 .
Updated the script (Overview: v1.21 and Tagged: 1.5) to catch these zigbee devices and put them in a separate counter as I can’t be 100% be sure they are all enddevices.
Aqara Door & Window Sensor (lumi.sensor_magnet.aq2)
Aqara Temperature & Humidity Sensor (lumi.weather)
I also have de T1 version of some of these sensors and those do show the type as ‘enddevice’.
The strange thing is that though no Type (and some other info, like Model ID and Receive When Idle) is included in the Homey Developer Tools overview, the Type is mentioned when I check the device details in the Advanced Setting section in the device type.
As an example the (missing) info in Homey Developer Tools:
Woops, I changed my mind half way in, but forget to remove an additional check that would fail for the same reason i’m adding this extra check.
I don’t look at the manufacturer or if it receives while idle.
Try again please (I didn’t change the version number).
Am curious why it never came up before, I can remember the aqara devices not having the manufacturer or model id, so it will use the option you select as device during pairing (it was an extra implementation to be able to add such devices, which Athom added).
Perhaps they before just assumed it being an enddevice, and just added that, or just fell back to it, and they removed that in a later update.
Sigh, not testing your own code fully for the win, and me always mistyping the word unknown, thought I double checked for that, but looks like tripple check was necessary, there are just too many Ns in that word , fixed.
Sorry for the late reply; I’ve been travelling a lot at the moment.
It’s exactly the same for me as it is for Sunbeach.
Version 1.5 runs without any errors. The formatting looks a bit different, but I think that’s fine.
Version 1.21 also throws up an error again:
Script Error
ReferenceError: unknownZigbeeDevices is not defined
at SCPT Alle Infos abfragen.js:679:10
at Array.forEach ()
at SCPT Alle Infos abfragen.js:666:29
at process.processTicksAndRejections (node:internal/process/task_queues:103:5)
at async HomeyScriptApp.runScript (/app/app.js:364:22)
at async Object.runScript (/app/api.js:30:22)
i have 2 unknown devices (manufacturer) with a empty model ID.
1 Aquara temperature sensor: manafacturer LUMI, product ID lumi.weather
1 Philips Hue motion sensor: manaufacturer Philips, product ID SML001
However, I also have other devices of the same type, but the manufacturer and product ID are entered on those.
One small thing I noted is that the sub-counts of the Zigbee devices don’t add up to the total count. I assume Homey itself/the coordinator is not included in the sub-counts.