Tagged: 

Viewing 25 posts - 1 through 25 (of 29 total)
  • Author
    Posts
  • #1631

    Opengarageio
    Participant

    I 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.

    #1633

    psmedley
    Participant

    Hi there, I have it working, will try put something together for you…. I’m using http binding (FYI)

    #1666

    Opengarageio
    Participant

    Going to offer $25AUD via paypal to anyone that can assist with instructions that help me get it working.

    #1667

    psmedley
    Participant

    I’ll try document what I’m using tonight… Sorry, I’ve had a busy few weeks!

    #1668

    psmedley
    Participant

    OK, 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!

    #1771

    psmedley
    Participant

    FWIW – 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 🙂

    #1806

    psmedley
    Participant

    Hi 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

    #1812

    sonyxperiageek
    Participant

    Hi @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!

    #1814

    psmedley
    Participant

    Hi,

    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.jar

    Or 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

    #1815

    sonyxperiageek
    Participant

    Found 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.

    #1817

    psmedley
    Participant

    It 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.

    #1821

    sonyxperiageek
    Participant

    Well 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.

    #1822

    psmedley
    Participant

    Hi @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.

    #1823

    sonyxperiageek
    Participant

    No 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.

    #1824

    sonyxperiageek
    Participant

    By the way, did you ever receive AUD25 from @opengarageio ? 😀

    #1825

    psmedley
    Participant

    Hi 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

    #1827

    sonyxperiageek
    Participant

    Thanks 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. 🙂

    #1828

    psmedley
    Participant

    Hi 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.

    #1829

    sonyxperiageek
    Participant

    Overwrote 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!

    #1830

    sonyxperiageek
    Participant

    Just thinking out loud here, would it be possible to maybe show the “Last time garage door opened” and “Last time garage door closed”?

    #1831

    psmedley
    Participant

    Hi, something like this would definitely be possible. Are you thinking two separate channels/items, or one with the latest action (opened or closed)?

    #1832

    sonyxperiageek
    Participant

    I think one channel with the latest action (open/closed at [date time]) is sufficient, unless you may be thinking of something else too?

    #1870

    psmedley
    Participant

    FYI – 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

    #1876

    psmedley
    Participant

    Note: Openhab 2.5 Milestone 3 is out and includes:
    [opengarage] opengarage initial contribution by Paul Smedley (#5911) (detail / githubweb)

    #2239

    psmedley
    Participant

    Hi 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

Viewing 25 posts - 1 through 25 (of 29 total)
  • You must be logged in to reply to this topic.