Statemachine for Eltako FSB14 rollershutters
I originally wanted to specify the height of the blind and the position of the slats separately in an Openhab scene and tried to solve this with rules in the DSL. However, it will be so complicated that in the end it was no longer manageable.I have therefore written an extension to the binding for the FSB14. I would be happy if you could test this out.
Installation
You can find the jar file here (tested under OH 4.1.1). Put it into the add-on folder of your installation. Furthermore, make sure that you stop the original EnOcean binding with the karaf console using bundle:stop command.I had to start the new bundle manually (see help on bundle:start).
Configuration
The following parameters are new for the “rollershutter”:
- swapTime: Switching time of the slats in 100 ms, also specify 14 for e.g. 1.4s
- configMode: either “blinds” or “rollershutter” can be specified here. If you do not specify the parameter, the roller shutter behaves as before.
If the configMode is “blinds”, a dimmer channel and a state machine channel are added to the well-known rollershutter channel. The slats can be adjusted using the dimmer. The channel statemachine returns the state and is connected to a string item.
Sample .thing file
Thing enocean:rollershutter:fgw14usb:0000b0ec „Blinds LivingRoom" (enocean:bridge:fgw14usb) @ "LivingRoom"
[enoceanId = "000000EC", senderIdOffset=108, sendingEEPId = "A5_3F_7F_EltakoFSB", receivingEEPId = "F6_00_00","A5_3F_7F_EltakoFSB", pollingInterval = 300, broadcastMessages = "true",suppressRepeating = "false"]
{ Channels: Type rollershutter:rollershutter [shutTime=65,swapTime=14,configMode="blinds"] }
(Adjust enoceanId, senderOffset and the bridge according to the documentation. The shutTime is in seconds as before.)
Sample .item file
Rollershutter LivingRoom_Blinds "Blinds Living Room" <blinds> (gWindow_LivingRoom) ["Control"] { channel="enocean:rollershutter:fgw14usb:0000b0ec:rollershutter", autoupdate="false"}
Dimmer LivingRoom_Blinds_Slats "Slats Living Room" <blinds> (gWindows_LivingRoom) ["Control"] { channel="enocean:rollershutter:fgw14usb:0000b0ec:dimmer", autoupdate="false"}
String LivingRoom_Blinds_Status "Status" (gWindow_LivingRoom) ["Control"] { channel="enocean:rollershutter:fgw14usb:0000b0ec:statemachine"}
UI-Widget
I combined the three items in the group gWindow_LivingRoom, then the three elements rollershutter, dimmer, and state appear one below the other in the corresponding widget of the automatically generated UI home page (I’m using the semantic model). So you can easily watch what the statemachine does. When the state machine is busy further commands are ignored. However, you may change the dimmer control during movement of the blinds.
Group gWindow_LivingRoom "Window LivingRoom" <blinds> (Livingroom) ["Window"]
Hint
The state machine absolutely needs the feedback telegrams from FSB14. In FAM14, the FSB14 may have to be entered in the feedback list if the addresses are above 126. To do this, please maintain the feedback list tab on the FAM14 using the PCT14 tool and set the FAM14 to operating mode 7. The Eltako bus must be connected via the FAM or FGW14-USB, since the feedback telegrams for addresses larger than 126 are not sent over the air.
Happy xmas!
Sven