Howto: OpenHAB2, RFXCOM and Somfy RTS Rollershutters

For anyone who comes here, also wondering why the rollershutters are taking steps of 1 second instead of just going down; this means its in programming mode, to determine the limits. After I configured the limits with an original remote control, I could press up or down in Openhab just once for it to completely go up or down. Even home (pressing stop while its stopped) works fine.

Next to that, you don’t need RFXcom utility to pair, just set it in pairing mode by holding the motor head button for a few seconds until it jugs, and then fire away the Program command channel (create an item for it and then select it in PaperUI control).

2 Likes

I finally got my RFXtrx433XL working with my shutters, the only thing i want is to track how far my shutters are down or up, but the only thing i get back is 0 or 100, if i send 50, it doesn’t do anything.
anyone got an idea?

For as far as I know Somfy RTS shutters don’t support this. You can only completely open or completely close them. I think the ‘newer’ (mine are almost 18 years old) also support a programmable ‘my’ position on the Somfy remote, but I’m don’t know if the RFXtrx433E/XL support this option.

It does, since it’s the same command as to stop the shutter. This means that sending a STOP command to the item moves the shutter to the pre-defined position. I believe you still need the remote to set this in the first place though.

@Mickroz Somfy shutters only support up, down and stop/my commands, not percentages. It’s also one-way communication, the shutter has no way of reporting back it’s position. I have solved this by setting the Rollershutter items to 50 (via postUpdate in a rule) when they receive a STOP command. This happens either if they moving and being stopped (which means they are somewhere between 0-100% open) or not moving in which case they move to the ‘my’ position, which is about 50%. At least this means I can see if they are fully open, fully closed or somewhere in between (as long as no one uses the remotes, then it’s impossible for openhab to know).

1 Like

Thanks @marcel_erkel and @pacive
My MY is like 98% closed, like vents, can you share the rule?
I was trying to find out if i can time it and then see at what percentage it is when stopping like the garadget app does.
Like it takes 15 seconds from open to fully closed, un a counter from 0 to 100 in 15 seconds, so if you stop it at 7,5 seconds its at 50% closed, give or take.

This is the rule I use:

rule "Set value"
	when
		Member of SunBlinds received command
	then
		var command = receivedCommand
		var item = triggeringItem

		switch command {
			case UP: {
				item.postUpdate(new PercentType(0) as Number)
			}
			case DOWN: {
				item.postUpdate(new PercentType(100) as Number)
			}
			case STOP: {
				item.postUpdate(new PercentType(50) as Number)
			}
		}
end

This requires that the blinds are in the SunBlinds group, but can be altered to work with individual items as well.

I’ve been thinking about doing something like this as well, and i could certainly be done (with some margin of error). But IMO it costs more in terms of work than it’s worth. Where it gets most problematic is a case where you first set the blinds to 30% (down → wait 15 * 0.3 seconds → stop), then you want to change to 50% (down → wait 15 * (0.5 - 0.3) seconds → stop) etc. It would probably get out of sync eventually. Not to mention i someone uses the remote to set it to ~90%, then you want to change to 60%, but OH still thinks it’s at 50%.

If you only want to be able to see the percentage based on the moving time it might be easier (down → count time → stop → calculate percentage), but won’t work with the ‘my’-button (since OH only sees a stop command and then nothing more). And, again IMO, quite a lot of work for something I don’t need to know that accurately anyway. YMMV of course.

Yes. You can periodically “recalibrate” by listening for commands and running a timer for just over max run time. If a STOP is issued by rule or UI, cancel the timer. Otherwise if the timer expires, you know the shutter must at the end of travel, and reset your position estimate to 0/100% as appropriate.

Thanks for the rule.
Yeah probably would be a lot of work, and have to hide the remotes from the wife and kids :rofl:
Mine already returns 0 for up and 100 for down, just have to set the MY one.

Hi! I’ve been running my RFXtrx433XL on 433.92 MHz for quite a while now but now I’d like to control a few 433.42 MHz Somfy devices as well. Is this possible with just one RFXtrx433XL?

