X10 Community Forum

ActiveHome Pro => SDK => Third Party Add-Ons & Software => Topic started by: brobin on December 29, 2018, 01:10:52 PM

Title: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: brobin on December 29, 2018, 01:10:52 PM
AlexaPiHub is great but lacks the elegance of Alex10 which makes setup and management of devices easy for anyone.  I've been thinking  -:) , what if I could run Alex10 on a PiZW? There is a reasonably priced (on sale for $10.46 now) Pi program called ExaGear that runs Windows programs under WINE.  I've got a spare Pi here and there's a free 3 day trial for ExaGear.  Any thoughts on this?
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: alzy on December 29, 2018, 01:15:48 PM
Might be worth a try! Think it would work with a cm19a?
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: Tuicemen on December 29, 2018, 01:21:51 PM
This may work, Alex10 uses the AHP SDK other have been able to run AHP under wine so it is worth a shot. However a pi zeroW may be short on the cpu power to run wine and everytnig Alex10 requires.
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: brobin on December 29, 2018, 01:31:21 PM
Yes, Alex10 works with a CM19a perfectly.  Before I moved it to the PiAlexaHub I ran Alex10 with the CM19a on an old Sony laptop that was so anemic it couldn't even keep up with my slow typing. Here's my AlexaPiHub photo, I haven't touched it in almost 3 months.


Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: brobin on December 29, 2018, 01:39:49 PM
This may work, Alex10 uses the AHP SDK other have been able to run AHP under wine so it is worth a shot. However a pi zeroW may be short on the cpu power to run wine and everything Alex10 requires.
I might give it try today or tomorrow. If it at least works slowly as a proof of concept on the PiZW then I could always get a more powerful (tastier?) Pi.  I'd be testing it with a CM15 as I don't have a 19 here.
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: alzy on December 29, 2018, 02:02:22 PM
brobin,

What pI you using in your AlexaPi Hub?
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: brobin on December 29, 2018, 04:15:02 PM
Using the Pi Zero W as shown above sporting a Zebra Zero 'sandwich' case. https://goo.gl/Pr2PjN
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: alzy on December 29, 2018, 04:17:55 PM
I would like a Alex10Pi Hub . Do I have to be a linux expert to creat the image or could you talk me thru it?
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: brobin on December 29, 2018, 05:27:27 PM
Prior to setting this up I had never touched a Pi or linux. Trust me, if I could do it so can you.  That said, I think the ever prolific Mr. T is considering creating an Alexa only version of the Pi hub image if there's some interest.

Even if he doesn't, the script he created is still on his website and can be added manually.  http://forums.tuicemen.net/index.php?topic=1310.0  You'll need a Pi Zero W, power supply (a 5v 2.1a cellphone charger will do), a 4GB or larger Micro SD card and an OTG adapter (it's just an adapter to convert the CM19's USB connector to micro USB).  The only other thing you'll need is a card reader so you can set things up on the Micro SD card.

To install Raspbian Stretch w/Desktop I highly recommend this page:
https://learn.sparkfun.com/tutorials/getting-started-with-the-raspberry-pi-zero-wireless/all

There's a lot of good info worth reading but you'll want to scroll down to Install the OS Option 2.

Follow the instructions to d/l the .zip file to your PC - you don't have to unzip it.
Install Etcher from the link shown and run it.
Plug the Micro Sd card (reader) into your PC.
Select the zip file, select the drive, select Flash.
Get a cup of coffee and wait.
When it's done put the Micro Sd card in the Pi and power up.

Follow the rest of the instructions to set things up and then you'll be able to enter the script. You should be able to browse to and copy the script and then paste it into the terminal command line.  It's not difficult and we can walk you through it.




Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: alzy on December 29, 2018, 06:35:35 PM
brobin,

