UPB binding?

I am looking for a platform to integrate a variety of devices and Openhab looks awesome so far. I have a quite a bit of UPB switches installed in my home and can’t find a UPB binding. There seems to be some reference to in on the wiki but I can’t find the actual binding? Does it exist? If not is there some tutorial like content on creating a custom binding?

Any assistance would be greatly appreciated.

Greg

Hi Greg,

Did you ever find the addon for UPB? I have the same issue.

Thanks.

No, I gave up and became a Clare Controls dealer. Their UPB support is minimal as they talk directly to devices but no link support. I think OpenHAB is a GREAT diy platform but not ready for client deployment.

Cheers,

Thanks for the reply. I found this https://github.com/openhab/openhab/wiki/UPB-Binding but I have not idea how to get the binding. Its not in addons, etc.

Tap-tap – is anyone working on this? I saw the wiki entry for the UPB binding but as gmoneyman said above, I also cannot find the actual binding code.

Would love to have this working, will be a great improvement to my at-present only semi-smart UPB switches.

If anyone is following this thread, I am actively pursuing this issue now, hopefully the UPB Binding will be added to the official list of bindings soon.

@globramma, have you made any progress on the UPB binding? I’ve been at it for days with no meaningful progress. I’m using the binding that appears in paper UI (which says it’s version 1.9.0, which may mean it’s a openHAB 1 binding???). In any case, I’ve tried just about everything, but I can’t even seem to get the UPB items to appear as a control (if I create a sitemap with any UPB items in it, they simply don’t appear; while Z-Wave items work as expected). I don’t see any logging information about UPB (other than “UPB binding staring up”). I’d appreciate any guidance you might offer, and I’d be happy to help you test UPB functionality (unfortunately, I’m not a Java programmer, so I wouldn’t be much use on that front).

No, no progress regarding the earlier contents of this thread.

However, I am using UPB binding 1.9.0 under OpenHab 1.8.3 for months now and it has been 100% reliable.

I can’t speak to OH 2.x as I haven’t tried it and don’t plan to for the forseeable future. (If it’s not broken there’s no need to fix it.)

@globramma Thanks for the quick reply! I’m just beating my head against the wall here. I think I may try a 1.8.3 install and see if I have better luck there. I would greatly appreciate it if you have any tips or could share a few examples of your config files to point me in the right direction.

My setup is:
Ubuntu 16.04.4 LTS running on an old Mac Mini Core Solo 1.5Ghz, 1GB RAM.
OpenHAB 1.8.3

For hardware I am using a SiG 4-port USB → RS232 adapter. (Model JU-SCO111-S1).
The actual UPB → 120V power interface is a SimplyAutomated RS232 → 120V PIM (Pulse Interface Module,) model UMC-DB9-W). (Note, there is a direct USB → 120V PIM module also available but last I read (6 months ago or more,) the USB version is buggy under any OS so it’s better to use RS232.)

The relevant portion of my openhab.cfg file is:

############################## UPB Binding (added 2016-11-08 by John Doe.) #########################

upb:port=/dev/ttyUSB0
upb:network=97
# note, the "0" padding is ignored in the network= field above. (i.e. it may be written as 097 or 97 without any effect    
on functionality.

Here is a large part of my upb.items config file. Note that the “id=” numbers must correspond to the actual real UPB device or scene IDs as defined in the physical UPB setup:

/*Group gPanel "UPB network" (All)  */


/* UPB DEVICES PER ROOM (Specific Devices) */
/* Dining Room */
Dimmer Light_Living_Room_Table_Lamp        	"Living Room Table Lamp"           (Lights) {upb="id=1"}
Dimmer Light_Dining_Overhead       	"Dining Room Overhead"           (Lights) {upb="id=6"}


/* Kitchen */
Dimmer Light_Kitchen_Overhead      "Kitchen Overhead"               		(Lights) {upb="id=9"}
Dimmer Light_Kitchen_Table         "Kitchen Table Overhead"             	(Lights) {upb="id=14"}
Dimmer Light_Kitchen_Counter       "Kitchen Countertops"               		(Lights) {upb="id=10"}

