OpenGarage › Forums › Comments, Suggestions, Requests › Openhab
Tagged: openhab
- This topic has 28 replies, 4 voices, and was last updated 4 years, 7 months ago by Ray.
-
AuthorPosts
-
May 17, 2019 at 5:48 am #1631
OpengarageioParticipantI have just installed openhab and my aim is now to get opengarage talking to it. Im trying to follow the guides but I havent got my head around it yet. Other people have mentioned here that they have got it working by using http binding or MQQT binding.
So, Im after someone who can help walk me through the process of adding opengarage to a fresh install of openhab.
May 18, 2019 at 3:16 am #1633
psmedleyParticipantHi there, I have it working, will try put something together for you…. I’m using http binding (FYI)
June 4, 2019 at 7:15 pm #1666
OpengarageioParticipantGoing to offer $25AUD via paypal to anyone that can assist with instructions that help me get it working.
June 4, 2019 at 7:18 pm #1667
psmedleyParticipantI’ll try document what I’m using tonight… Sorry, I’ve had a busy few weeks!
June 5, 2019 at 3:46 am #1668
psmedleyParticipantOK, here goes….
items file:
Group Garage Switch Garage_Opener "Garage Door Opener" Contact Garage_Door_Status "Garage Door [%s]" (Garage) { http="<[opengarage:10000:JS(opengarage-door.js)]" } Number Garage_Door_Distance "Garage Door Distance [%.0f cm]" (Garage) { http="<[opengarage:10000:JS(opengarage-dist.js)]" }
OpenGarage.rules: note: IP will need to be edited to suit your OG
rule "A Garage Opener was triggered" when Item Garage_Opener received command then if (Garage_Opener.state == ON) { logInfo("OpenGarage", "Opening door, sendHttpPostRequest() returns: " + sendHttpPostRequest("http://192.168.1.19/cc?dkey=opendoor&open=1",5000)) } if (Garage_Opener.state == OFF) { logInfo("OpenGarage", "Closing door, sendHttpPostRequest() returns: " + sendHttpPostRequest("http://192.168.1.19/cc?dkey=opendoor&close=1",5000)) } end
services/http.conf:
http:opengarage.url=http://192.168.1.19/jc http:opengarage.updateInterval=11000
sitemap:
Switch item=Garage_Opener icon="garagedoorclosed" mappings=[ON=Open] visibility=[Garage_Door_Status == CLOSED] Switch item=Garage_Opener icon="garagedooropen" mappings=[OFF=Close] visibility=[Garage_Door_Status == OPEN] Text item=Garage_Door_Status icon="garage" Text item=Garage_Door_Distance label="OG distance"
Let me know how you go with this!
July 17, 2019 at 4:48 am #1771
psmedleyParticipantFWIW – I think I’m going to try and create a proper openhab binding for the OpenGarage, no idea how long this will take me, but it shouldn’t be too hard 🙂
July 27, 2019 at 4:54 am #1806
psmedleyParticipantHi All,
I’m currently working on a binding for the OpenGarage (https://opensprinkler.com/product/opengarage/) controller.
An initial build is at: http://smedley.id.au/tmp/org.openhab.binding.opengarage-2.5.0-SNAPSHOT.jar
Source is currently at https://github.com/psmedley/openhab2-addons/tree/opengarage
Feedback appreciated.
Cheers,
Paul
August 1, 2019 at 5:06 am #1812
sonyxperiageekParticipantHi @psmedley, I have added your jar file to the addons folder of my openHab installation. What are the next steps to get this going please? Thanks!
- This reply was modified 5 years, 4 months ago by sonyxperiageek.
August 1, 2019 at 5:21 am #1814
psmedleyParticipantHi,
Thanks for trying to test! Does the binding appear in the list of bindings in Openhab? There might be some missing dependencies 🙁 Can you check openhab.log and look for an entry around opengarage?
IIRC (from when I was trying to get this working) I had to install a newer version of gson (this is as the binding is built against the openhab 2.5 code).
From karaf:
bundle:install http://central.maven.org/maven2/com/google/code/gson/gson/2.8.5/gson-2.8.5.jarOr download the gson jar and drop it in the addons folder.
Hopefully that will get the binding to show up. Then it should be as easy as adding a Thing (manually specifying the IP) as Autodiscover doesn’t work yet
Cheers,
Paul
August 1, 2019 at 7:36 am #1815
sonyxperiageekParticipantFound the issue. Yep it’s what you just described!
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.opengarage [217]
Unresolved requirement: Import-Package: com.google.gson; version=”[2.8.0,3.0.0)”Will installing that version of gson mess anything else up in OpenHab I wonder?
Thanks.
August 1, 2019 at 3:28 pm #1817
psmedleyParticipantIt hasn’t messed anything up here:)
Meanwhile, I’ll see if I can work out how to build the binding targetting openhab 2.4 to avoid having to install extra dependencies.
August 1, 2019 at 8:21 pm #1821
sonyxperiageekParticipantWell that was easy! 🙂
Dropped the gson jar into the add-ons folder, and OpenGarage binding is there now. Set up OpenGarage settings and now I have a switch for my garage door as well as distance measurement on my sitemap! Thanks @psmedley for building this binding!
Now I just need to see where I can get a longer piece of the white control wire as I want to mount my OpenGarage device closer to the beginning of the actual garage door for better accuracy.
August 1, 2019 at 10:20 pm #1822
psmedleyParticipantHi @sonyxperiageek,
Thanks for testing! Do you have any need for the vehicle detection or temperature sensor output from the Opengarage? I haven’t added these to the binding yet, but it should be pretty trivial to do so. I’m already reading the values from the json output, I just need to add more channels to the binding.
I also need to write some code to support auto-detection, but adding the IP isn’t too bad for now.
I also want to get the code included in the Openhab base code, to make installation easier.
Cheers,
Paul.
August 1, 2019 at 11:01 pm #1823
sonyxperiageekParticipantNo problem @psmedley
Yeah it would be great to add your binding to the Openhab releases. Have you tried creating one of these threads on the OpenHab Community Forums? You may get more people there who could test too if they also have an OG.
In terms of adding vehicle detector or temperature sensor channels, why not! 🙂 I could set up some rules in OpenHab based on the distance sensor readings, but if it’s in the channel, would make it easier for others if they want it I guess. Re temperature sensor, is that the device temperature? That won’t be as important to add a channel, but as a “geek” I’d include it.
Cheers.
August 1, 2019 at 11:02 pm #1824
sonyxperiageekParticipantBy the way, did you ever receive AUD25 from @opengarageio ? 😀
August 1, 2019 at 11:07 pm #1825
psmedleyParticipantHi again,
See: https://community.openhab.org/t/new-binding-opengarage-controller/78750 for the openhab forums post.
I’ll try and add channels for vehicle detection over the weekend – I don’t use this as we have a 2-car garage with a single door, so I have the opengarage centrally mounted. I guess I could move it over above one of the cars for testing purposes.
For the temperature readings – this is only supported if there is an external temperature probe connected to the controller. Perhaps I’ll order one just for testing reasons.
Cheers,
Paul
August 1, 2019 at 11:54 pm #1827
sonyxperiageekParticipantThanks Paul! Yeah, temperature readings not a massive biggie for me. Main thing is the distance sensor, vehicle detection and that it can open/close garage. 🙂
August 2, 2019 at 5:40 am #1828
psmedleyParticipantHi again – can you try http://smedley.id.au/tmp/org.openhab.binding.opengarage-2.5.0-SNAPSHOT.jar
Pretty sure you’ll need to delete your Opengarage ‘thing’ and re-add it to show the new Item.
It will report:
“No vehicle detected”
“Vehicle detected”
“Vehicle Status Unknown”Depending on the value from the controller.
Cheers,
Paul.
August 2, 2019 at 6:05 am #1829
sonyxperiageekParticipantOverwrote the previous JAR and added new item in and voila! “Vehicle detected” is showing on my sitemap! It’s late night here in NZ now so will move the car tomorrow to see if vehicle status changes.
So far so good!
August 2, 2019 at 6:07 am #1830
sonyxperiageekParticipantJust thinking out loud here, would it be possible to maybe show the “Last time garage door opened” and “Last time garage door closed”?
August 3, 2019 at 5:07 pm #1831
psmedleyParticipantHi, something like this would definitely be possible. Are you thinking two separate channels/items, or one with the latest action (opened or closed)?
August 4, 2019 at 6:42 am #1832
sonyxperiageekParticipantI think one channel with the latest action (open/closed at [date time]) is sufficient, unless you may be thinking of something else too?
- This reply was modified 5 years, 4 months ago by sonyxperiageek.
August 31, 2019 at 5:10 pm #1870
psmedleyParticipantFYI – code is now in the Openhab 2.5 repository, and should be included in Milestone 3 when it’s released. Meanwhile, a snapshot build can be downloaded from https://openhab.jfrog.io/openhab/online-repo-snapshot/2.5/org/openhab/addons/bundles/org.openhab.binding.opengarage/2.5.0-SNAPSHOT/org.openhab.binding.opengarage-2.5.0-SNAPSHOT.jar
September 7, 2019 at 5:36 pm #1876
psmedleyParticipantNote: Openhab 2.5 Milestone 3 is out and includes:
[opengarage] opengarage initial contribution by Paul Smedley (#5911) (detail / githubweb)April 26, 2020 at 6:57 am #2239
psmedleyParticipantHi All,
I added a ‘Contact’ and ‘RollerShutter’ item for help with google assistance and rules.
PR for the change is at https://github.com/openhab/openhab-addons/pull/7480
Testing jar is at http://smedley.id.au/tmp/org.openhab.binding.opengarage-2.5.5-SNAPSHOT.jar
Cheers,
Paul
-
AuthorPosts
- You must be logged in to reply to this topic.
OpenGarage › Forums › Comments, Suggestions, Requests › Openhab