more G-Labs products

Author Topic: Amazon Echo / Alexa Bridge Interface  (Read 5776 times)

January 31, 2017, 08:23:42 PM
Reply #45

petediscrete

  • ****
  • Information
  • Sr. Member
  • Posts: 220
Yes Mchias13. Every little helps.

I'll have a try at that link and report back.

January 31, 2017, 09:19:36 PM
Reply #46

petediscrete

  • ****
  • Information
  • Sr. Member
  • Posts: 220
Kevinv, I note you say you're running the latest OS. I assume that's Jessie as you are employing SystemD to run your service which is not really recommended for Wheezy that I'm running.

Starting to see the shortfalls of HG running under Wheezy now.

February 01, 2017, 05:01:06 AM
Reply #47

kevinvinv

  • ****
  • Information
  • Sr. Member
  • Posts: 196
Yes I am running Jessie with an older Pi.

And I have ha_bridge set to port 80 (the default) with HG set to 8080.

I should have taken better notes to share... I apologize.    ::)


February 01, 2017, 12:45:43 PM
Reply #48

petediscrete

  • ****
  • Information
  • Sr. Member
  • Posts: 220
It's the nature of the beast Kevinv. You try many options and suddenly your problem is solved. You then realise you're not sure what solution solved the original problem or was it a combination of solutions.

What would help greatly is if users outlined what their setup was, both hardware and software. The beauty of HG is that it works on a number of different platforms.

Hopefully we can find a working solution for the Echo within HG and David can finally get his app working for everyone. Fingers crossed.

February 01, 2017, 03:02:13 PM
Reply #49

kevinvinv

  • ****
  • Information
  • Sr. Member
  • Posts: 196
Hi Pete,  what is your situation with ha-bridge    where is it failing now?

February 01, 2017, 11:10:02 PM
Reply #50

petediscrete

  • ****
  • Information
  • Sr. Member
  • Posts: 220
Im using Wheezy and the install instructions from those links are more suited to Jessie. Systemd service management  would need to be installed as far as I can see and I'm not sure if Gene has tested HG with Systemd on Wheezy.

February 02, 2017, 03:37:37 AM
Reply #51

kevinvinv

  • ****
  • Information
  • Sr. Member
  • Posts: 196
Ah,  I see.   I am a newbie with the Pi but everything went pretty smoothly surprisingly.  I used NOOBS to install the OS and then HG and finally ha_bridge....

February 02, 2017, 02:46:01 PM
Reply #52

petediscrete

  • ****
  • Information
  • Sr. Member
  • Posts: 220
Kevinv are you using the full desktop version of Jessie. I'm assuming you are as you installing from NOOBS. I'd disable the desktop GUI in your case as the new desktop GUI is quite processor intensive. A number of users here are using Jessie Lite because of this.

I'm curious to know if you have email notification setup and working under Jessie and if you have the Raspberry Pi camera module attached to your Pi server.

February 02, 2017, 03:17:12 PM
Reply #53

kevinvinv

  • ****
  • Information
  • Sr. Member
  • Posts: 196
I installed the entire version b/c it was my first experience with the pi and I wanted to see how usable it was as a web surfer...  but then I "turned off" the gui using the config utility and went headless.

Is that good enough or do I need to install the lite version entirely?

No email and no camera module...  I see that upgrading will be more effort for you than I considered.

I am forcing myself to go easy on this project these days b/c I have got a lot of gray hairs from getting as far as I have and my wife is kind of sick of it all!   :)




February 04, 2017, 01:31:23 AM
Reply #54

petediscrete

  • ****
  • Information
  • Sr. Member
  • Posts: 220
Jens I imaged a new card with Jessie and followed your previous links. I have the bridge working now. HG is running on Port 80 and Ha_Bridge on Port 8080 both on the same Pi.

I manually added two x10 modules using the http url examples you provided, using the ip address of the Pi and in my case B1 and B4. Tested the bridge and it reported back the devices I added. Asked Alexa to discover the devices which she did. I then asked Alexa to turn them on and she reported they were powered off. I ran the On command on the Bridge and it reported a problem with the addresses I provided.

Any ideas what may be the problem here.

February 04, 2017, 07:27:16 AM
Reply #55

Jens

  • *****
  • Information
  • Global Moderator
  • Posts: 211
Can you just check whether your settings look similar as the screenshot attached?

Bests
Jens

February 04, 2017, 01:22:51 PM
Reply #56

petediscrete

  • ****
  • Information
  • Sr. Member
  • Posts: 220
Yes Jens they are identical as per my settings. The error message I receive from the bridge is "error on calling url to change device state". I checked the url and it matches my HG url.

February 04, 2017, 02:14:09 PM
Reply #57

Jens

  • *****
  • Information
  • Global Moderator
  • Posts: 211
I haven't had that kind of problem, did a quick search on the net about the failure cause and the solutions I found was a misspelled URL in the ON/OFF fields of ha_bridge or exchange the IP address within that URL by <localhost:port>.

February 04, 2017, 02:47:02 PM
Reply #58

petediscrete

  • ****
  • Information
  • Sr. Member
  • Posts: 220
I'm thinking about a possible security issue. To access a server like HG from a server like HA_Bridge would you need to supply credentials like username,password within the Webservice call url. Maybe something similar to accessing a webcam feed.

Clearly one server is issuing an instruction to another server to carry out an instruction so I'm thinking you would need some form of security access protocol in place. I understand in my case that both servers are on the same system but HG is using Port 80 and HA_Bridge is using 8080.

This is just a thought.

February 04, 2017, 04:36:19 PM
Reply #59

petediscrete

  • ****
  • Information
  • Sr. Member
  • Posts: 220
Jens, my logic and lines of thinking were on the right track.

I played around in a web browser using the url you suggested. As I thought, I need to provide credentials to execute the GET request. For anyone else having similar difficulties the url is as follows:

http://username:[email protected]/api/HomeAutomation.X10/B1/Control.On

I knew I'd need to provide some form of credentials to HG to get it to perform an external command from another server.

Thanks for you help Jens and others.

Maybe David might have an update on his app.