Thanks for the info.  Let me study it a bit to see if my Linux-adverse brain melts or not. I have done a system install before on a Pi or 2 so it should be possible. And even a little "Sudo" ing. Right now I need my Pi Z to do some testing of my Pix10Hub install.
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: alzy on December 30, 2018, 09:23:06 AM
Tuicemens's link says script no longer available. Did I miss something somewhere B:(?
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: Tuicemen on December 30, 2018, 11:11:18 AM
Tuicemens's link says script no longer available. Did I miss something somewhere B:(?
Nope, there was little to no interest in this so I didn't bother to save it.
I had thought about creating a downloadable image simular to the PiX10Hub, as this would be more a plug and play route suited to newbies. However this is low on my todo list and without much interest it likely will stay that way :(
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: alzy on December 30, 2018, 11:15:36 AM
Brobin,
Do u have a copy of the script? Can u post it? or PM it to me. -:)
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: Tuicemen on December 30, 2018, 11:27:53 AM
Brobin,
Do u have a copy of the script? Can u post it? or PM it to me. -:)
the script will not work as there are down loads from my site that are used and these no longer exist.
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: alzy on December 30, 2018, 11:50:39 AM
Maybe a generic copy of his sd card? How can I clone his setup?
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: brobin on December 30, 2018, 11:56:18 AM
I'd be happy to copy the image from my card and send it to you and/or post it for others. I just have to figure out the best way to do that. I assume that I can copy it it using RPIClone but not sure what to do next.
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: alzy on December 30, 2018, 11:59:47 AM
That would be great! Maybe the T-Man can give us some advice! B:(
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: alzy on December 30, 2018, 12:10:58 PM
Whatever u do make sure you have several working backups so we don't screw up your install!!!
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: Tuicemen on December 30, 2018, 01:00:55 PM
You can make a backup but be careful not to include any personal info.
You'd then need to shrink the image other wise it will be the size of the card.
Many email servers will not allow attachments of any where near what is required to email so you'd need to use one drive or a server.
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: brobin on December 30, 2018, 01:42:50 PM
I have it installed on a 16GB card so I guess I have to figure out how to make it smaller after I make another backup.  I do have a 4GB card if that helps in the process and from there maybe it can be shrunk - or can I achieve the same result directly from the 16GB card. I don't mind learning how to do this as I'm sure there will be other times I'll want to do this. There are lots of free places to share files up to 2GB so I guess that's the target.  Worst case, I can always make a backup and snail mail it!
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: alzy on December 30, 2018, 01:54:01 PM
Do you know how much space it really needs to install to? 2gb might actually be plenty. If we need to go the snailmail route I will could you a couple micro sds of the suitable size. There are tutorials on line on how to shrink an sd card image after it has been expanded,
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: Tuicemen on December 30, 2018, 02:12:54 PM
Actually you can create all this your self. I wrote a tutorial several months back detailing how to install HA-Bridge.
I also included how to make it work with HG or Mochad.
http://forums.x10.com/index.php?topic=30440.msg175106#msg175106
to install Mochad you can use the script posted(I believe It stillworks) Here:
http://forums.x10.com/index.php?topic=30455.msg175304#msg175304
 >!
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: alzy on December 30, 2018, 02:35:35 PM
Brobin,
Would that be the same :) your setup?
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: alzy on December 30, 2018, 02:51:42 PM
Does it support the cm19a?
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: brobin on December 30, 2018, 03:29:14 PM
If that's what T did to create the script, then yes, and yes the CM19a works flawlessly.  The only thing I added was the file to auto reconnect WiFi which I posted in the thread on his site.
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: brobin on December 31, 2018, 12:28:04 AM
@alzy & anyone else. I was able to copy the image of my Pi Alexa Hub on a 16GB card and it works. Basically it contains Raspbian Stretch w/desktop, Mochad & HA-Bridge.  Once you put in your WiFi credentials you're good to go and can edit HA-Bridge to your requirements. I don't know if it can be shrunk to 2GB or how to do it if it can. If anyone has a lead on a server I can post it to I'm happy to do that.  As a last resort I can mail one.
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: brobin on December 31, 2018, 12:34:10 AM
MyAirBridge.com will host up to a 20GB file for transfer for 2 days at no charge. Let me know if you'd like to try that.
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: alzy on December 31, 2018, 07:11:44 AM
Thanks for the effort. I would Like to try my air bridge just let me know when when how.
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: brobin on December 31, 2018, 10:48:21 AM
I need to redo the image and will try and post later today or tomorrow.
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: brobin on December 31, 2018, 12:55:41 PM
Update: The PiAlexaHub image is uploading now at the painfully slow rate available to free accounts but it's still faster than snail mail.  :'
When it's done I'll post an update or you can check from time to time yourself.  The download link is: (removed - see message below)
 At the rate that it's going it may take the rest of this year to finish.  rofl The link and file will expire in 3 days.
 The image contains exactly what is on my own PiAlexaHub with username/password defaulted to pi/raspberry.  This image has the Desktop so setting WiFi is simple.  SSH is enabled.  Let me know how it goes! Happy New Year!  >!
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: alzy on December 31, 2018, 01:10:22 PM
Thanks! I will try late today to download.
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: brobin on December 31, 2018, 01:24:35 PM
I'm simultaneously uploading to another service as well that seems MUCH faster. MyAirBridge slowed down even more and went from 7:30 remaining to 22 hours+!  Now I'm uploading to Filemail.com which is projecting completion in about 3 hours at which time the link will be furnished and I'll post it.
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: alzy on December 31, 2018, 01:35:26 PM
Super!
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: brobin on December 31, 2018, 04:13:37 PM
DONE!  :)% Here's the link - it's good for 6 days:

