[Homey Pro] overview script

I think what Caseda also meant was, chatgpt’s ‘knowledge’ stops at around 2021

How about adding first a funktion like:

let output = '';
function addLog(...args) {
  output += args.join(' ') + '\n‘;
}

Then change every log statement to „addLog“ and either return „output“ or add a statement to create your tag using „output“?

And today is the day, that the script has been adapted for returning the end result in multiple ways.

  • JSON Object: All the values are separated in their appropriate tag that you, for example, can read with the “Read [TEXT] as JSON and select path [PATH] as …” logic flow card.
  • String: All the (basic) values can be separated by your own chosen separator, to for example send it as push message to your phone.
  • HomeyScript tag: The returned JSON object or String can also be put into a HomeyScript tag.
  • Logic Variable: The returned JSON object or String can also be put into a Logic Variable, this variable does have to be of the type “Text”.

I did need to move the codes to my github page (no need to have an account), as the character count was getting too big of the Tagged version (it is over the 32000 character max limit the forum allows).
But in addition it will make copying the code easier.

If you do find any issues, or missing something feel free to contact me or leave a reply, and i’ll see what I can do.

5 Likes

Working great so far! Thx @Caseda!

Thank you!

Looks like there are some differences:
Tagged Overview reports in my case 0 Virtual devices
Overview v1.16 reports: 3 Virtual devices

Hmmm, i can confirm, thanks.
I didn’t change anything in that piece of code so a bit strange that it shows 0
I’ll check when i’m back at home why it does so.

Overview script v1.17 and Tagged overview script v1.1 are out now and ready to be downloaded.

It appears that I missed a change in the new SDK used in HomeyScript.
Which needed me to refactor some of the code used how the virtual devices are counted.

While testing I noticed that Homey Bridge is technically a virtual device in Homey, so I separated it out now into its own category of device.

Changelog is the same for both:
v1.17 - v1.1:

  • Fixed: API change
  • Added: sysInternals devices as virtual devices
  • Separated out Homey Bridge devices
4 Likes