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 @CelticWebs
I've attached the gate and garage VD's I use but didn't strip out any parts as discussed.
Some comments to help as you pick through the code
Garage
Full vd looks as follows
Please login or register to see this attachment.
Gate
My gate just requires a zero volt contacts close to either open or close so I have the relay set to 'auto-off' after 2 seconds and this is enough to trigger it
If I leave the relay open it will hold the gate open
The button options are standard enough, nothing different here
in the Main loop I use a global variable called stateTable. I use the table to check for changing states at parts of my setup
When the gate pen I want to take a photo but as the vd loop runs (constantly - every 3 seconds) I don't want an endless stream of pics if left open. To prevent this I write the status to the state table and what it next changes state I compare before setting the new state. This gives me one trigger point to take the one picture
Please login or register to see this code.
This sets the icon
Please login or register to see this code.
The rest should be easy enough to pick through
Please come back with any questions as it can be difficult sometimes to pick through some other persons code
-f
Please login or register to see this link.
Please login or register to see this link.
Please login or register to see this link.
Please login or register to see this link.
Please login or register to see this attachment.
Please login or register to see this attachment.
Edited by AutoFrank8 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.