Playing around with Amazon Echo (technical interface discussion)

You’ll get all this and more.

I just worry about context setting (“open SmartThings”) and who might have to pay for ongoing costs.

I am not seeing the data directory you are referring to. I have my Jar in top level of C within a sub folder of echosmart but all I get is the Jar.

The data file should be where you ran from not where the Jar file is.
How are you starting the jar ?
What folder are you in when you do it ?

Yes, in my case I have a Windows CMD file that starts the jar up from the folder where the jar is, so the data directory gets created in that folder.

The java app is working great for me… for one command. Once I start the app, I can control one device one time, and then Alexa tells me she can’t reach the device or group named whatever. If I stop and then restart the app, same thing… one command works, then nothing.

Anyone with similar experience, or ideas?

Thanks!

Got mine. Haven’t tried the hack, probably won’t. But, man, the voice recognition on this thing is amazing! Covers most of the main floor, no problems. Not picky. Understands 4 or 5 people easily. Answers clearly if we ask for something the device doesn’t do, no weird responses or dumb jokes. (You can get dumb jokes, but you have to intentionally ask for them. :wink:)

The first full featured home automation system that integrates well with this, or provides an equivalent, will likely get my business. The race is on!

3 Likes

I am working on a Echo Smart things appliance which will provide the Hue Emulation as detailed above. I want it to be a plug in appliance that acts as your hue bridge and is configurable by simply connecting to it via a browser.

But I have a road block in regard to the Oauth configuration.
The problem is the appliance will be on you local network with a standard ip such as 192.168.1.xxx.

Looking at the Oauth Process in the example you need to provide a redirect URL to acquire the access code and accessToken

But since the appliance will be behind your router it can’t be reached.

I only see two options.

  1. I have to get an external web site to run the auth process
  2. I have to configure my router with port forwarding to my appliance and use my router’s external IP address as the redirect url. This will make this appliance very difficult to configure.

Is there some way that I can acquire the authorization I need from behind my router without these difficult options ?

This appliance would be sweet but I can’t figure out how to get past this road block.

I think this is the most workable solution, unfortunately. You can enable UPnP in the router to allow dynamic port forwarding requests, but many people disable this for security reasons.

BTW: If this is to be a commercial product, you’re completely out of luck, as Philips explicitly forbids the creation of Hue Bridge emulators (per API license agreement).

1 Like

That is what I thought. I already configured my version for port forwarding and it works fine. I didn’t really want to make this a “commercial” product. But I was considering offering to make these for folks in the ST community. I guess that would violate the agreement so I will just make it for myself :smile:

I looks like armzilla’s emulation code a violation of the terms. I don’t think it needs to be a commercial product.

From the Hue agreement for API access

-We want all your apps to work with our API to form a rich ecosystem of interoperable applications, so it is a condition of access to our API documentation that you do not use it to develop or distribute any bridges or devices which interpret the hue API.

Of course this is a temporary project until Echo works with Smart Things directly.

Yes. Unless some court finds that APIs can’t be protected by copyright.

It’s not copyright law, just a contract agreement. Simpler and completely enforceable.

I could write a contract that says any developer who uses my code has to wear a green hat in any YouTube videos demonstrating anything based on that code and the courts would be fine with it. Developers agree to the terms when they sign up for access. You don’t like the terms, don’t sign up.

Copyright infringement is a separate set of issues which might also apply. But the contract agreement doesn’t depend on copyright protection to hold up.

@JDRoberts but what about the fact that I have now forked armzilla’s code and started modifying. I never signed up for access ? So I agreed to nothing. Not sure how that will play out. I have no intention of making this a commercial product so not concerned but my github is public so concerned that perhaps that could be a problem.

1 Like

If it’s something you did unintentionally, it’s like buying a car you didn’t know was stolen. In the US, you typically have to give the car back and try to get your money back from whoever sold it to you, but you’re not usually considered a thief. (There are other countries where just possession is a crime, though.)

So most commonly you’d just be told to take it down. But it can vary, those situations get tricky.

Interesting connection to the stolen car I didn’t know was stolen. Good point.

So after two days, my housemate is totally in love with Echo. So much so that he wants to go ahead and buy Wemo switches just so he can control them with the echo.

Today he brought out a glass jar labeled “ST failures” and put it on the shelf underneath where the echo lives.

He says we should put in a quarter every time ST fails unexpectedly, and then he’s going to use the money for things that echo can control.

I told him by the time he has enough money to buy anything, echo will probably work with SmartThings.

I hope I’m right…:flushed:

Risky bet :smile:

regarding:
Echo can only speak when spoken to (i.e., woken with the wake word, “Alexa” or “Amazon”). This means that the unit cannot be used like a Sonos to play aribitrary alert or informational messages (“The mail has arrived”, “An intruder may be trying to open the front-door.”). Echo could be programmed, however, to answer questions like “Are any of my windows open?”. i.e., it is information upon request only.

I would love it if we can do a web scrape to a pending queue, and then have it read the queue when spoken to list the queue. ie: grocery list (keep adding items at different times), recent forum posts, rss new posts, new/updated file structures in a target folder. would be better if it was automated to list live events, or at a designated time (tasker trigger?) instead of upon request. the amazon echo voice is pretty natural; hence why i would prefer it to be the device to talk rather than another TTS device.

1 Like

Thanks that was my issue. I was running the app higher up in the directory. I am making good progress. I can get echo to find my devices but haven’t been able to execute properly. I don’t think my Java is running in the background all the time. I keep having to restart my PC and starting over to get Things added.

Would prefer to have SDK access but Amazon hasn’t gotten back to me yet on that…

@kbnerd
I don’t run mine in the background I just keep a window open. How are you running in the background ? Does the computer go to sleep if not used ? Etc.

I had the software on my MacBook but when I closed the lid it would stop working.

So I repurposed an old notebook computer, installed lubuntu on it and run the server on that. This is working perfectly now.

I also have a Raspberry Pi 2 on order and plan to move the server to that. Low power usage, headless, unix based server which should be perfect for the task.

Waiting for my SDK access also :frowning:

2 Likes

This works Great thanks! Anyone noticed that the smart devices are per profile? Was trying to figure out why i was seeing it only work some times. Found out I had to add them from both my profile and the GF’s. Interesting decision on Amazon’s part. I get groupings being user specific but not the fundamental devices.

3 Likes