GCal Binding and other questions

Hi

I’ve installed OpenHAB at a school that requires their electric gates to open and close every day during term time, plus some evenings. (I need to handover setting the dates to someone at the school.)

1/ I notice the Gcal binding status is unclear. Does anyone have it working currently?

2/ Perhaps there’s a way of uing the OH interface to set term dates, and specified days where school must be open during evening (weekly)?

  • Or can someone suggest another implementation? It needs to be granny friendly, there are people here who don’t even like using online calendar let alone anything more complicated!

3/ Last weekend I set up OpenHAB on Windows with MQTT installed in one server cabinet, and an arduino and relay in a different cabinet. I’d like to make this more reliable. I’ve never run OpenHAB on a Pi before. Can I setup switches to directly control pins on the Pi? Are there any decent relay “shields” for the Pi?

Thanks!

Mat

As far as I know, it’s possible to use Gcal, though it’s not that easy to set up the connection at first time. See github:gcal-fix-openhab and google groups:openhab for detailed information. However, I don’t know if this is still working.

Another way would be to use the caldav binding, which is able to use google calendar but also other caldav calendar sources like owncloud.

I can’t speak to Gcal except to agree with @Udo_Hartmann and say it does look like Gcal has been deprecated in favor of the CalDav binding.

However, I can answer some of your other questions and have some comments.

If running anything on a Pi for long term, particularly when it is deployed to a remote site you don’t control, make sure to set it up so writes to the SD card are minimized or eliminated. While I think the concern of SD card corruption is overblown in most cases, you want this deployment to last for years untouched. From that perspective your current setup might be the more reliable approach. Search the forum and you will find much discussion about how and why to set up a Read Only Pi running OH.

That being said, there is indeed a GPIO binding through which you can set up switches that set a given pin to high or low. I haven’t used it (I wrote my own script because I didn’t want to have my OH server be in the garage) and some people have some problems using the GPIO binding for sensors but it should work fine for this. I do think there are relay hats (on a Pi they call them hats as opposed to shields for some reason) but you probably don’t really need one. You can wire directly to the relay for something like this.

I use this relay to control my garage door openers. Basically what I did was wire the 5v pin (provides the power the relay delivers), a ground pin, and one of the GPIO pins (this is what opens/closes the relay) to the Pi (you probably want to throw in some resistors to protect your Pi though I didn’t) and then wire up the relay to the two wires going to the opener’s push-button. So opening the relay looks to the garage door opener like someone pressed the button.

I can’t find the original tutorial I followed (this was my very first home automation project) but this one is very similar.