https://fil.email/GL7yySi2

It took about 3 1/2 hours to upload it and just 13 minutes to download, YMMV.

Hope it alls goes well!
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: alzy on December 31, 2018, 05:31:23 PM
Got it. Download took only about 30 minutes. thanks!

What do i need to know to get it running?
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: brobin on December 31, 2018, 09:47:18 PM
1. Use Etcher to install the image on a 16GB Micro Sd card.

2. Put the card in the PI, connect a monitor, keyboard and mouse (I use a Logitech K400 wireless kb/trackpad combo) and plug in the power.

3. Once you see the Pixel desktop you can click on the icon for the wifi settings in the upper right corner of the desktop (next to the Bluetooth icon) and select your router's SSID and login. 

4. Identify your Pi's IP by hovering over the WiFi indicator.
 
5. Shut down the Pi and plug the CM19 into the Pi and power it up. 

6. Use any browser to go to the Pi's IP and you should be looking at HA-Bridge. You're done!

Now go to T's page at   http://forums.tuicemen.net/index.php?topic=1310.0  and you'll find the instructions for editing HA-Bridge. I have a few things already set up so just edit them.

Easy as Pi!
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: alzy on January 01, 2019, 07:11:06 AM
Can I use a usb mouse for setup?
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: alzy on January 01, 2019, 09:24:55 AM
Trying to flash to a 16gb sd card used previously for Pix10Hub image but sketcher reports not enough room I there an easy way to fix this as it should fit on a 16gd card?
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: racerfern on January 01, 2019, 09:40:56 AM
Use an SD card formatter such as https://www.sdcard.org/downloads/formatter_4/index.html (https://www.sdcard.org/downloads/formatter_4/index.html) , after that you'll be fine.
Easy to install and use.
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: alzy on January 01, 2019, 10:11:07 AM
Did that but now says I have 14.48GB and that there is still not enough space.
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: racerfern on January 01, 2019, 10:22:01 AM
Just curious if you've tried Win32diskimager
https://sourceforge.net/projects/win32diskimager/files/latest/download (https://sourceforge.net/projects/win32diskimager/files/latest/download)

Other than that I don't know what to say.
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: alzy on January 01, 2019, 10:36:36 AM
Tried Aomei Partition assistant and still get only about 14.4 gb. What's with that?
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: racerfern on January 01, 2019, 10:42:23 AM
It doesn't surprise me that a 16gb card yields less than 16gb, however the img you're trying to install should be substantially smaller than that.

Have you tried a full format as opposed to a quick format?
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: alzy on January 01, 2019, 10:45:57 AM
Yes I did. My research says this is about normal for a 16 gb card. So the image won't fit. It looks like Aomei removed all partitoning and that's what I ended up with so can't use this card.
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: brobin on January 01, 2019, 10:56:56 AM
Close but so far. The image is 14.52. Do you have a brand new card? A larger card will work too.
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: alzy on January 01, 2019, 11:00:03 AM
No I will have to get one. Oh is there a way to get up and running without mouse/ keyboard and monitor?
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: brobin on January 01, 2019, 11:04:34 AM
You only need to do that to put in your set up your wifi. You can do a headless setup but I think you still need a kb & monitor or tv.
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: alzy on January 01, 2019, 11:08:19 AM
Ok thanks. Looks like I'll have to get some stuff together.
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: brobin on January 01, 2019, 01:35:51 PM
Take a look at this, it may get you started without the kb and monitor. https://core-electronics.com.au/tutorials/raspberry-pi-zerow-headless-wifi-setup.html Also, have you tried installing the image with Etcher on the 16GB card you have? Windows doesn't always show the total available on the card. Can't hurt to try.
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: brobin on January 01, 2019, 01:51:35 PM
Here's another good tutorial on setup without kb & monitor:  https://learn.adafruit.com/raspberry-pi-zero-creation/text-file-editing
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: alzy on January 01, 2019, 02:01:32 PM
Thanks! I will look at those tut's. Yes I used etcher. It would not Flash cuze of not enough space.
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: alzy on January 01, 2019, 03:01:54 PM
Is this the OS on ur image?

