Tagged: 

This topic contains 23 replies, has 3 voices, and was last updated by  psmedley 1 month, 1 week ago.

Viewing 15 posts - 1 through 15 (of 24 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 ? 😀

Viewing 15 posts - 1 through 15 (of 24 total)

You must be logged in to reply to this topic.