[Homey Pro] overview script

Z-wave’s getState() function can be a big mess :joy: the node overview is in a nice array, but trying to get the battery devices etc is a bit harder, probably need to use another function to actually get the state of a node instead of using the stats object.
Zigbee is much easier for that matter, i guess the later implementation made it easier for them to be developer friendly

--------------- Homey Pro Overview --------------

Homey name: Huize Banis

Homey version: 8.1.3

Homey model: Homey (Early 2018) (1 core(s))

Uptime: 44270 (12 hours, 17 minutes, 50 seconds)

Update available: None

------------------ Main ---------------------

2 Users (1 owner, 0 manager(s), 1 user(s), 0 guest(s))


SDKv2 apps:

Vrije dagen KlikAanKlikUit NEO Coolcam < group > Zonnestanden Neato BotVac



Updateable apps:

Vrije dagen KlikAanKlikUit Aqara & Xiaomi ZigBee Zonnestanden Virtuele Apparaten


27 Apps (6 SDKv2, 21 SDKv3, 5 updateable, 0 disabled/crashed)

17 Zones

11 Notifications

1 Variables (1 boolean (yes/no), 0 number, 0 string)

129 Flows (1 broken, 12 disabled)

7 Advanced flows (0 broken, 4 disabled)

----------------- Devices -------------------

1 Z-Wave nodes (0 router, 0 battery, 0 unreachable)

5 Zigbee nodes (1 router, 4 end device)

15 Virtual devices

1 Infrared (database) devices

44 Other devices

66 Total devices

——————————————————— :white_check_mark: Script Success

Thanks so much for your quick response (if I read more carefully, but I copied paste the script :flushed:) I could have known).

1 Like

I have a script to find BLL variables, ill try to add it later if you want.
I’ll also, if i may, add VD en AVDs as virtual devices?!

1 Like

Sure, go ahead

That is already included into the virtual devices :stuck_out_tongue:

Ah, sorry, i am in my phone and didn’t look well enough at the script.

What about device like from BLL (VDs for variables), chronograph, etc. They should be considert VDs aswell right?

I didn’t know these could have (virtual) devices, learning everyday, i can add them too pretty quickly I guess.

1 Like

So the Z-wave part is fixed now, that took way longer then i hoped for, but it has now more abilities too, as it will show you how many unsecure, secure (S0, S2 both types) and unknown nodes have too, the unknown nodes aren’t included into the actual z-wave node count, as these aren’t actual devices in Homey, they are there just for overview purposes.

There can be a small discrepancy between battery/router devices in the overview and your actual devices, as Homey doesn’t expose if a device is a routing device or not, especially for FLiRS devices as those aren’t even flagged as battery devices (which they are)…
So I now check if it is a battery device, or has batteries in it to see if it is a battery device.
This can cause for some device to be counted as battery while they aren’t (Aeotec siren 6 is a good example for this, as it does have a internal battery, but usually is connected to the mains).
It will be kind of impossible to look at every possible option to manually exclude it from said list.

I’ve also added the chronograph and better logic virtual devices to the virtual devices count.

The new script can be found in the top post.
And have updated my original results with these fixes, if you already posted your results i would recommend to update your original results instead of posting a new post.

3 Likes

My results
--------------- Homey Pro Overview --------------

Homey name: Homey

Homey version: 8.1.3

Homey model: Homey (Early 2016) (1 core(s))

Uptime: 932394 (10 days, 18 hours, 59 minutes, 54 seconds)

Update available: None

------------------ Main ---------------------

4 Users (1 owner, 0 manager(s), 2 user(s), 1 guest(s))

19 Apps (1 SDKv2, 18 SDKv3, 0 updateable, 0 disabled/crashed)

12 Zones

1116 Notifications

39 Variables (5 boolean (yes/no), 17 number, 17 string)

62 Flows (0 broken, 30 disabled)

4 Advanced flows (0 broken, 2 disabled)

----------------- Devices -------------------

15 Virtual devices

0 Infrared (database) devices

21 Other devices

14 Z-Wave nodes (11 Unsecure, 3 Secure (S0), 0 Secure (S2 Authenticated), 0 Secure (S2 Unauthenticated), 10 router, 4 battery, 3 unreachable, 0 Unknown node(s))

9 Zigbee nodes (8 router, 1 end device)

59 Total devices

———————————————————
:white_check_mark: Script Success

:leftwards_arrow_with_hook: Returned: “Overview finished”

--------------- Homey Pro Overview --------------

Homey name: Homey
Homey version: 8.1.3
Homey model: Homey (Early 2016) (1 core(s))
Uptime: 915402 (10 days, 14 hours, 16 minutes, 42 seconds)

Update available: None

------------------ Main ---------------------
4 Users (1 owner, 0 manager(s), 2 user(s), 1 guest(s))
44 Apps (4 SDKv2, 40 SDKv3, 1 updateable, 0 disabled/crashed)
20 Zones
155 Notifications
41 Variables (6 boolean (yes/no), 18 number, 17 string)
142 Flows (2 broken, 5 disabled)
15 Advanced flows (0 broken, 0 disabled)

----------------- Devices -------------------

24 Virtual devices
0 Infrared (database) devices
20 Other devices
1 Z-Wave nodes (0 Unsecure, 0 Secure (S0), 1 Secure (S2 Authenticated), 0 Secure (S2 Unauthenticated), 1 router, 0 battery, 0 unreachable, 0 Unknown node(s))
80 Zigbee nodes (56 router, 24 end device)

