Use of RollerShutter or contact on anel HUT

I get a message back that I was able to find in the source code:

only Switch/String/NumberItems are allowed - please check your *.items configuration

Install your house as if you didn’t want to use zwave or other radio.
For each rollershutter, pull cables to a central location where you plan to put the Pi/anel hut
Then you can still choose to either connect them to your hut relays or to a zwave actuator instead.
It would just need to have radio connectivity to the zwave controller inside the Pi.As both are located in the same cabinet, that should work for sure, no matter how thick your walls are.

1 Like

thanks that is clear and for sure a good solution.
(and a good test for zwave)
Si the obvious next question then is, what zwave rolershutter did you use?

I see. So the binding seems to check which item type you actually configured. Now that is pretty uncommon.
There’s likely a reason for that, but only the authors (Kai and Thomas) will be able to tell you.

Meanwhile, you could just use the working “switch” config in items and use a sitemap entry to override the display.

1 Like

Fibaro FGRM-222

1 Like

and just to be sure I don’t make false assumptions:

the Fibaro FGRM-222 is connected with wires to button’s that are next to the roller shutter and cables that go back to the engine of the roller shutter itself.

And when I press the buttons, they send a message to the FGRM-222 , the Z-wave’s to it’s controller, that goes to openhab that sends something back and that goes to the engine?

Or are the buttons taking directly to the roller shutter engine and at the same time to FGRM-222
(and from openhab I can also zwave to the FGRM-222 that talks to the engine…)

It’s the safe way, but for sure it’s the most expensive one. Starting with zwave right away would save you from having to install cables along all the walls.
I’d suggest having one, maybe two cabinets per floor level and run the wires there, plus have a big (but empty) pipe from there to your central cabinet

true, yet we do need cables for the electricity, in a new house adding some extra cables is not that more expensive .

  • Anel hut has 8 relays and 8 IO for 159 euro. That is a lot cheaper then separate Zwave devices for everything. I could indeed add one hut to every room and just connect a network cable to the server “room”, that would be cheaper cable wise, yet it feels strange to have such a device in every room with all the cables to it…

Correct
The FGRM has a) 3 outputs (up, down, 0) to connect to the roller shutter engine and b) 2 inputs to connect a pushbutton or turn knob to.

The latter assumption is correct. Pushing the button will directly operate the roller shutter, albeit it will send an info to the controller as well. And of course you can control the roller shutter from OH, i.e. independent of the pushbutton.

1 Like

thanks. Will order a FGRM-222 so I can test this setup.

Well that’s something you have to decide for yourself.

If you want to go down the DIY path, a Pi is 40€, and there’s even cheaper devices (just read about a chinese nanoPi for $8), and you can get a 16-relay bank off eBay for another 10€ to use instead of your anel hut.

But then you’ll have to do the electrics and programming yourself, including calibration, and you need to operate one or more linux devices.

I for myself decided that it’s not worth it and bought a number of FGRM, and I’ve not regretted doing so.
(admitted my situation is different, I built them into my existing house, and I also have venetian blinds where they can control lamella tilt).

true. and just like you I don’t want to go all the way with DIY. for that I don’t know enough and it’s not worth the hassle. that said,
A big part of learning all this is because I am a coderdojo coach and I want to use these as examples for the children and I want to inspire them to realize what they can do themselves.

And yes for that I will use some arduino’s and some led configuration.

Here’s even a photo of how my cabinet looks like and how your central one would look like, too. Some actuators are FGRM-222, some are for the lights. The box is you see in the cabinet is another Pi. It’s not the Pi with the zwave controller running OH, that one’s located in a different room even on a different floor. But I could connect the relay bank and the roller shutters to it, too, if I wanted to.

By the way, I don’t have any pushbuttons for my roller shutters.
As you’re still in planning phase, spend some time on rethinking your user concept for roller shutters, light switches etc.
Personal preferences vary, but for us, for the rollershutter buttons, it turned out you don’t really need them because you can have OH operate them based on time of day or other trigger (such as if I turn on my TV).
Same as with the wiring, though. If you omit it, you need to be prepared your wife will tell you she wants them back just after you’ve finished decorating the walls :slight_smile:

Wow, this thread grew quite fast! I use the Anel HUT to control my roller shutters and also to detect open windows via reed contacts. I’ll try to find some time later today or tomorrow to post my configuration.

1 Like

great. Looking forward to it.
I just received one FGRM-222 and from the documentation with it, it looks like the connection isn’t really that different from what I think that an openhut connection would be.

would love to compare (before I decide how many HUT’s I need for our home)

