I am new to virtual devices, luup and vera in general, but i am willing to learn and reasonably experienced in software development.
This is the current situation
i am controlling some windows using a fibaro 2x1,5kw switch, hooked up to switch an external DC power supply to the motors.
These window motors work through phase reversing, so open/close is controlled by switching the power supply to the corresponding contacts.
What i am currently doing is using scenes to open/close, these scenes are switching the open/close contacts on, wait 21 seconds, and switch them off again.
While that generally works pretty well, it is misrepresented in the UI and prone to user error.
So in the UI there are 2 switches for each motor, if someone where to switch both on, the motor will probably be damaged, if someone would leave one of the switches on for more than 21 seconds, the motor will probably burn out.
In order to conquer this and gain some usability, i would like to have a virtual device that ?mplements an open/close toggle or something similar, this toggle should either trigger the open/close scenes or implement the same using lua.
It’s probably not going to be easy, but if at all possible i would also like to “block” the momentary switches that are hooked to the fibaro relay, so if pressed, they trigger the relay for 21 seconds, regardless of how long they are pressed.
if the window state is closed, the momentary switch for “close” should not trigger closing them again.
Is any or all of this feasable and doable?
Any pointers on how to proceed would be greatly appreciated
I am running UI7 on a vera edge.
Thanks!