118 Total devices

———————————————————
:white_check_mark: Script Success
:leftwards_arrow_with_hook: Returned: “Overview finished”

But with v1.2 of the script i’m a little ahead of you, the script now also shows the HomeyScript tokens and any Better Logic Variables if it is installed.

Sorry m8, i am just getting behind my laptop, had it planned for monday or next week :slight_smile:
But i just PMed a small update:

await Homey.apps.getAppSettings({id: 'com.athom.homeyscript'})
  .then(result => log(result.tokens? Object.keys(result.tokens).length : 0 , 'Homey Script tokens') & log(result.scripts? Object.keys(result.scripts).length : 0 , 'Homey Script scripts'))
  .catch(err => {log('Failed: HomeyScript')})

I got an error because my tokens are null.
Also added count scripts to it, if you dont mind.

A didn’t think/test that with 0 tokens, fix is implemented :+1:t2:

There are too many of these apps (4!), so i think that is going to get a bit too much.
Feel free too add such for your own use of course.

--------------- Homey Pro Overview --------------

Homey name: Homey Pro van Marcel

Homey version: 8.1.3

Homey model: Homey Pro (Early 2019) (2 core(s))

Uptime: 3162 (52 minutes, 42 seconds)

Update available: None

------------------ Main ---------------------

2 Users (1 owner, 0 manager(s), 0 user(s), 1 guest(s))


SDKv2 apps:

NEO Coolcam Homey Community Store


32 Apps (2 SDKv2, 30 SDKv3, 0 updateable, 0 disabled/crashed)

25 Zones

1572 Notifications

47 Variables (16 boolean (yes/no), 28 number, 3 string)

6 Flows (0 broken, 1 disabled)

32 Advanced flows (0 broken, 3 disabled)

29 Homey Script tokens

3 Better Logic Variables (0 boolean (yes/no), 3 number, 0 string)

----------------- Devices -------------------

5 Virtual devices

0 Infrared (database) devices

77 Other devices

17 Z-Wave nodes (17 Unsecure, 0 Secure (S0), 0 Secure (S2 Authenticated), 0 Secure (S2 Unauthenticated), 9 router, 8 battery, 2 unreachable, 0 Unknown node(s))

13 Zigbee nodes (6 router, 7 end device)

112 Total devices

——————————————————— :white_check_mark: Script Success

:leftwards_arrow_with_hook: Returned: “Overview finished”

4 HomeyScript apps?

I mend, i added, next to the amount of HS tokens, the amount of HS scripts (data is already available where i placed it), it was in the part i send.

Aaah, I misunderstood my bad, yeah I saw that afterwards, not sure why I never thought of that one :joy: thanks you

1 Like

Your welcome.

And what did you mean by 4 apps? The VDs?

No I thought you meant count down apps like chronograph’s timers or countdown timers, technically there is even 5 with Flow Utilities also having those kind of options with timers.

1 Like

@jero Number of notifications seems not limited imho? At least not to 100

--------------- Homey Pro Overview v1.4 --------------

Homey name: Homey Pro
Homey version: 8.1.3
Homey model: Homey Pro (Early 2019) (2 core(s))
Uptime: 28385 (7 hours, 53 minutes, 5 seconds)
Update available: None

------------------ Main ---------------------

2 Users (1 owner, 0 manager(s), 1 user(s), 0 guest(s))
23 Apps (2 SDKv2, 21 SDKv3, 0 updateable, 0 disabled/crashed)
13 Zones
32 Notifications
4 Variables (0 boolean (yes/no), 4 number, 0 string)
10 Flows (0 broken, 0 disabled)
4 Advanced flows (0 broken, 0 disabled)
Failed: Getting HomeyScript

----------------- Devices -------------------

8 Virtual devices
0 Infrared (database) devices
27 Other devices
13 Z-Wave nodes (10 Unsecure, 1 Secure (S0), 2 Secure (S2 Authenticated), 0 Secure (S2 Unauthenticated), 10 router, 3 battery, 1 unreachable, 9 Unknown node(s))
0 Zigbee nodes (0 router, 0 end device)
48 Total devices

——————————————————— :white_check_mark: Script Success

:leftwards_arrow_with_hook: Returned: “Overview finished”

--------------- Homey Pro Overview v1.4 --------------

Homey name: Niclas Homey Pro

Homey version: 8.1.3

Homey model: Homey Pro (Early 2019) (2 core(s))

Uptime: 1015546 (11 days, 18 hours, 5 minutes, 46 seconds)

Update available: None

------------------ Main ---------------------

4 Users (1 owner, 1 manager(s), 2 user(s), 0 guest(s))

36 Apps (7 SDKv2, 29 SDKv3, 0 updateable, 0 disabled/crashed)

29 Zones

347 Notifications

61 Variables (0 boolean (yes/no), 60 number, 1 string)

514 Flows (0 broken, 9 disabled)

2 Advanced flows (0 broken, 0 disabled)

25 HomeyScript scripts (1 tokens)

----------------- Devices -------------------

28 Virtual devices

0 Infrared (database) devices

67 Other devices

33 Z-Wave nodes (32 Unsecure, 0 Secure (S0), 0 Secure (S2 Authenticated), 1 Secure (S2 Unauthenticated), 19 router, 14 battery, 0 unreachable, 0 Unknown node(s))

27 Zigbee nodes (6 router, 21 end device)

155 Total devices

——————————————————— :white_check_mark: Script Success

:leftwards_arrow_with_hook: Returned: “Overview finished”