Raspbian Stretch lite OS
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: brobin on January 01, 2019, 05:15:30 PM
No, it's Raspbian Stretch with Desktop because that includes Java which is needed for HA-Bridge.
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: alzy on January 02, 2019, 08:22:44 AM
I ordered a larger card. Would be nice to have a non-linux way of shrinking an image.
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: brobin on January 02, 2019, 10:56:26 AM
Having nothing special to do on New Year's Day, I tried running Alex10 on the PiZW using Exagear and Wine but the PiZW just doesn't have the horsepower to run it. Exagear installed easily but Wine took 6+ hours to install.  B:( Then I installed Winefile and was able to install Alex10 - slowly.  It did install but when I tried to run it Wine said that it couldn't find Mono.  Further research took me deeper down the rabbit hole of more things to install at which point I'd had enough.  So no Alex10 for the Pi for now.  The PiAlexaHub does the job just fine though so no big deal.
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: alzy on January 02, 2019, 10:59:23 AM
Thanks for the info. When my larger sd card arrives I will attempt the Alexahub headless.
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: brobin on January 02, 2019, 01:35:41 PM
I wanted to see if the image I created could be set up headless but Windows won't recognize the card so there's no way I can see to add the wpa.supplicant.conf file before booting it on the Pi.  The easiest thing would be to use an HDMI cable to connect to a monitor or TV and a USB keyboard (no mouse needed).  Then you could power up and go through the wifi configuration. Once done, you can shutdown, remove the HDMI cable and keyboard and then power up with just the CM19a plugged in. Then you should be able to open HA-Bridge from a browser.
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: alzy on January 02, 2019, 01:41:54 PM
Thanks for trying! I have a 32gb sd on order and a hdmi adapter on order. When they arrive I will give it a try With
kb and monitor.
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: alzy on January 02, 2019, 02:19:09 PM
Have u thought about trying this??
https://www.howtogeek.com/249966/how-to-install-and-use-the-linux-bash-shell-on-windows-10/
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: brobin on January 02, 2019, 02:46:06 PM
Interesting, didn't even know it was there. Maybe you could give that a try although if you have the HDMI adapter coming and a kb I think that will be MUCH easier.
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: alzy on January 02, 2019, 02:51:49 PM
Yeh, it could be very handy for resizing sd card images and making images headless.
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: brobin on January 02, 2019, 03:00:04 PM
Sounds like you're volunteering for a project!  rofl :)%
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: alzy on January 03, 2019, 06:21:12 AM
Well I was able to get Ubuntu running as an add in feature to win10. Easy Peasy. So now i just need to learn linux!!!
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: brobin on January 03, 2019, 10:08:51 AM
Well I was able to get Ubuntu running as an add in feature to win10. Easy Peasy. So now i just need to learn linux!!!

There goes 'Easy Peasy!'  :'  rofl

Seriously, I'd like to know how it goes.  BTW, the only reason that the image I posted is 14.5 GB is that I originally installed everything on a 16GB card that I had on hand. It would have easily fit on an 8 or even a 4.  As my first foray into the world of Pi and linux, I didn't know that backing up an image requires that all the unused space on a card be included in the backup or I would have chosen more wisely.  B:(
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: alzy on January 03, 2019, 10:10:34 AM
So this is all ur FAULT! B:(
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: brobin on January 03, 2019, 10:20:56 AM
So this is all ur FAULT! B:(
Absolutely! >!
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: alzy on January 03, 2019, 10:26:21 AM
Its gonna take more than 1 beer to get me thru this... >! >! >! >! >! >! >! >! >! >! >! >! >!
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: brobin on January 03, 2019, 10:34:31 AM
After all those you won't care! :o
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: alzy on January 03, 2019, 11:24:06 AM
That's the IDEA! rofl
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: alzy on January 03, 2019, 01:42:39 PM
Well I am stuck. Can't figure out how to get pishrink working in my ubuntu terminal window. Even with all my googling. I am not sure there are enough  >! on the planet.
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: brobin on January 03, 2019, 04:56:35 PM
What were you saying about Easy Peasy?  B:(
Title: Re: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: racerfern on January 03, 2019, 06:42:26 PM
@alzy - I thought you ordered a larger card.
Title: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: alzy on January 05, 2019, 06:07:13 AM
racerfern-I did just wanted to try an alternative solution.
Title: Re: Alex10 (x10 control with Amazon echo, dot or tap)
Post by: alzy on January 05, 2019, 02:29:53 PM
Well I couldn't figure out how to shrink brobin's image and my 32gb card arrived, so I used it. I know overkill! But, now with brobin's help and infinite patience, I have a PiAlexaHub running on my Pi Zero W with a cm19a interface! The only change I made to the image was to add a wpa_supplicant.config file once the image was written to give me headless setup. As brobin reported, It handles the cm19a well. I have a 2.5 A Pi supply.
Brobin, thanks again! :)% >!