Ubi Connect

I am very close to having a working ubi connect smart app and device type. Mostly functional thanks to some good jumping off points from @pstuart and @wackware. Everything* works save for two small bugs. I was hoping @wackware or @urman could shed some light on them.

Since we don’t have anything in the taxonomy for Sound Level and Air Pressure, I am having issues with the data tiles.

Just using a simple

 valueTile("airpressure", "device.airpressure", inactiveLabel: false) {
        	state "default", label:'${currentValue}Kpa', unit:"Air Pressure"

heres the weird part: The values appear very briefly when I poll the ubi, then they quickly disappear and are replaced by --. In the events of the device I can see that the last value was read in just fine.

EDIT: Resolution

After the capabilities I had to add this

   attribute "soundlevel", "enum"
attribute "airpressure", "enum"

Why are they “enum”? Shouldn’t they just be strings?

Anyway, glad you got it working.

is it available to use yet ?

If you have an api key from The Ubi it will work today, I am wrapping up the “speech synthesis” capability and I will post the code on github. I will submit the code to smartthings for the people who do not have an api key. Not sure what the approval time is at this point.

What 3rd party service is this using? Sorry if already asked, on my phone search sux.

Just a device type and smart app for talking to the ubi. The ubi has temperature, humidity, light, sound level and air pressure sensors. The device type exposes those sensors and the voice control capability to smartthings. No other third party service involved.

Sorry wrong subject.

The code is on github now.

1 Like

Forgive me if I missed this, but are you making a smartapp that will grab my Ubi’s data and display it in SmartThings? Or better yet, use the data for triggers in Smartthings?
That would be cool. I have one and it doesn’t do much - I’m kind of unimpressed. If I could use all of it’s sensors I would feel a little better.

That is exactly what it does. It brings the ubi in as a multi sensor device that is available to all of your other smart apps. It also has the speech synthesis capability which does not do anything yet, but will allow apps to push text to speech notifications to your ubi.

Keep up the good work!

I cannot get this to work. I paste the device type and smart app into the IDE . I create the 3 ubi’s I have. Where do the Ubi Client ID and Client secret come from. I do not see the codes in the device type nor the ubi devices. I can set an access token with an HTTP request for each ubi from the Ubi site.

The ubi client id and secret are provided by ubi. You have to be an ubi developer to use this smart app at the moment.

OK then. I did recently ask for API access from the Ubi group and was told the following:
The Advanced Custom Behavior feature was released a couple of months ago to all Ubi accounts. And they sent me links on HTTP Request documents.

Do you have a “my apps” link at the top right of portal.ubi.com? If you have that, you can generate the id and secret to make this work. If not I have submitted the app to ST, and hopefully they will just make it part of the labs or something.

Ok finally got my API access, generated the id and secret and pulled the stclieintid from app on the app settings page. I am now getting an error. did I miss something else.

What is the error message? Can you paste it?

{“error”:true,“type”:“java.lang.reflect.UndeclaredThrowableException”,“message”:“An unexpected error occurred.”}

When I try to run it Chrome it hangs on the Ubi Login and the processing icon just spins… When I try to configure it from the iOS app I get the java error listed above.

I uploaded a corrected version to

@jody.albritton. I got further with the new code. I can see the ubi-smartthing link. I can get to the next step of seeing and picking my Ubi’s from the list. Then I hit another wall. When I hit done after selecting the ubi’s I get a red popup message on the iOS app. There are no codes “Error. An unexpect error occurred”. Still having the same issue with the website on my laptop, but I am unsure if this is do to the wonkiness of the IDE lately. I hope you can figure it our and glad you created this.