so that’s a question then for @Kai or @paphko or @teichsta
(seems like you three touched the code where that is happening…

First of all, my decision to use switch item type for IO is exactly as @mstormi said: it may be used for in and out signals. However, if configured as input, it should also be possible to allow contact item type. Feel free to implement that :slight_smile:
Concerning functionality, the contact item type is a subset of the switch item type, so you won’t gain features, your items would just be a bit more convenient.

One more thing regarding IO: if configured as input, the switch is inverted. I.e. if the physical contact is closed, the switch item is OFF. The reason is that the HUT has a pull-up resistor, not a pull-down resistor. (I hope I did not mix up the states, but it should be fairly easy to test this…)

If you still want a contact item type, add a (virtual) contact item without any binding and a rule that reacts on the switch change. Inside the rule, set the contact item depending I the switch item state. This way, you can also handle the inverted switch item state. Then use the contact item e.g. in your sitemaps.

Using the simple HUT relays for roller shutters is a bit more complicated because you have to add all the logic. I did it as follows, but there is still room for improvements.

  • for each roller shutter, I have two relays and two physical pushdown buttons, one for up and one for down, respectively.
  • I measured the total runtime X seconds for each roller shutter and in the HUT configuration, the relays are automatically switched off after X + 3 seconds (‘impuls’ setting, IIRC), so that there is no more power on the motor after it had completely moved up/down.
  • in openhab, I had to ensure that both relays (for up and for down) are never enabled at the same time.

My items:
// actual relay items
Switch R_Rollo_Wohnen_up { anel=“anel1:F1”, autoupdate=“false” }
Switch R_Rollo_Wohnen_down { anel=“anel1:F2”, autoupdate=“false” }
Switch S_Rollo_Wohnen_up { anel=“anel1:IO1” }
Switch S_Rollo_Wohnen_down { anel=“anel1:IO2” }
// virtual item representing the roller shutter
Rollershutter R_Wohnen “Wohnzimmer” (gRollo)

Rules:
/*

  • This set of rules controls the rollershutters.
  • Please note that a timer is not needed in this rule because it is already set directly in the relays.
  • E.g. for a long-running rollershutter: Impuls (an) für Zeit: 28s
    */
    val org.eclipse.xtext.xbase.lib.Functions$Function2 rolloLogic = [
    org.openhab.core.library.items.SwitchItem relayItem,
    org.openhab.core.library.items.SwitchItem relayItemOpposite |
    // if current state is off
    if (relayItem.state != ON) {
    // if opposite state is also off
    if (relayItemOpposite.state != ON) {
    // switch it on!
    relayItem.sendCommand(ON)
    } else { // opposite is on
    // switch opposite off!
    relayItemOpposite.sendCommand(OFF)
    }
    } else { // relay is on, so switch it off
    // switch off!
    relayItem.sendCommand(OFF)
    }
    ]

rule "rollo Wohnen up"
when Item S_Rollo_Wohnen_up changed to OFF or Item R_Wohnen received command UP then
rolloLogic.apply(R_Rollo_Wohnen_up, R_Rollo_Wohnen_down)
end
rule "rollo Wohnen down"
when Item S_Rollo_Wohnen_down changed to OFF or Item R_Wohnen received command DOWN then
rolloLogic.apply(R_Rollo_Wohnen_down, R_Rollo_Wohnen_up)
end
rule "rollo wohnen stopp"
when Item R_Wohnen received command STOP then
R_Rollo_Wohnen_down.sendCommand(OFF)
try { Thread::sleep(100) } catch (InterruptedException e) { } // if commands are sent too fast, only one may be executed by anel device
R_Rollo_Wohnen_up.sendCommand(OFF)
end

Sitemap:
// group contains all roller shutters
Group item=gRollo

There is one feature that I did not yet implement: the actual state (e.g. in percent) of the roller shutter. This would require a timer that measures how long the up and down relays are on/off so that the state can be calculated from the total runtime and the recent state.

At least my configuration works well using physical switches as well as any openhab client. I thought adding logic to update the state in percent would be helpful but in practice, I don’t miss that feature: either I see it because I’m in that room or I simply move them up / down completely.

One more note: if openhab is not running, then it is not possible to control the roller shutters. Most of my lights, on the other hand, are directly controlled by the HUT and do not rely on openhab - still I can use openhab to also switch the lights and to check their states.

I hope this example helps to understand how roller shutters can be controlled with simple relays e.g. provided by the Anel devices.

1 Like

I have not been writing any serious production code in more then 10 years.
And the only java I did was during 2 weeks of holiday one hour every day with my 12 year old son, so I don’t think it’s a good idea if I would do that…

yes. thank you very much.

Still a few questions:

With this I assume you can’t use Rollershutter item and buttons on in openhab, so you would only have an up and a down button. Correct?

At first I assume that when you clicked the button, the screen went all the way up (or down depending on the button)

Yet, how do you then end up with a screen halfway (I assume this is a feature you have based on the remark
"either I see it because I’m in that room"

So how does that work ?