QuailAutomation / openhab2-addons

The next-generation open Home Automation Bus (openHAB)
Eclipse Public License 2.0
8 stars 7 forks source link

Added UPB Link events to bridge.xml #151

Closed boc-tothefuture closed 4 years ago

boc-tothefuture commented 4 years ago

The UPB Link events were already defined and the code written for them, but they were not exposed by the bridge.

boc-tothefuture commented 4 years ago

@craigham this seems to build for me? So not sure why its failing in the CI..

ecdye commented 4 years ago

Could you also fix the Trigger events for updating state while you are at it? They should be switches if I am correct.

boc-tothefuture commented 4 years ago

@ecdye - which state?

ecdye commented 4 years ago

The omnilink:upb:home:Light:upb_status one as looking at the code it appears that it is meant to be triggered as a button not a stateless trigger channel.

boc-tothefuture commented 4 years ago

@ecdye It should probably be a stateless trigger channel and the code should be updated to match. I will take a look at it.

ecdye commented 4 years ago

Also, how exactly are you supposed to interface with these channels?

boc-tothefuture commented 4 years ago

Looks like it shouldn't be a trigger, but rather a "command option".

I haven't found a good example of that yet.

ecdye commented 4 years ago

I have made my repo public and invited you to collaborate on it @boc-tothefuture I intend to continue slowly getting this ready for inclusion in openHAB proper and as such have converted it to a standalone addon while I do. I already included this as a part of it. Feel free to contribute towards making it better and compatible with openHAB proper.

boc-tothefuture commented 4 years ago

Hey @ecdye why would you fork instead of working on it here? Has @craigham stated he doesn't want to manage this anymore? He is going to have to sign off on any contribution since he wrote a large part of the code. The #1 thing holding back a contribution is writing of the documentation.

ecdye commented 4 years ago

See #150

craigham commented 4 years ago

@boc-tothefuture sorry, have not been avail lately. I will see if I can figure out what is wrong with the CI. I don't maintain an openhab dev environment currently, but I'll see if I can whip something together. If I can't get that to work I might get you to send me the jar build. I will not be able to get to this though until early next week.

ecdye commented 4 years ago

Looks like it shouldn't be a trigger, but rather a "command option".

I haven't found a good example of that yet.

I fixed the ability to request status, see https://github.com/ecdye/org.openhab.binding.omnilink/commit/1917f6bfe2b1b4abfab96fb61a23d941699d113c

craigham commented 4 years ago

@ecdye I think it would probably be easier if as @boc-tothefuture mentioned you submitted pull requests instead of a new fork. I am in the process of getting my build environment set up so should be able to quickly approve any changes. However, if you feel strongly about taking over the binding let me know and we can figure that out. Submitting pull requests should allow you to make any changes necessary to see this binding through to acceptance into the main repo.

craigham commented 4 years ago

I think CI may have gotten out of date. I might take a look at integrating in with GitHub actions now that those have been added.

craigham commented 4 years ago

if anyone would like to test you will have to clone and build. I will try and get uploading to my aws working again, or host the binary on github

ecdye commented 4 years ago

@craigham There were several reasons I made my own fork, one of the primary reasons being able to more closely base the repo off of the current openHAB build system and reduce clutter so I only had the one addon in the repo not all of the others to track for current updates. I almost wonder if it would be easier to transfer my fork to your control and use PR's there to allow for better reviewing and contributing. Another reason I made my own fork is because at the time it did not seem like you were going to be around often enough to merge PR's.

Let me know what you think is best.

By the way, I was able to implement a GitHub actions for my fork if you want to use that as an example.

ecdye commented 4 years ago

Also I can confirm that this PR does work as I have been using its contents in my personal setup for the past week and it does trigger when links are activated.

craigham commented 4 years ago

@ecdye I freely admit I have drifted on to other interests as I personally find the omnilink binding works great for my needs and I really don't feel I have much more to add. However, I do feel some responsibility towards it as well. There has been a lot of contributions from @boc-tothefuture and Dan in the past, and I do not want switching the repository to make it any harder for them or other past contributors to continue. It's a great binding, we just haven't taken on the final push for acceptance.

How difficult would it be for you to contribute your changes via PR, and if we find that I am not responsive enough we can revisit you forking the code? Really any work you would do would be limited to the omnilink-binding branch within my repo. I fear getting acceptance of the binding is going to be a significant amount of work to adhere to the guidelines/specs, etc and we have to maintain as much continuity as possible until it gains acceptance.

Let me know what you think.

Craig

craigham commented 4 years ago

@ecdye I would really appreciate your GitHub actions example. Could you provide me a link? I have more recently been working in python so would welcome the java example.

cheers, Craig

ecdye commented 4 years ago

So why don't you take a look at the setup of my fork and see what I mean about updated build system and think about it as I am willing to transfer it to you so you have more direct control. The main repo is https://github.com/ecdye/org.openhab.binding.omnilink with the GitHub Actions example being located at https://github.com/ecdye/org.openhab.binding.omnilink/blob/master/.github/workflows/build-action.yml

craigham commented 4 years ago

@ecdye I now have build actions set up for the omnilink branch, and it will deploy to my s3 folder for the marketplace binding to pick up. Do you think we could now try and get your changes so far committed and see how that goes? Do I need to sync up to more recent versions of openhab for this? I believe the binding currently is assuming the 2.5.0 apis.

let me know what you think, and any improvements you can suggest would be appreciated. Really want to not get in your way if you can help get this binding accepted into main.

thanks, Craig

ecdye commented 4 years ago

I agree, You probably would need to sync your repo with upstream as I have been basing my changes off of the 2.5.7 snapshot. Over the next week I'll work on creating a PR with the changes.