Author Topic: Z-wave devices control from NAS or router  (Read 60831 times)

LA

  • Regular Poster
  • **
  • Posts: 26
    • View Profile
Z-wave devices control from NAS or router
« on: June 21, 2010, 10:24:59 pm »
Hello!

I have NAS Synology DS210j and router Asus RT-n16.
Is there any way to install that part of LinuxMCE, which is responsible for z-wave devices control, on one of them?

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: Z-wave devices control from NAS or router
« Reply #1 on: June 21, 2010, 11:39:48 pm »
No. LinuxMCE's feature set is much larger than you think.

-Thom

Marie.O

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 3676
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: Z-wave devices control from NAS or router
« Reply #2 on: June 22, 2010, 12:12:06 am »
Hello!

I have NAS Synology DS210j and router Asus RT-n16.
Is there any way to install that part of LinuxMCE, which is responsible for z-wave devices control, on one of them?

you might want to look into micasa verde vera

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: Z-wave devices control from NAS or router
« Reply #3 on: June 22, 2010, 10:04:42 am »
Hello!

I have NAS Synology DS210j and router Asus RT-n16.
Is there any way to install that part of LinuxMCE, which is responsible for z-wave devices control, on one of them?

I'm not aware of the specs for those devices but the parts of LinuxMCE responsible for Z-Wave run fine on an ARM 400mhz cpu with 64mb of ram.

look here: http://svn.linuxmce.org/svn/people/hari/mini/

best regards,
Hari
rock your home - http://www.agocontrol.com home automation

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: Z-wave devices control from NAS or router
« Reply #4 on: June 22, 2010, 10:05:38 am »
another option would be to use OpenZwave, it is derived from our driver.

br Hari
rock your home - http://www.agocontrol.com home automation

LA

  • Regular Poster
  • **
  • Posts: 26
    • View Profile
Re: Z-wave devices control from NAS or router
« Reply #5 on: June 22, 2010, 05:30:55 pm »
Quote
you might want to look into micasa verde vera
I would prefer to use existing hardware instead of buying new one (vera1 is based on asus wl500g, which quite similiar to asus rt-n16).

Quote
I'm not aware of the specs for those devices but the parts of LinuxMCE responsible for Z-Wave run fine on an ARM 400mhz cpu with 64mb of ram.
look here: http://svn.linuxmce.org/svn/people/hari/mini/
Thanks, Hari.
Synology DS210j has 800MHz Marvell Kirkwood mv6281 ARM Processor, 128MB of RAM;
Asus RT-N16 has 480Mhz BCM4718, 128MB DDR2 RAM.

Is there any documentation about mini part of LinuxMCE? How should I install and use it? Just copy all files from the Installer folder to the device and run mini-install.sh? Will it install some web-server, where I will be able to control my devices?

upd. found some instruction here. But looks like now I don't need to compile it, since installer is available... Anyway, would appreciate if somebody provides me with more detailed guide.

btw, will it work with this USB device - Leviton ControlThink CTZUS-1EU?

Quote
another option would be to use OpenZwave
are you talking about this openZwave? It looks like tool for the developers. Don't see any binary files there...
« Last Edit: June 22, 2010, 05:49:38 pm by LA »

LA

  • Regular Poster
  • **
  • Posts: 26
    • View Profile
Re: Z-wave devices control from NAS or router
« Reply #6 on: June 22, 2010, 09:11:29 pm »
I've found a document, which describes how applications should be compiled for my Synology DS210j.

In accordance with this document I should configure software:
Code: [Select]
# env CC=/usr/local/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-gcc \
LD=/usr/local/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-ld \
RANLIB=/usr/local/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-ranlib \
CFLAGS="-I/usr/local/arm-none-linux-gnueabi/include" \
LDFLAGS="-L/usr/local/arm-none-linux-gnueabi/lib" \
./configure \
--host=armle-unknown-linux \
--target=armle-unknown-linux \
--build=i686-pc-linux \
--prefix=/usr/local
I input this into terminal and getting error that ./configure: No such file or directory. I tried to run it from the folder /usr/local/arm-none-linux-gnueabi. I've also installed autoconf package.

Can somebody please help me with this? Never was compiling C (?) applications before.

PS. Tool chain is at /usr/local/arm-none-linux-gnueabi/ and sources are at /usr/tmp/harimini/.
« Last Edit: June 22, 2010, 10:08:55 pm by LA »

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: Z-wave devices control from NAS or router
« Reply #7 on: June 23, 2010, 11:01:26 am »
Hi LA,

there is no autoconf/configure script. Use the Makefile in the src/ directory. When you look at it you'll see some definitions on top that I've used with the openembedded cross compiler. Make sure that your toolchain includes headers/libs for mysql, libattr and libxml2.

br Hari
rock your home - http://www.agocontrol.com home automation

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: Z-wave devices control from NAS or router
« Reply #8 on: June 23, 2010, 11:03:45 am »
btw, the controlthink stick is not supported. Regarding "Will it install some web-server, where I will be able to control my devices?": yes, it comes with a RPC plugin. You can query status and send commands via http.

br Hari
rock your home - http://www.agocontrol.com home automation

LA

  • Regular Poster
  • **
  • Posts: 26
    • View Profile
Re: Z-wave devices control from NAS or router
« Reply #9 on: June 23, 2010, 12:18:59 pm »
Thanks, Hari!
But if I compile it with usage of existing makefile, then it will be compiled for another ARM processor, willn't it?
Probably I should try to use already compiled version first? But where can I take it? (installer folder has something...).

