Please login or register.

Login with username, password and session length

Author Topic: HA-Bridge to Alexa  (Read 1537 times)

barnmichael

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 1
HA-Bridge to Alexa
« on: December 05, 2020, 09:49:53 PM »

Been using a bunch of X-10 controllers for Christmas lighting for years. Finally trying to automate.

I've got a Raspberry Pi Zero with a CM-19A connected and a transceiver thing elsewhere in the house. After a lot of grief, I finally got mochad up and running and can control devices with simple scripts (echo "rf A2 on" | nc -q 0 localhost 1099).

I installed HA-Bridge and have it talking to mochad and I can control my devices with the Test ON and Test OFF buttons on the HA-Bridge web page. The final step is getting Alexa to talk to HA-Bridge. I've been searching for a couple days and can't seem to find the right setup. I finally found this forum and hope someone here has some ideas.

Thanks,
Michael
Logged

brobin

  • Hero Member
  • *****
  • Helpful Post Rating: 157
  • Posts: 1409
Re: HA-Bridge to Alexa
« Reply #1 on: December 06, 2020, 12:52:41 AM »

Welcome Michael!  You've come to the right place.  Using your PiZero and the CM19a you can run the PiAlexaHub program for Alexa control of X10. I was using that for about a year.  See: http://forums.x10.com/index.php?topic=30465.0

I should warn you that it hasn't been updated in quite some time so there may be some updates needed.  Some folks here have taken a further step with their Pi's and use it for running Home Genie (with Alexa control). The link to that is at the top of the page at "The Buster PiX10Hub is here!"

A third alternative, which I now use, is more of a plug 'n play option using a Smartenit Harmony P2 with a 2412U PLM.  This is a $60 bundle that has you up and running in 30 minutes with an actual Alexa skill for reliability.  Go to https://smartenit.com/product/harmony-p2/ and select the X10/Insteon PLM option.   
Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 282
  • Posts: 10497
  • I don't work for X10, I use it successfuly!
Re: HA-Bridge to Alexa
« Reply #2 on: December 06, 2020, 06:56:59 AM »

Welcome aboard!
Several here do use pi boards for x10.
 Since you already have HA-bridge able to control x10 then PiAlexahub is unlikely to help. The issue is with Alexa and the HA-Bridge. Github HA-Bridge issues is full of reports of users not able to connect Alexa with it. This doesn't mean it no longer works it just needs constant tinkering due to Amazon constant changes to the Alexa programing.
 I would suggest you playing with HomeGenie(HG) eiher with a vanila install or the PiX10Hub as HG has scheduling and timer abilities.
 HA-Bridge (also included in the PiX10Hub) has a helper for HG to get you working with Alexa. However same issues are there with Alexa reconization.
 If you dont enjoy the tinkering aspect I suggest you follow brobin's suggestion for the plug and play Smartenit. >!
« Last Edit: December 06, 2020, 06:58:46 AM by Tuicemen »
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

soxfan1966

  • Hero Member
  • *****
  • Helpful Post Rating: 3
  • Posts: 388
Re: HA-Bridge to Alexa
« Reply #3 on: December 07, 2020, 06:43:08 PM »

Does the smartinit work with HomeGenie?
Logged

brobin

  • Hero Member
  • *****
  • Helpful Post Rating: 157
  • Posts: 1409
Re: HA-Bridge to Alexa
« Reply #4 on: December 07, 2020, 08:47:31 PM »

Using it as an Alexa "front end" to replace HA Bridge, yes, absolutely.  That's how I use it with my Stargate.  Rather than recreate all my 'events' in the Smartenit P2, I use it to trigger actions in the Stargate rather than control anything directly although I certainly could.  This method is particularly useful if the event in the existing controller contains X10 extended codes.  Here's an example using just simple language:

Event Name: Office Lamps

IF time is sunset -20min
THEN
 A-1 ON
 A-2 dim to 50%
 A-3 dim to 44% (extended code)
 ASCII OUT COM3: close shutters

In the Smartenit, I defined an X10 address, N1, as 'Office Lamps' and use it as a trigger by adding one line to the above event:

IF time is sunset -20min
OR N1-On is received
THEN
 A-1 ON
 A-2 dim to 50%
 A-3 dim to 44% (extended code)
 ASCII OUT COM3: close shades