/* Foyer and Livingroom */
Dimmer Light_Foyer_Overhead        "Foyer Overhead"          				(Lights) {upb="id=5"}
Dimmer Light_Living_Overhead       "Living Room Overhead"          		  	(Lights) {upb="id=4"}

/* Bedrooms */
Dimmer Light_FrontBed_Overhead     "Front Bedroom Overhead"          		(Lights) {upb="id=7"}
Dimmer Light_MiddleBed_Overhead    "Middle Bedroom Overhead"         	  	(Lights) {upb="id=3"}
Dimmer Light_BackBed_Overhead      "Back Bedroom Overhead"        		  	(Lights) {upb="id=8"}

/* Bathroom */
Dimmer Light_Bathroom_Overhead      "Bathroom Overhead Light"        		  	(Lights) {upb="id=2"}
  	// Bathroom Heater is a SCENE link with a 120-minute hard timer cut-off programmed in via UPB (UPStart software)
  	// 120-min hard cut-off serves as a safety shut-off in case HA server goes off-line while heating is active
Switch Bathroom_Heater				"Bathroom Heater"							{upb="id=39 link=true"}
	// Bathroom Vent is a SCENE link with NO hard timer cut-off set.
Switch Bathroom_Vent				"Bathroom Vent"								{upb="id=40 link=true"}

Other points:

You may have difficulty even accessing a standard serial port (ttyS0 etc. etc.) directly, due to lack of permissions at the operating system level. Follow this thread to get an idea how to tell the Linux OS to allow OpenHAB to access the serial ports:

If you are using multiple serial ports, see this link about how to configure virtual serial port identifiers. Otherwise, every time you plug/unplug a USB device (or sometimes when restarting,) your multiple devices may tend to get randomly re-assigned to different /dev/ttyS locations, causing havoc for your higher level applications (e.g. OpenHAB + bindings,) because they can no longer find the serial port at the location they expect to find it:

I myself DO use symlinks because I have multiple USB serial interfaces: One for UPB, another for AlarmDecoder, another for DMX, etc.

Here is my /etc/default/openhab file – note that this is only the correct file to edit IF you installed OpenHAB using the apt-get method! (Sorry, this is all a bit complicated with multiple layers of if/then conditionals…)

The JAVA_ARGS line is the one to note here, see how it passes the names of the sym-linked /dev/ entries discussed earlier in this post. I.e. there are no “real” devices called “/dev/usb_zwave,” /dev/usb_upb," etc. Those names are symbolic links I created elsewhere, to make my referencing those devices easier than keeping track of /dev/ttyS0, /dev/ttyS1, etc.

# Execution account and group. The user account should be member of group
# "openhab" if it's different than "root" and "openhab".
# Note that some bindings may require "root" access to the system.
# Default value if isn't specified - "root:root".
USER_AND_GROUP=openhab:openhab

# Web server's listening ports (plain and SSL). Note that if execution account
# is different than "root" the port numbers should be greater than 1024.
# Default value if isn't specified - none, must be specified.
HTTP_PORT=8080
HTTPS_PORT=8443

# Console's listening port, same restriction as this for web server's ports.
# Default value if isn't specified - none, must be specified.
TELNET_PORT=5555

# Extra arguments passed to Java
JAVA_ARGS=-Dgnu.io.rxtx.SerialPorts=/dev/usb_dsmr:/dev/usb_zwave:/dev/usb_alarmdecoder:/dev/usb_upb

# Extra arguments passed to openHAB
OPENHAB_ARGS=

# Use non-default Java VM.
# Default value if isn't specified - system default Java VM.
#OPENHAB_JAVA=/usr/bin/java

# To enable debugging set to "yes" (case insensitive).
# Default value if isn't specified - debugging is disabled. 
DEBUG=yes 

I am busy today & will be travelling soon, probably not able to respond until at least Friday or Saturday of this week. Good luck.

@globramma Thank you for all that detail. I very much appreciate it. Have a good trip!