Ubi Connect

I was able to uninstall and reinstall. Make sure that you have both my device type and and smartapp and that the “namesapce” for both is the same. I have a feeling it is not able to find the device type once you select your devices.

Ok. I recreated the app and the device type with no modifications. I then created my 3 devices using your device type. Device ID was required so I went back to the Ubi site and used 4 digit room ID code for each unit. For the name I used the name I gave the exact name of each Ubi. The display name I used different than the display name.

  • Ubi1 Device One-U
    Name Ubi1
    Label One-U
    Type Ubi
    Version Published
    Device Network Id 0000
    Status INACTIVE
    Hub Hub 001
    Last Activity At 2014-11-20 3:13 PM UTC
    Date Created 2014-11-20 3:00 PM UTC
    Last Updated 2014-11-20 3:18 PM UTC
    Data No data found for device
    Current States No states found
    Events List Events
    In Use By SmartAppA

I then when to the iOS app to check out the devices under Things. Once I looked they all had the blue triangle symbol with the white explanation point and the data tiles were blank. I went to the preference section and basically verified selected name of each unit. I got an error each time I said I was done. I also got the error when refreshing the page. I went back and changed the Device Id to the order of appears on the Ubi site so the units became 1,2 and 3. Same error.

I then went back to the device type code and ran the simulator. I selected the first Ubi and installed it. I then saw the following error in the logs:

  • 10:28:23 AM:error java.lang.NullPointerException: Cannot invoke
    method pollChild() on null object @ line 93

  • 10:28:23 AM:debug
    Executing ‘poll’ using parent SmartApp for 1

I will assume this is the same error I get when trying to view the device data on the iOS error is the same one I see in the simulator.

You don’t create the devices. Just add the device type to your device types. Once you go through the process of signing into ubi and selecting your ubis it will create the devices for you. You need to remove the three you created.

Just create a new device type from code using the device type code on my github. After that when you go through the smart app it will create any devices for you.

I did that before and it did not work. That is why I thought I had to create the devices.

This time though time it worked.

I am trying to follow these instructions, and smartthings is making me feel pretty stupid. I have downloaded (cut and paste) the app and the device type from the github link into my IDE. I have published the device type and the app. I have gotten Ubi API access and created a client id and client secret, which I put in the app settings, along with a stclient id that I generated from the oauth portion of the app. When I run the app, I set the location, then there is a box with instructions to “Tap below to log into the ubi service and authorize ST access…” When I press the ubi or the arrow to expand the box, the processing icon spins…

I followed the instructions and all sensors show up!But in Greece/Europe we use Celsius for temperature.
What can I change in the device type to show Celsius?

I will have to update the device type to add a preference. It will take some time.

If you want a fix now you can make two changes in the device type.

Line 37 should be

