[Homey Pro] overview script

Hi Caseda,

I’ve tried the script, but I keep getting these error messages:

:cross_mark: Script Error

:warning: 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)

Am I doing something wrong, or is it the script?

Regards Peter

HP26, version 13.3, script is unchanged

Which version of which script, Peter?

I just ran the most recent scripts below, @ Pro 2026, no issues:

you are right, I missed it.

I tried the script Homey Pro Overview v1.20.

It runs fine until zwave overview, and error message is coming up with the zigbee part.

I see! I don’t use Homey zigbee, that would explain the different results.

ok, that´s the difference. However, thanks for the early morning reply. :slight_smile:

I tried also Homey Pro Tagged Overview v1.4, that comes also up with an error message

:cross_mark: Script Error

:warning: 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 actually am getting the same error on my HP26.

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.

How about a log(device.type) before line 674 to see the value?
Just tried it. The value is: undefined as some Aqaras have no type.

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.

In my case these are three non-T1 Aqara sensors.

  • Aqara Vibration Sensor (lumi.vibration.aq1)
  • 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:

And the available Type of the vibration sensor (first in the list) mentioned in the Advanced Setting of the device tile:

Tried the v1.21 version, but get the same error:

Does perhaps any of the other empty fields (Model ID and Receive When Idle) trigger te error?

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 :slight_smile: (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. :thinking:

Different error :sweat_smile::

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 :joy:, fixed.

Thanks for your late night efforts!

I tried the new version. I assume the download link is still the same to the 1.21 version. Unfortunately I get the same error :sweat_smile::

Is there any info I can provide you with to further debug the error?

By the way, I am using the normal/non-tagged version of the script. I also checked the tagged version: that completes without an error.

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:

:cross_mark: Script Error

:warning: 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.

@SunBeech @PeterHa my bad, apparently my IDE didn’t push the typo errors of not enough N’s into github, which I didn’t notice :thinking:, now it is really fixed.

The philips hue device missing the manufacturer and device id is really weird, don’t think I’ve seen that before.

Now it works :grinning_face:.

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.

Also the script reports that all my apps have crashed or are disabled, while non have/are: