FS 20 on for timer?


I would like to send a command that use the internal timer in the fs20 component. Can some one explain me what I have to do to send such a timer to my fs20 switch?
I can create a rule. But what should I do to send such a command. I tried sendCommand(MySwitch, “on-for-timer 10”). But this not work.

thanks for help

I don’t know FS20 so if I’m wrong hopefully someone will correct me, but based on reading the binding’s wiki page I don’t think it supports that sort of command. In your Switch or DimmerSwitch item you need to specify the address of the item you are communicating with using the house address and device address but there doesn’t appear to be support for any other info.

I am using the following rule for quite a while and it still works:

rule LichtDachTreppeZeitschalterChanged
	Item LichtDachTreppe changed from OFF to ON
	logInfo("RULES", "LichtDachTreppe-Zeitschalter: an für 5 Minuten")  
	createTimer(now.plusMinutes(5)) [|
		sendCommand(LichtDachTreppe, OFF)

Hello dirkc

Thank you for your answer
That’s a idea. But this solution has a problem. It is not guaranteed the command will be received from the switch. In the case of a garden watering we have a problem if the off command getting lost.

Are there other ideas?

have a good time

Hello rlkoshak

Thank you for your reply. I can switch my device on and off. So it works basically, but the additional commands I would need for some usecase. But I think you are right. They will be no support for such a command.
I come from fhem, and these framework support such a command. Sould I go back?

have a good time

Implementing a timer in openHAB rules is trivial. If you are seeing other benefits by using openHAB I would certainly stick with it.

See @dirkc 's example rule above.

Hello rlkoshak

Yes I see the timer. I think the timer is on openhab and not on the fs20 device. So if the radio signal is lost, the fs20 device never go off. If you can send such a command like on-for-timer xx (http://www.fhemwiki.de/wiki/FS20_Allgemein#Einsatzm.C3.B6glichkeiten). You send this cammand and the fs20 goes off after xx, without any off radio signal.

That is correct. When you switch the light in openHAB it sends the ON command to the device, waits five minutes, then sends the OFF command. If your wireless connectivity to the fs20 device is so unreliable that this wouldn’t work then your original approach wouldn’t work either because you couldn’t get the timer command to the fs20 device reliably in the first place.

thats no problem. For example garden watering. I would like to get my plants some water. I send (currently from fhem) the command on-for-timer 30. If the fs20 switch receive the command he switch on. After 30 second he get automaticaly off without a radio signal. You send only one command, not two.
If he receive the command on-for-timer not, nothing happens. Important is that the off coammand is 100% save (otherwise you have a flood). And it is, because it use the timer in the fs20 devise.

Hi huelsi77,

I am not quite sure if fhem really sets the timer in the specific device. Did you check the code within fhem?
If this is really possible, you should try to get in contact to the author of the fs20 binding to implement that. It should not be that difficult. Unfortunately I am not able to setup the IDE, otherwise I would do the coding myself.

I used fhem for some years but I am now on openHAB for quite some time and I would not step back for some reason, especially when using rules. I am not a fan of perl and the cryptic configs :wink: