Please login or register.

Login with username, password and session length

Poll

Would you be interested in such a thing?

Yes
- 5 (62.5%)
No, I'll build it my self or would never use it
- 0 (0%)
Don't care one way or the other
- 3 (37.5%)

Total Members Voted: 8


Pages: [1] 2 3 ... 9

Author Topic: The Pi Alexa X10 Hub  (Read 25956 times)

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 282
  • Posts: 10497
  • I don't work for X10, I use it successfuly!
The Pi Alexa X10 Hub
« on: August 27, 2018, 07:14:42 AM »

While playing with different PI options for x10 software I notice almost all used heyU ore Mochad to supply the required drivers depending on the X10 interface used.
I could do a step by step on how to create one for the x10 community but there seems to be little interest in this type of build your own. However I will say you'll need a PI and a cm15 or cm19 for this your pi should be installed with Debian lite though it does work with the full GUI installed
Basically all that is then required is ha-bridge and mochad both are open source. and details for installing are on this forum.

Since I had a SD card I was using for trying different X10 software for the PI I decided to try creating a script to put everything together in one downloadable installer. This was done more as an experiment and for myself but I realized their may be some here interested in a simple downloadable installer.
If this is the case I'll spend a bit more time on this and add x10 codes for one house code1-16 to the configuration file, then users only need to rename the devices.

« Last Edit: August 27, 2018, 02:20:13 PM by Tuicemen »
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

brobin

  • Hero Member
  • *****
  • Helpful Post Rating: 157
  • Posts: 1406
Re: The Pi Alexa X10 Hub
« Reply #1 on: August 27, 2018, 03:39:11 PM »

Sounds great!  :)% Thank you. I currently use Housecode N for my Alexa triggers if that's an option but A for Alexa would be fine too.
Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 282
  • Posts: 10497
  • I don't work for X10, I use it successfuly!
Re: The Pi Alexa X10 Hub
« Reply #2 on: August 27, 2018, 04:22:52 PM »

As this was intended more for my personal use I've added House code "L" On/Off  & AllLightsOn/Off but it is easy for end users to change the house codes when they rename the devices.

I've not added dimming as I have no way to test that here.
However with a little reading of the Ha-bridge help file and the mochad read me users should be able to figure it out and post what works best for them.