So now when I tell Alexa to "turn on office lamps" the Smartenit sends N1-On, the Stargate hears it and runs the event.  No reason you couldn't do the same with Home Genie, Ocelot, or even the CM-15a.  Of course, if the event only controlled one X10 address you could just have Smartenit control it directly.

My Stargate also has a serial connection to the Caddx alarm panel so when I tell Alexa to "turn on alarm" it sends N12-On which triggers the Stargate to arm the alarm. 

If you order one, the Harmony P2 is $39.99 and the X10/Insteon PLM option adds $20. In addition to X10 & Insteon, it also has ZigBee built it. It has an Alexa Skill, Android & IOS apps and web portal access.  https://smartenit.com/product/harmony-p2/
« Last Edit: December 07, 2020, 08:52:05 PM by brobin »
Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 282
  • Posts: 10497
  • I don't work for X10, I use it successfuly!
Re: HA-Bridge to Alexa
« Reply #5 on: December 08, 2020, 04:21:23 PM »

The issue with HA-Bridge and X10 is the UPNP delay is set to high I believe the default is 640 this should be much lower.I have mine at my city place set some were arround 500 at my off grid place it is set to 440.
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

soxfan1966

  • Hero Member
  • *****
  • Helpful Post Rating: 3
  • Posts: 388
Re: HA-Bridge to Alexa
« Reply #6 on: December 09, 2020, 09:48:24 AM »

I am planning to order and try out the Harmony P2 and X10/Insteon PLM option after the holidays  I am currently using SmartThings Skill to Alexa to trigger my X10 modules but it can be spotty so another option that seems to be proven and reliable looks promising.

I'm also looking into getting a Pi 3B+ to upgrade over my Pi Zero W for better performance (and have a backup should the need arise).
Logged

brobin

  • Hero Member
  • *****
  • Helpful Post Rating: 157
  • Posts: 1409
Re: HA-Bridge to Alexa
« Reply #7 on: December 09, 2020, 10:24:35 AM »

I am planning to order and try out the Harmony P2 and X10/Insteon PLM option after the holidays  I am currently using SmartThings Skill to Alexa to trigger my X10 modules but it can be spotty so another option that seems to be proven and reliable looks promising.

I'm also looking into getting a Pi 3B+ to upgrade over my Pi Zero W for better performance (and have a backup should the need arise).

You'll be happy with the P2. Easy to set up and very reliable.

Speaking of the Pi 3B+, I just dusted mine off yesterday and turned it into a Pi-hole DNS sinkhole device that blocks pretty much all ads to all devices on the router.  It's works pretty well.  Sites don't bug you about turning off ad blockers because their aren't any - you just don't see them.  I've had some pages not load or load screwy but it's easy to whitelist those items.
Logged

soxfan1966

  • Hero Member
  • *****
  • Helpful Post Rating: 3
  • Posts: 388
Re: HA-Bridge to Alexa
« Reply #8 on: January 04, 2021, 07:15:03 PM »

My Smartenit P2 arrived this afternoon (with the x10 adapter).  Plugged it in, made the connections and then added it to the Smartenit app (I had installed the app last week already).

Once the hub was added and software updated I added one of my x10 devices.  Note that the x10 device choices are Switches/Outlets and scroll to the end of the list.  You can chose a dimmer or appliance module.  For my x10 switches that are not dimmers I used the appliance module.

I had to disable the Smartenit skill in Alexa (which I had added last week before the Smartenit P2 was installed) and then re-enable it so it found the device I added but then the additional devices I added afterward showed up in Alexa.

So far so good.   Trying to see if Smartenit will reflect when one of the x10 devices is turned on or off via HomeGenie and vice versa.  I believe they should.
Logged

brobin

  • Hero Member
  • *****
  • Helpful Post Rating: 157
  • Posts: 1409
Re: HA-Bridge to Alexa
« Reply #9 on: January 04, 2021, 07:57:08 PM »

Yes, absolutely.  It will respond to signals received by the PLM.

Glad to hear you got up and running easily!
Logged
 

X10.com | About X10 | X10 Security Systems | Cameras| Package Deals
© Copyright 2014-2016 X10.com All rights reserved.