state("temperature", label: '${currentValue}° ${unit}', unit:"C", backgroundColors: [

Line 116 should be

return temp

Thanks it worked.(I should have seen it by myself,it made the calculation from C to F)

But anyway thank you!

@jody.albritton - two questions:

  1. Have you added support for the Celsius temperature scale yet?

  2. Have you heard anything back from SmartThings about getting this
    authorised and published? I was hoping this would pop out of the
    recent spurt of activity in this space on SmartThings part.

1 Like

Somewhere in the thread is a snippet to fix it. My ubi died, but I will try and update the code with a temp preference.

Nope. Not a thing. I think the bulk of the things they worked through were smartapps. Since this is a device handler, it may have to go through a different certification.

Yes, I saw the post right near the end there where you provided the requisite changes to @xneo1, which would work fine for a privately installed version using a private API key, but for a published version it will need a preferences setting and some conditional code around line 116 based on that preference setting (which you already know :smile: ) .

I took it into my own hands and resurrected my UBI. I will work on the preference setting and resubmit this code for approval.


How did you resurrect? Was it stuck in blue light mode?

Yeah. It was in blue light mode. I disassembled it. Inside it’s just a mini android stick. I removed it from the embedded board and plugged in a monitor. It was in reboot loop because of the Ubi App or bubble UPNP. I removed both before it rebooted and reinstalled from the APK’s located in the downloads folder. Once it was back up and running without reboots I put it all back together and it works. I am sure I voided my warranty but they wanted me to pay to ship it back to them and mark it as only worth 15.00 dollars which did not set very well with me.

1 Like

@jody.albritton - when you’re next looking at the code, could you also please consider adding the new capability.notification

The actual implementation would, presumably, just be a call to the speech synthesis function, though perhaps a preference setting to allow the user to set a prefix string would be handy (e.g. "Incoming SmartThings Notification, " as an attention getter before the actual notification text is spoken).

1 Like

@chuckles the new device type is almost complete. The capability.notification is not very well documented? Are you saying that you want the ubi to announce that it is about to make an announcement? I am not understanding. It was my understanding that the notification capability was related to SMS or push notifications.

Can you clarify @Jim

1 Like


I have updated the device type with a preference setting. You can now turn off the Fahrenheit conversion.

1 Like

My interpretation of capability.notification is the device can be used by SmartApps (including, possibly, “system” SmartApps) to notify the user of an event. (Note: I don’t know whether any “system” SmartApps will leverage this capability now or in the future).

Whilst SMS & push notifications could each conceivably be implemented as an instantiation of this capability, I don’t know whether SmartThings have actually done so (or intend to do so), given these abilities were implemented before this formal capability was defined. If they were to do so, then presumably, for example, the SMS implementation would be implemented as a capability.notification on the SmartThings device representing the relevant mobile device,

The documentation states that the capability requires you to implement a single function taking a single string as a parameter, which I take to be the text of the notification message. So, the Ubi could function as a notification device by speaking that string. I would expect SmartApps using this capability to require you to identify a device with capability.notification via preferences the same way as any other device/capability.

My thoughts on the additional preference setting on the Ubi device for a prefix string is simply to allow the user to add a short piece of text which, prepended to the notification string, would be verbalised by the Ubi. I envisage this may be necessary because there is no way of predicting the format of notification strings from future SmartApps. If a notification message has important information at the beginning of the string, whilst this is fine for written notifications such as push and SMS, it may be missed when the Ubi suddenly chirps up out of the blue whilst you are watching TV, listening to the radio, on the telephone, playing with the dog, etc., etc. By having a standard pre-cursor warning you are prompted to stop and listen and not miss what may be pertinent info. By having this pre-cursor as a preference, it can be as long, as short, as ominous or as humorous as the user desires (or left out completely if they don’t want it at all).

You could take it even further and allow the user to specify an audio file to play beforehand (cue klaxons) but this gets way more complicated very quickly, whereas prepending a user specified text string is, as you know, a doddle.

My assumption with all of this is that, with the addition of this capability and devices that implement it, we will be able to direct notifications to various destinations on a SmartApp by SmartApp basis (provided those SmartApps leverage this capability). Hopefully those SmartApps will also be coded so as to allow us to select multiple devices for notifications. Conceivably, a SmartApp could even have multiple tiers for different categories of notifications (informational, warning, error, alert, etc.), again allowing the user to select which devices receive notifications from which tiers via SmartApp preferences.

Future system enhancements may allow us to specify default notification profiles (sets of devices) and perhaps even allow us to activate different profiles at different times or on different days, etc., but that is pure prognostication on my part - there are no plans for such that I’m aware of.

The first hurdle, though, is having devices which support this capability… (chicken, egg, etc.) :smile:

Once we have devices, hopefully SmartApps (including parts of the SmartThings “system”) will allow us to select those device we want to receive specific sets of notifications.

1 Like

how do you get an UBI developer account, i dont have the MY APPS section to get the required info from UBI

Send Leor a private message on the Ubi Forums.