I have a working script but I'm still working out the downloadable self extracting part B:( ::) :'
I was sure I had made the script executable B:(
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 282
  • Posts: 10497
  • I don't work for X10, I use it successfuly!
Re: The Pi Alexa X10 Hub
« Reply #3 on: August 27, 2018, 06:03:40 PM »

Well discovered part of the issue was a read permission on my server B:(
However the auto installer link stops half way through, even thought the script runs fine from the PI :o ???
Maybe my internet connection  as it is a rainy day here my connection may be cutting out causing this . ::) :'
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

HA Dave

  • Hero Member
  • *****
  • Helpful Post Rating: 175
  • Posts: 7127
Re: The Pi Alexa X10 Hub
« Reply #4 on: August 27, 2018, 07:23:39 PM »

….. I have a working script but I'm still working out the downloadable self extracting part B:( ::) :'
I was sure I had made the script executable B:(


I know this can't be easy! Take your time. I'll be ready to try it when you're ready to release it.
Logged
Home Automation is an always changing technology

brobin

  • Hero Member
  • *****
  • Helpful Post Rating: 157
  • Posts: 1406
Re: The Pi Alexa X10 Hub
« Reply #5 on: August 27, 2018, 09:37:19 PM »

Guess it's finally time for me to order a piece of pi!  Is the Zero W the right flavor?  Other than a power supply do I need anything else?
Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 282
  • Posts: 10497
  • I don't work for X10, I use it successfuly!
Re: The Pi Alexa X10 Hub
« Reply #6 on: August 28, 2018, 07:29:22 AM »

A PI Zero W will work the plain zero will not as it doesn't have WiFi.
The Zerro W is what I used in my CM15 mod http://forums.x10.com/index.php?topic=30322.0
If this is your first PI you may wish to get the Min SD already loaded with Debian. but a blank min SD card will work. You'll just need to load Debian from your PC to the card.
 >!
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 282
  • Posts: 10497
  • I don't work for X10, I use it successfuly!
Re: The Pi Alexa X10 Hub
« Reply #7 on: August 28, 2018, 10:18:25 AM »

Seems mochad conflicts with HG B:(
I think this is because HG is accessing the libusb with its own driver ::) :'
Users that are thinking about this should keep that in mind. This will be intended to be installed on a new Debian install.
I'm also having issues with Alexa discovering devices B:( this has always been a on again off again issue for me at the off grid place.
So I need to look into that a bit more. B:(
If you haven't voted on this yet please do, It will affect whether I continue on with this.


 >!
« Last Edit: August 28, 2018, 04:43:04 PM by Tuicemen »
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 282
  • Posts: 10497
  • I don't work for X10, I use it successfuly!
Re: The Pi Alexa X10 Hub
« Reply #8 on: August 28, 2018, 07:36:23 PM »

couple of issues I've ran into
1: sometimes  the send commands work with the
Code: [Select]
./x10cmd... sometimes it needs to be changed to
Code: [Select]
sh x10cmd... B:(  this one has me stumped.

2:If you wished to run your pi on Raspbian lite the installer will worked but ha-bridge fails to run. I then realized the lite version doesn't include java. B:( you'll need to run
Code: [Select]
sudo apt-get update && sudo apt-get install oracle-java8-jdk prior to running the installer. :(

3: some times the x10cmd file needs to be made executable  with
Code: [Select]
sudo chmod -x ha-bridge/x10cmd and a reboot is always needed to take affect. maybe that's why the chmod in the installer is failing. ::) :'
4: the Alexa discovery issue appears to have been a weather event :o

I'll continue to plug along with this chmod thing.
 >!

« Last Edit: October 28, 2018, 05:02:10 PM by Tuicemen »
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 282
  • Posts: 10497
  • I don't work for X10, I use it successfuly!
Re: The Pi Alexa X10 Hub
« Reply #9 on: August 29, 2018, 08:39:43 AM »

Looks like the script is making the x10cmd file executable the Pi just needs to be rebooted in order for it to take affect :)%
As for the command to issue a x10 call I've changed that to sh x10cmd..... as  this seems to work more often then ./x10cmd....

I suspected any home automation program that uses mochad (and many do) will work with this.
I decided to test this theory and installed Domoticz as I had yet to test that software.
Although it did install and did not affect x10 sends from the bridge or Domoticz, it was not without problems.
The Domoticz web server lost connection while I was setting up the pi mother board sensors.
I'm not sure if this is a issue with the sensor module in Domoticz or the three programs running at the same time was to much for the PI.
I'll play with this a bit more over the next few days.
I believe the installer is ready for testing as it has worked on my pi (different SD cards) with a full or lite Debian stretch installed.

If you wish to test this PM me and I'll respond with the link ;)
 >!
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

brobin

  • Hero Member
  • *****
  • Helpful Post Rating: 157
  • Posts: 1406
Re: The Pi Alexa X10 Hub
« Reply #10 on: August 29, 2018, 12:57:31 PM »


If this is your first PI you may wish to get the Min SD already loaded with Debian. but a blank min SD card will work.
 >!

I've found cards with Noobs and Raspbian but not Debian. I can d/l and copy to a card but I'm not sure which flavor of Debian to d/l. Sorry to be so dense but this will be my first SBC and I'm not up to speed.
Logged

petera

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 27
  • Posts: 1750
Re: The Pi Alexa X10 Hub
« Reply #11 on: August 29, 2018, 01:24:50 PM »


If this is your first PI you may wish to get the Min SD already loaded with Debian. but a blank min SD card will work.
 >!

I've found cards with Noobs and Raspbian but not Debian. I can d/l and copy to a card but I'm not sure which flavor of Debian to d/l. Sorry to be so dense but this will be my first SBC and I'm not up to speed.

Tuicemen refers to Debian on a number of occasions. It should read Raspbian in the case of the Pi.
Logged

petera

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 27
  • Posts: 1750
Re: The Pi Alexa X10 Hub
« Reply #12 on: August 29, 2018, 01:44:24 PM »

Looks like the script is making the x10cmd file executable the Pi just needs to be rebooted in order for it to take affect :)%
As for the command to issue a x10 call I've changed that to sh x10cmd..... as  this seems to work more often then ./x10cmd....

I suspected any home automation program that uses mochad (and many do) will work with this.
I decided to test this theory and installed Domoticz as I had yet to test that software.
Although it did install and did not affect x10 sends from the bridge or Domoticz, it was not without problems.
The Domoticz web server lost connection while I was setting up the pi mother board sensors.
I'm not sure if this is a issue with the sensor module in Domoticz or the three programs running at the same time was to much for the PI.
I'll play with this a bit more over the next few days.
I believe the installer is ready for testing as it has worked on my pi (different SD cards) with a full or lite Debian stretch installed.

If you wish to test this PM me and I'll respond with the link ;)
 >!

As you probably already know, X10 in Homegenie runs without the need to install Mochad or Heyu using the Xtenlib which Gene utilised to run his project on the .Net Framework and later on Linux via Mono. He's done a lot of work on the subject. Check out his work in the area on the GitHub X10 Home Automation Library for .NET

Bearing this in mind I'd imagine you would get conflicts making calls to an external instance of Mochad as a separate service running as a daemon. I certainly couldn't confirm this but it would make sense.

David Wallis over at the Homegenie Club states that he has internalised the Homegenie/Alexa bridge within Homegenie. You may want to PM him or post on the forum to confirm this. It may save you a little time with this project.
Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 282
  • Posts: 10497
  • I don't work for X10, I use it successfuly!
Re: The Pi Alexa X10 Hub
« Reply #13 on: August 29, 2018, 01:53:31 PM »


I've found cards with Noobs and Raspbian but not Debian. I can d/l and copy to a card but I'm not sure which flavor of Debian to d/l. Sorry to be so dense but this will be my first SBC and I'm not up to speed.

Tuicemen refers to Debian on a number of occasions. It should read Raspbian in the case of the Pi.
Yes you'll not find Debian with noobs  Raspbian is what you want  thanks for the clarification petera
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 282
  • Posts: 10497
  • I don't work for X10, I use it successfuly!
Re: The Pi Alexa X10 Hub
« Reply #14 on: August 29, 2018, 02:28:38 PM »


Bearing this in mind I'd imagine you would get conflicts making calls to an external instance of Mochad as a separate service running as a daemon. I certainly couldn't confirm this but it would make sense.

David Wallis over at the Homegenie Club states that he has internalised the Homegenie/Alexa bridge within Homegenie. You may want to PM him or post on the forum to confirm this. It may save you a little time with this project.
Originally this was to be a single use PI project not to have another automation software installed along side it on the same PI.
The Pi was original designed and created for just that, a single project development board. I full well expected conflicts with a software not using Mochad.
I like to push my PI 3b+ as it is a bit more powerful then the other older ones available. I highly double my zero would run this and a Home automation software that used mochad with out over heating but I'll definably test this over the winter.
Ha-Bridge runs fine with HG, and in reality if you use HG, ha-bridge can make calls to it, you don't need this project or Mochad.

From what I read on David Walls HG Alexa bridge the internalizing was more to auto pull HG devices into the Bridge. Something that can't be done with HA-Bridge for HG, but could be if BWS Systems created a helper for it which he's done for HA, OpenHab, Domoticz, and other softwares.
That being said I continued to play with this and Domoticz but this time on a Raspian stretch full install (with GUI) so I can monitor the CPU usage as I add things to Domoticz.
Originally I wasn't keen on the feel of Domoticz but it is growing on me! I may just keep it on a SD card with this project to do a good comparison against HG. But that's another thread.


 
Logged
Please Read Topic:
General Forum Etiquette
Before you post!
Pages: [1] 2 3 ... 9
 

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