Jump to content

Ubi and ISY


mfranzel

Recommended Posts

Posted (edited)

Hello,

I have an Ubi device (www.theubi.com). It basically is a little all in one device that lets me ask it things and it does it for me like play music or ask the weather.

 

I know there is support for it in a very limited way...

 

I want to be able to say "Okay, Ubi. Turn on the kitchen lights." and have the kitchen lights go on. It has support in it to work with IFTTT... I can set it up so if I say something specific it can trigger an IFTTT function...

 

Any way to integrate the Ubi and ISY??

 

I would LOVE voice control for this thing!!

Edited by mfranzel
Posted (edited)

I have a couple Ubis as well.  I don't use IFTTT with them though.

 

I have a proxy server running on my local LAN that allows me to make calls to ISY without a username/password, and avoid divulging that to any service outside my control.

 

However, from your Ubi, you can make a local HTTP request. 

Creata new lesson, set the utterance to whatever you like, then choose Local HTTP request, and fill in something like:

http://USERNAME:PASSWORD@192.168.1.XXX/rest/nodes/AA BB CC 1/cmd/DON

If you don't want to allow Ubi to see your username password, use the proxy here:

https://sites.google.com/site/isyajax/other-tools-php-code

 

I attached a screenshot of what it would look like.

post-4425-0-40242500-1415663372_thumb.jpg

Edited by PurdueGuy
Posted

Thanks so much for your reply!

 

I did just that... For now I just entered my UN and PW for a test... But when I try it and send a test command, I get an error that says:

 

 

Failed to send test command: Gateway timeout

 

I have verified my IP address is correct. My ISY is on port 8181 so I entered the IP as 10.0.1.91:8181 and all traffic to port 8181 is forwarded to the ISY from the router... But that shouldnt matter as it is technically doing this locally.

 

Is this all right?

Posted

You do NOT need to specify the port you are using from port-forwarding, as this isn't coming from the internet.

 

This is local to your network, so unless you modified to ports on ISY from 80/443 itself, don't specify them.

Posted

I have watched the Amazon Echo videos. So far, it doesn't allow for custom actions like Ubi. It might in the future, since Amazon says more functionality is coming.

Posted

I think you mean www.theubi.com/, right?

 Yes, meant that website, sorry!!

 

 

You do NOT need to specify the port you are using from port-forwarding, as this isn't coming from the internet.

 

This is local to your network, so unless you modified to ports on ISY from 80/443 itself, don't specify them.

The port on the ISY I changed from 80 to 8181 as I run a web server from my home. Regardless or port forwarding or not, because the Ubi is local I just need to specify port 8181, which I did, and this should work... but it isn't. What am I doing wrong?

Posted

Be sure you have the latest Ubi firmware.   I didn't initially, and I had to get it upgraded.

 

I'm curious why you changed the ISY ports?  I realize you might be running a server, but that doesn't mean each item in your LAN has to have a different port, unless you have a very cruddy router than can only forward to the same port that it came in on.  I used to have one like that.

 

Ask Ubi "what version is running?" and it will hopefully respond with "I am ubi version 2 point something" (literally, that's what it says).

Posted

Be sure you have the latest Ubi firmware.   I didn't initially, and I had to get it upgraded.

 

I'm curious why you changed the ISY ports?  I realize you might be running a server, but that doesn't mean each item in your LAN has to have a different port, unless you have a very cruddy router than can only forward to the same port that it came in on.  I used to have one like that.

 

Ask Ubi "what version is running?" and it will hopefully respond with "I am ubi version 2 point something" (literally, that's what it says).

 

I checked the firmware and I am running firmware starting with 0.xxx !!! How can I update??

The reason The ISY is running on port 8181 is because my web server is running on port 80 because I run a website and I need port 80 for it, therefore the ISY cannot be using port 80.

Posted (edited)

1) Make sure that the request is coming from the UBI locally and not via the portal.

2) I find it helpful to follow the /REST call with an UBI Utterance "Turning On the kitchen lights." This way, I know that UBI understood my request.

 

-Xathros

Edited by Xathros
Posted

Also make sure that the request is coming from the UBI locally and not via the portal.

 

-Xathros

The request IS coming from the Ubi locally.

Posted

The request IS coming from the Ubi locally.

OK.  Copy the URL as used in the UBI and paste it into a browser.  Does it work there?

 

