openhab / openhab1-addons

Add-ons for openHAB 1.x
Eclipse Public License 2.0
3.43k stars 1.7k forks source link

UPB binding request #2583

Closed bbrendon closed 7 years ago

bbrendon commented 9 years ago

Binding for a UPB PIM http://www.simply-automated.com/products/items/UMC-DB9-W_serial_interface.php

forum thread https://groups.google.com/forum/#!topic/openhab/ouEpEkmKBz4

teichsta commented 9 years ago

Would be great to find somebody volunteering to implement this … you?

rismoney commented 8 years ago

There is an implementation here in node https://github.com/DaAwesomeP/node-upb/ Not sure where to start as I am not a Java guy.

DaAwesomeP commented 8 years ago

I would be happy to assist. I'm interested too. I'm not a Java guy either, but the entire command generation is just basic logic. The checksum is the only tricky part. Then you just send it over serial.

DaAwesomeP commented 8 years ago

I have a CLI version that could be used, but that might be a slightly sloppy implementation.

DaAwesomeP commented 8 years ago

@teichsta I'm really interested in making this work. I'm sure that I can just model it off of another driver.

Here's how to protocol works (basically):

  1. Commands are sent and received via serial (either USB or DB9 cable) to the computer.
  2. Commands are hex with a checksum at the end. Commands can be sent multiple times and have a part that says 1 of 3, 2 of 3, etc.
  3. Every device in the UPB network has a network number and ID.
  4. Multiple devices linked together create a link that can be controlled all at once.
  5. Devices can be controlled to turn on/off/dim/blink/turn off in x minutes at different rates. Some devices can have multiple channels, but I am yet to come across this. It could just look like two switches.
  6. Links have a fewer set of commands available.
  7. The commands that deal with programming the switches are done by the free UPB software and shouldn't be needed for the scope of this.
  8. A device's status can be queried, but if the option is set in the UPB program, then they should broadcast their status whenever it changes.

When adding devices, there should be the following options:

Should I port my library over or just make a CLI binding? Does OpenHAB already handle serial devices?

DaAwesomeP commented 8 years ago

Anyone?

DaAwesomeP commented 8 years ago

I'd be happy to develop this, but I just need a little guidance in the right direction or at least verification that a pull for this will be accepted. Thanks!

rismoney commented 8 years ago

someone has opened this- https://github.com/openhab/openhab/pull/3883

bjhiltbrand commented 8 years ago

I don't know how many people have used homeseer in the past, but I use it with a UPB plugin (UPB Spud) that essentially takes the output from an UpStart Export and parses it to create an exact replica of the settings you have in UpStart. It's pretty slick and super easy to use. I would like to see something like that be implemented here. I don't know what I can do to help, but I'm willing to test on my network.

DaAwesomeP commented 8 years ago

The UPStart export is a CSV file and is very parsable. Simply Automated has a PDF on how it works, but it's old and probably won't include the newer products: http://www.simply-automated.com/documents/UPStartExportFileV_5_SA.pdf

bjhiltbrand commented 8 years ago

Thank you so much for that .pdf! I have been trying to find out how to read the .UPE file forever. I bet that even though it probably doesn't cover the newest devices, it will cover the vast majority. I can take a look at writing a .jar of sorts, but my work with java has really been in Selenium coding for automated testing of webapps. I'm not so sure I'm up to the task of interfacing with the PIM...

DaAwesomeP commented 8 years ago

@bjhiltbrand Someone has already done the communication part in #3883.

If you're still interested, I have a JavaScript/NodeJS library that you can look at for reference: DaAwesomeP/node-upb. There's also lots of useful stuff (including the command wizard and official PDFs) here: http://www.simply-automated.com/tech_specs/

bjhiltbrand commented 8 years ago

Sounds good. I will take a look. Looking at my newly exported .UPE file from UpStart and comparing it to the document from simply automated, I came across this line;

"When reading this record, the most important thing is the file version. Current versions of UPStart produce version 5 files."

My .UPE export indeed shows version 5, so I would venture to guess that the documentation provided by simply automated should still be relevant for the task at hand.

bjhiltbrand commented 8 years ago

I found this updated document regarding the UPStart Export file. UPStart Export File Description_V5_2.pdf

bracklanna commented 8 years ago

Anyone still alive / working on a UPB binding? I don't have time or skill to work on this personally at the moment, but I am an active user of UPB devices in my home and would greatly appreciate having a usable binding. The UPB spec & the RS232 / USB interface device interface command sets are well-documented. Let me know if I can be helpful w/ testing or debugging.

DaAwesomeP commented 8 years ago

@bracklanna I've been using the latest JAR from https://github.com/openhab/openhab/pull/3883#issuecomment-216430180 since it was uploaded. It's working flawlessly with my Simply Automated devices and RS232 PIM.

bbrendon commented 8 years ago

This is for discussion about software bugs and feature requests. Its not for debating the usefulness, maturity, whatever of a particular technology. Move your discussion to a proper forum.

DaAwesomeP commented 8 years ago

@bracklanna Start a thread on CocoonTech Forums or message me there same username.

DaAwesomeP commented 8 years ago

@bracklanna I don't like deleting posts no matter how off topic they are, but alright. Now @bbrendon's post looks out of place and mean.

9037568 commented 7 years ago

Closed via #3883