Time for an update on this project.
The South window is in flawless automatic operation for more than 2 weeks.
In the mean time I bought a second Fakro ZWS230 for operation on the North window.
This one didn't need to operate upside down because the window rotation direction was according to the flexible direction of the Fakro chain.
The Fakro mounting frame (see
Description of the ZWS230) was not applicable, so I used again 2 simple L shaped support of 40 by 40x10mm (pointing to each other).
The 2 bolts in the Fakro stay a little lose to adapt for friction (as per original mounting frame).
Network inclusion is simple: Push the Z-wave stick button once, it starts blinking. Push the red ZWS230 button for one second. The Z-wave stick will acknowledge by fast blinking. The ZWS230 accepts the network and the red led will be off.
By replacing
query_stage="SecurityReport" to
query_stage="ManufacturerSpecific2" the Fakro ZWS230 becomes available under Devices.
Maturity development:
- the state Automatic, does not exclude manual operation
- the 2 windows can operate in conjunction or apart
- a try to simplify
GUI items:
- Slide1a_crop_corr.PNG (220.82 KiB) Viewed 12372 times
Window_Opener_S and Window_Opener_N are the direct control of the Fakro without the chain length limitation and therefore password protected.
D_Window_Automatic is the dummy switch between Automatic and Manual operation
D_Window_S_manual and D_Window_N_manual are the manual operation buttons (with chain length limitation)
D_Window_S_open and D_Window_N_open are semaphores to prevent double opening (they should and will be password protected) and their log is used to check correct operation.
The group Windows_open is for timed and manual conjunct-ed operation. The group makes a call to the 2 Blockly's as used for manual operation.
Blockly's:
- Slide1b_crop.png (253.1 KiB) Viewed 12385 times
The Windows_open group is executed on time, if in Automatic mode.
The group makes a call for ON to D_Window_S_manual and D_Window_N_manual. (and is translated by Domoticz to Open status ???
)
If the window is not Open yet as declared by the window__open semaphore and status of the Fakro, then the semaphore blocks other operations and the open cycle starts for 7 seconds.
The OFF call from the group is an unconditional Close operation where the Fakro will stop automatic and the semaphore is released after 8 seconds (1 sec. extra because the Domoticz schedule resolution is 1 seconds)
Automatic or Manual:
- Slide2_crop.PNG (263.99 KiB) Viewed 12385 times
The state change from Automatic to Manual or v.v. has to be executed once. Therefore the variable V_Window_Automatic makes it an impulse and has an initial value of 1.
To determine this state change, the window_open semaphore blocks other operation and a close cycle is executed even if it is superfluous.
Both semaphores are released after 9 seconds (2 sec. extra for schedule resolution of the 2 operations)
Possible pitfall:
Can D_Window_Automatic and V_Window_Automatic be out of sync?
- At Domoticz start-up the shut-down status of D_Window_Automatic is remembered.
- V_Window_Automatic has an initial value of 1, but I'm not sure what Domoticz does with variables at start-up: renew the initial value or remember the last value,
testing shows no problems. It
seems that the variables are also remembered (no statement in User Variables Wiki)
Remarks:
1) ... testing can only show the existence of bugs, it does not prove the correctness of a program.
2) Correctness proofs are not supported in programming languages (still not after my study 35 years ago
FYI search on E.W.Dijkstra)
3) Even Blockly needs documentation and GUI too
Hope to inspire others,
Domosapiens
Edit 25-5-15: corrected picture Slide1a_crop_corr.PNG + typo's