I tried to define a second bridge (using the same serialPort) and passing both bridges their respective setMode values, hoping that they “automagically” switch between the two transceivers when a command is to be sent using one of them. That didn’t really work out, presumably because setMode is being issued only once during bridge initialization and/or the serial port is being locked by the (first) bridge using it…?

Is there any way I can make this happen, i.e. switch between the transceivers (e.g. via setMode) dynamically somehow?

Thanks!

Hi Brevilo, welcome to the forum!

I don’t have an RFXtrx433XL myself, but what you want to do should be possible. I do think however, that you should be using only one bridge. The RFXtrx433XL will then automatically use the correct frequency depending on whether it needs to control a Somfy device or something else.

Are you able to control you Somfy devices using the RFXmngr program from RFXCOM? If not, then first make sure that you can control them using the RFXmngr before trying with openHAB.
Also, if you can control all your devices with the RFXmngr program then you don’t need to use the setMode option.

I did part of this a while ago and can’t remember the details. However you have to pair both somfy devices with the RFXtrx like decribed in the manual (i did this using the windows RFXmngr like Like marcel_erkel wrote). Use different ID/Unit Code. You will get different rfu codes for both.
I don’t remember what i did in openHAB then and removed the item file some time ago.<\grrr>

EDIT: grabbed out some more info here

.

Thanks guys, it does indeed work with a single bridge and without using setMode, nice! The two mistakes I made earlier were:

  • I missed to change the Rollershutter item’s channel type from command to shutter, so things didn’t work right away (despite everything working in RFXmngr).
  • Next I let RFXmngr trick me into thinking that the frequency/transceiver selection is mandatory, because of its frequency drop down menu that seemed to require some kind of confirmation before being effective. That’s when the idea for the second bridge and setMode was born…

Now (after fixing the channel type) it all works as expected! :beers:

One final related question: is there a way to have a state-bearing group item for a group of Rollershutter items in Basic UI? I’d like to control said group of shutters as a whole and it works just fine using HABPanel. Yet I can’t get that to work with a sitemap: Basic UI always just shows a normal group element, leading to a sub-view with the group’s individual items and without the (default) Rollershutter controls on the group itself.

Cheers

You’d want to put it on your sitemap using a widget other than Group.

Switch item=myRollerGroup

Hm, that’s not the needed UX as a switch is an ON/OFF state control. The Rollershutter default control (for a single shutter) provides UP, DOWN and STOP buttons (stateless) per shutter. The group should be controlled in the same way, like HABPanel does it.

If your group is of a type Rollershutter then put it on the sitemap with Default type:

Default item=myRollerGroup

It should render the rollershutter controls (up down and stop)

There is no Rollershutter widget.

There is a Switch widget. When you use a Switch widget with a Rollershutter type Item, you get UP-DOWN

I think this maybe something you should try out, rather than insist that it doesn’t work.

(The Default for a Group will never be UP-DOWN buttons, it’ll be Group pop-up style widget.)

I thought we were speaking about sitemap, not habpanel…sorry maybe I misunderstood

There is no Rollershutter widget.

Never said that. I was talking about the Default control/widget for Rollershutter items.

When you use a Switch widget with a Rollershutter type Item, you get UP-DOWN. I think this maybe something you should try out, rather than insist that it doesn’t work.

That is indeed correct, but all but intuitive. Anyway, this is the answer to my remaining question, so thanks a bunch for your patience :beers:

If your group is of a type Rollershutter then put it on the sitemap with Default type:
Default item=myRollerGroup
It should render the rollershutter controls (up down and stop)

This is what I had tried intuitively and what didn’t work out. Thus, if others are looking for a solution to that problem: use a switch for that shutter group (see previous post)…

I’m pleased that it actually works! To spell it out …
sitemap widget
Switch item=myGroup ...
is smart enough to recognise Item
Group:Rollershutter myGroup "blah" ...
as a Rollershutter “flavoured” Item, and so the widget performs the special UP-DOWN version of its button rendering.

Sure, understood. It’s pedantic but there is no actual Default widget, it’s just an instruction to look at the Item type and auto-choose the appropriate widget for it.
In the case of Rollershutter type Item, that’s Switch widget.
In the case of Group Item, that’s Group pop-up widget.