Paste your url here (with your user/pass obscured)

 

-Xathros

Posted

OK.  Copy the URL as used in the UBI and paste it into a browser.  Does it work there?

 

Paste your url here (with your user/pass obscured)

 

-Xathros

 

I pasted the URL into a browser and got the following:

 

 

This XML file does not appear to have any style information associated with it. The document tree is shown below.

<RestResponse succeeded="false">
<status>404</status>
</RestResponse>

I am using this:

http://XXX:XXX@10.0.1.91:8181/rest/nodes/20 7D 06 1/cmd/DON
Posted (edited)

http://XXX:XXX@10.0.1.91:8181/rest/nodes/20 7D 06 1/cmd/DON

Drop leading 0's in the addresses:

http://XXX:XXX@10.0.1.91:8181/rest/nodes/20 7D 6 1/cmd/DON

-Xathros

Edited by Xathros
Posted

I dropped the leading 0 like you suggested and it works when I hit the TEST button, but when I speak to the Ubi, nothing happens.


Also, how do I turn OFF the lights?

Posted

I dropped the leading 0 like you suggested and it works when I hit the TEST button, but when I speak to the Ubi, nothing happens.

Also, how do I turn OFF the lights?

Good.  Your on your way.  Next, add a followup utterance to the UBI recipe after the url call that says "Turning on kitchen lights."

 

This way you will know if UBI understood your request.

 

Then another recipe to turn the lights off using:

http://XXX:XXX@10.0.1.91:8181/rest/nodes/20 7D 6 1/cmd/DOF

There is a helpful document called "ISY-WS-SDK-Manual" that will help you with all of this /rest stuff at: http://www.universal-devices.com/developers/wsdk/4.2.18/ISY-WSDK-4.2.18.zip

 

Hope this helps.

 

-Xathros

Posted

Also, if UBI is still not working on voice command, try: "OK UBI...  Update"  This will force UBI to update with the latest changes you have made in the portal just in case it missed something earlier.

 

 

-Xathros

Posted

I actually already had that follow up utterance in there... I give Ubi the command, but it is a good 30 seconds before the command is done and Ubi tells me the lights are on. Why is there such a delay when I speak to Ubi but not when I use the TEST button from the Portal?

Posted

This is entirely an UBI portal issue.  It is the NLP routines in the portal taking for ever to process your voice request.  This comes and goes.  My normal response time when things are working is 2 seconds from request to action.  When its bad, up to 30 seconds like you are seeing now.  If I was home, I would try one of my commands to see the response time.  I bet mine is slow today too.

 

-Xathros

Posted

I assume that the lights turning on and the UBI followup response are happening nearly simultaneously. 

 

-Xathros

Posted

Xathros,

Thank you for your help! 

I do have to ask though... why did I have to remove the leading 0? Will I need to do this to all ISY device addresses like this?

 

And yes, when the command goes through and executes, the lights turning on and off is simultaneous with the followup utterance. 

 

I just wish the command would go through faster...

Posted

As always, happy to help.

 

The /REST interface requires dropping leading 0's so yes, and Insteon address with a leading 0 will be affected.  I believe that if you run the Topology report, all of the addresses will be listed without the leading 0's in the format that you use in a /REST call.  I keep an electronic copy of a current topology report for copying addresses from when developing /REST calls. 

 

The speed will improve.  Somebody at UBI central probably "spilled pixie dust on the server" again.  I have seen this several times during UBI's beta process.  It usually clears up in a day or two.

 

-Xathros

Posted

Xathros,

I don't suppose you know how to get the ISY to interface with the Philips Hue? :)

 

I have a very complicated set up with the two just to make the light change to blue and flash at 7pm then go back to white.

 

I know the Hue bulbs are capable of working with the ISY, but I cannot figure out how to make them work properly and do what I need, such as the above.

Posted

Xathros,

 

Thanks again for sharing your knowledge, very interesting thread as I am looking to implement something similar as well.  I was not aware of the ISY proxy

Will have to look into that ... do you use it for anything else?

Guest
This topic is now closed to further replies.

  • Recently Browsing

    • No registered users viewing this page.
  • Who's Online (See full list)

  • Forum Statistics

    • Total Topics
      37k
    • Total Posts
      371.5k
×
×
  • Create New...