more G-Labs products

Author Topic: Control Alpha Smart Home remote controller (8 relay) via TCP/IP help  (Read 2443 times)

January 30, 2015, 10:22:37 PM
Read 2443 times

KaZe

  • ****
  • Information
  • Sr. Member
  • Posts: 219
Hi!

I'm looking for help, to control my Alpha Smart Home remote controller (http://www.alphachn.com/products.asp?id=134)
I have a description of the controller and the driver source code has (java). I realized that what I HEX code relays turn on and turn off, and the status of their query. Unfortunately, I can not really programmed .. :(
I would like to relay switch ports as being displayed on the surface HomeGenie. And the buttons (switch) status are updated every 2 seconds, because I can control the relays outer wall switch, so the status is not sure that's what was configured with the HomeGenie.
« Last Edit: March 11, 2015, 09:19:26 PM by KaZe »

January 30, 2015, 11:34:19 PM
Reply #1

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
I don't want to tell anyone what they should or should not do, but this device seems VERY pricey at $400USD + $75 (S&H).  It is a network controllable 8 relay device which could be useful, but it seems to me that someone could build the same thing with an Arduino, some relays, a network shield, and a bit of time to build the code.  Again, I know nothing about this device, but the Arduino solution would most certainly cost far less than $100USD shipped.

January 31, 2015, 12:53:24 AM
Reply #2

enterprised

  • ****
  • Information
  • Sr. Member
  • Posts: 101
  • Things are only impossible until they are not
Raspberry Pi B+ ; 8 relay module ; some transistors and resistors ; a bit of fun assembling = $75 for a homemade solution capable of the same and much more.

See: http://www.homegenie.it/forum/index.php?topic=594.0
4a 75 73 74 20 61 20 70 65 72 73 6f 6e 20 68 61 76 69 6e 67 20 66 75 6e 20 77 69 74 68 20 68 6f 6d 65 20 61 75 74 6f 6d 61 74 69 6f 6e
enterprised == guytpetj

January 31, 2015, 10:24:00 AM
Reply #3

KaZe

  • ****
  • Information
  • Sr. Member
  • Posts: 219
I bought on eBay for $ 3. :) Now also available for $ 100 on eBay, and it can be controlled by a wall switch. As I know the arduino's relay can not. So in case of any problem in the network (or rasperry pi damaged), I can manually controll lamps (relays) with this device.
« Last Edit: January 31, 2015, 12:30:43 PM by KaZe »

January 31, 2015, 06:21:58 PM
Reply #4

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
At $3, definitely worth it!  The raspi solution would work too, I was thinking smaller/simpler but arduino isn't necessaily either of those or even better these days.

February 08, 2015, 11:10:45 PM
Reply #5

KaZe

  • ****
  • Information
  • Sr. Member
  • Posts: 219
This is the relay01 port switch on command:

Code: [Select]
    byte[] relay01on = new byte[] {85,170,170,170,170,170,3,6,128,0,0,0,0,0,48,22};
    TcpClient.SendMessage(relay01on);

and this is relay01 port switch off command:
Code: [Select]
byte[] relay01off = new byte[] {85,170,170,170,170,170,3,6,144,0,0,0,0,0,64,22};
    TcpClient.SendMessage(relay01off);

How can I add the relay01 to switch module? And, how can I control the relay01 with switch module  on / off button?

Thanks for the help!

March 11, 2015, 09:18:33 PM
Reply #6

KaZe

  • ****
  • Information
  • Sr. Member
  • Posts: 219
The samples of these forum, I wrote the program.
The program code is not the "best", but it works. :)
I attach the code. If someone might want to use such a device, you will be able to control it.

Even I have a question that I could not even solve.

How do I set up a TCP connection timeout? For example, if the device breaks the network for about 1 minute, then the program can not connect to it automatically back then, only if I restart.

May 02, 2015, 12:56:48 PM
Reply #7

KaZe

  • ****
  • Information
  • Sr. Member
  • Posts: 219
Unfortunately, the program gradually take the memory. What can it be?
If the program is not running, the Homegenie use 50 megabytes of memory.
When running, it is increasing the memory usage:

2015.04.21 20.48   36.1 MB
2015.04.22 07:38   195 MB
2015.04.22 08:06   262 MB
2015.04.22 14:06   313 MB
....
« Last Edit: May 03, 2015, 10:18:00 AM by KaZe »