Welcome to Smart Home Forum by FIBARO
Dear Guest,
as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.
As a member you can:
- Start new topics and reply to others
- Follow topics and users to get email updates
- Get your own profile page and make new friends
- Send personal messages
- ... and learn a lot about our system!
Regards,
Smart Home Forum by FIBARO Team

Question
AutoFrank 372
Hi,
This may help weed out some bugs
Occasionally I have a VD that stops or error out. This could apply to a Main Loop or a Button,
It may be because a sensor has become unavailable and the code is trying to compare something to nil or blank, etc
I know that if the code was written with a lot if resilience then this wouldn't happen but sometimes time or knowledge doesn't enable this to happen
This would also be considered a way to find those corner cases and modify the code to handle these exceptions better
A good example would be the following (sonos api was unavailable during a reboot) and it error out
I have been modifying my code to handle these scenarios but haven't got around to all cases yet.
Please login or register to see this attachment.
If I save the VD, it will go away (as the api is back online) until the next time
So I put this little VD together to scan all virtual devices on your system and report any that have stopped (at this moment it won't detect if it is main loop or a button so you'll just have to check then all for any VD that comes up red)
The output is as follows
Please login or register to see this attachment.
You can see id 420 (Living room remote) that was the example above) and I found I had others as well
but all opportunities to improve things.
I have mine running daily with the output being sent to me through my message hub
The VD code is as follows
Please login or register to see this code.
I have also added the VD below to save you creating your own...
INSTRUCTIONS
Lastly if you want to check that this is working them import the VD marked "deliberate error" and it will show up when you scan
Enjoy
Please login or register to see this attachment.
Please login or register to see this attachment.
Edited by AutoFrank3 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.