And, which url should I access to send commands thru http?

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: Z-wave devices control from NAS or router
« Reply #10 on: June 23, 2010, 12:27:25 pm »
of course you need to adjust the Makefile for your specific arm architecture/cross compiler. The RPC plugin will listen on 8088. More information here: http://svn.linuxmce.org/trac.cgi/browser/branches/LinuxMCE-0810/src/RPC_Plugin/RPC_Plugin.cpp

br Hari
rock your home - http://www.agocontrol.com home automation

LA

  • Regular Poster
  • **
  • Posts: 26
    • View Profile
Re: Z-wave devices control from NAS or router
« Reply #11 on: June 23, 2010, 07:09:13 pm »
Looks like my toolchain doesn't have headers/libs for mysql, libattr and libxml2. Where can I download it?
May I use for libxml2 these files? Where should I put them?
« Last Edit: June 23, 2010, 07:23:30 pm by LA »

LA

  • Regular Poster
  • **
  • Posts: 26
    • View Profile
Re: Z-wave devices control from NAS or router
« Reply #12 on: June 25, 2010, 07:23:01 pm »
Hi Hari,
sorry for bothering you with such questions...

Could you please help me either to
1) create configure file for your application OR
2) choose right values for parameters -march= and -mtune

(I've installed the following packages: g++, libmysqlclient15-dev, libattr1-dev, libxml2-dev - looks like now I have all headers needed)

Tried to compile it as:
Quote
make CC=arm-none-linux-gnueabi-gcc ARCH=armс
got the following error:
Quote
arm-none-linux-gnueabi-gcc -Wall -fPIC -ggdb3 -c mongoose.c
g++ -shared -o RPC_Plugin.so Main.o RPC_Plugin.o ../Gen_Devices/RPC_PluginBase.o mongoose.o  -L../lib   -lSerializeClass -lDCECommon -lPlutoUtils -lpthread -ldl -lpluto_main
/usr/bin/ld: mongoose.o: Relocations in generic ELF (EM: 40)
/usr/bin/ld: mongoose.o: Relocations in generic ELF (EM: 40)
/usr/bin/ld: mongoose.o: Relocations in generic ELF (EM: 40)
/usr/bin/ld: mongoose.o: Relocations in generic ELF (EM: 40)
/usr/bin/ld: mongoose.o: Relocations in generic ELF (EM: 40)
/usr/bin/ld: mongoose.o: Relocations in generic ELF (EM: 40)
/usr/bin/ld: mongoose.o: Relocations in generic ELF (EM: 40)
/usr/bin/ld: mongoose.o: Relocations in generic ELF (EM: 40)
mongoose.o: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
make[1]: *** [RPC_Plugin.so] Error 1
make[1]: Leaving directory `/usr/local/arm-none-linux-gnueabi/bin/harimini/RPC_Plugin'
make: *** [plugins] Error 2

« Last Edit: June 25, 2010, 07:58:39 pm by LA »

valent

  • Guru
  • ****
  • Posts: 381
    • View Profile
    • /kernel_reloaded/
Re: Z-wave devices control from NAS or router
« Reply #13 on: June 26, 2010, 08:25:52 pm »
LA as you are figuring this out we would really welcome that you document it on the wiki so if anybody else comes with similar request that there is already some info for others.

Cheers.
LinuxMCE - If it was easy, everybody would be doing it!!
My setup - http://wiki.linuxmce.org/index.php/User:Valent

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: Z-wave devices control from NAS or router
« Reply #14 on: June 27, 2010, 01:01:18 pm »
2) choose right values for parameters -march= and -mtune

that really depends on the hardware you want to use. The values in the Makefile were chosen for the mini2440 arm platform. You need to figure out the proper values for your router.

Quote
(I've installed the following packages: g++, libmysqlclient15-dev, libattr1-dev, libxml2-dev - looks like now I have all headers needed)
be aware that you need the headers/libs for the target architecture, not for the host were you are running the cross compilation

Quote
Tried to compile it as:
Quote
make CC=arm-none-linux-gnueabi-gcc ARCH=armс
got the following error:
Quote
arm-none-linux-gnueabi-gcc -Wall -fPIC -ggdb3 -c mongoose.c
g++ -shared -o RPC_Plugin.so Main.o RPC_Plugin.o ../Gen_Devices/RPC_PluginBase.o mongoose.o  -L../lib   -lSerializeClass -lDCECommon -lPlutoUtils -lpthread -ldl -lpluto_main
/usr/bin/ld: mongoose.o: Relocations in generic ELF (EM: 40)
/usr/bin/ld: mongoose.o: Relocations in generic ELF (EM: 40)
/usr/bin/ld: mongoose.o: Relocations in generic ELF (EM: 40)
/usr/bin/ld: mongoose.o: Relocations in generic ELF (EM: 40)
/usr/bin/ld: mongoose.o: Relocations in generic ELF (EM: 40)
/usr/bin/ld: mongoose.o: Relocations in generic ELF (EM: 40)
/usr/bin/ld: mongoose.o: Relocations in generic ELF (EM: 40)
/usr/bin/ld: mongoose.o: Relocations in generic ELF (EM: 40)
mongoose.o: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
make[1]: *** [RPC_Plugin.so] Error 1
make[1]: Leaving directory `/usr/local/arm-none-linux-gnueabi/bin/harimini/RPC_Plugin'
make: *** [plugins] Error 2


[/quote]
you are mixing arm with intel binaries, that is the reason why you get the elf relocation error. This line is probably not what you want:

Quote
g++ -shared -o RPC_Plugin.so Main.o RPC_Plugin.o ../Gen_Devices/RPC_PluginBase.o mongoose.o  -L../lib 

it should read arm-none-linux-gnueabi-g++, not g++. You seem to still lack some defines in the Makefiles for the cross compiler.

br Hari
rock your home - http://www.agocontrol.com home automation