Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Request] openzwave for domoticz #1478

Closed
remy3885 opened this issue Feb 8, 2015 · 289 comments
Closed

[Request] openzwave for domoticz #1478

remy3885 opened this issue Feb 8, 2015 · 289 comments
Labels
request request for new package

Comments

@remy3885
Copy link

remy3885 commented Feb 8, 2015

Domoticz package does not contain native Openzwave which prevented me to recognize a usb stick Zwave . Can be integrate Openzwave to domoticz package or create a Openzwave package?

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@Decipher
Copy link
Contributor

Decipher commented Feb 9, 2015

While I have not yet got my Z-stick, I have begun looking into this. Based on the documentation so far I hope this is relatively achievable. If not, I will document what I am able to do.

@remy3885
Copy link
Author

remy3885 commented Feb 9, 2015

if you can install on Synology openzwave and operate a zstick 2 , give me the procedure...

@Decipher
Copy link
Contributor

Decipher commented Feb 9, 2015

The plan is to not need a procedure, the plan is to have it just part of the SPK. However, I need to re-install my Syno dev environment as my old one is too old.

I have had what looks like reasonable success compiling openzwave, but I have not yet confirmed that it is built correctly (hence environment). I will be continuing my investigation today.

@remy3885
Copy link
Author

remy3885 commented Feb 9, 2015

OK tell me when you have managed your compilation and will be available when a spk I'm interested

@remy3885
Copy link
Author

have you advanced in your compilation?

2015-02-09 23:51 GMT+01:00 Stuart Clark notifications@github.com:

The plan is to not need a procedure, the plan is to have it just part of
the SPK. However, I need to re-install my Syno dev environment as my old
one is too old.

I have had what looks like reasonable success compiling openzwave, but I
have not yet confirmed that it is built correctly (hence environment). I
will be continuing my investigation today.


Reply to this email directly or view it on GitHub
#1478 (comment)
.

@Decipher
Copy link
Contributor

I know you're keen, I am too, but I have no idea when it's going to be done. I did make some more headway yesterday, so much so that when compiling Domoticz it sees the Openzwave library, but it can't link it due to a possible incorrect compilation of Openzwave. A lot of what I'm doing is just guess work, as I'm not an expert in this sort of thing.

Regardless, I do plan to put what I've done so far into a branch so that others can continue the work concurrently, I just want to re-roll a patch for Domoticz before I do that.

@Decipher
Copy link
Contributor

I did however just receive my Z-Stick, so I do have more incentive now :)

@remy3885
Copy link
Author

Ok very well. Sorry can't help you I don't know much.

2015-02-11 1:27 GMT+01:00 Stuart Clark notifications@github.com:

I did however just receive my Z-Stick, so I do have more incentive now :)


Reply to this email directly or view it on GitHub
#1478 (comment)
.

@Decipher
Copy link
Contributor

Initial commit made, it's just for the openzwave library. I also have some changes for Domoticz I need to push, but I need to re-roll a patch before I do that. This is not something that is compilable yet. Just so if others wish to help they can.

@Decipher Decipher mentioned this issue Feb 11, 2015
@Decipher
Copy link
Contributor

Not working yet. the main issues are:

  • Unable to compile Openzwave in 64bit (not sure what flags required)
  • The following errors:
    • /home/stuart/spksrc/toolchains/syno-qoriq-5.1/work/powerpc-none-linux-gnuspe/bin/../lib/gcc/powerpc-none-linux-gnuspe/4.3.2/../../../../powerpc-none-linux-gnuspe/bin/ld: /home/stuart/spksrc/cross/domoticz/work-qoriq-5.1/open-zwave-read-only/libopenzwave.a(Manager.o): Relocations in generic ELF (EM: 3)
    • /home/stuart/spksrc/cross/domoticz/work-qoriq-5.1/open-zwave-read-only/libopenzwave.a: could not read symbols: File in wrong format

@Decipher
Copy link
Contributor

Upon further digging/scouring google for help, I finally determined that the cause of the issue is related to the compiling of libopenzwave.a, as it's objects are definitely in the wrong format:

OpenZWave objects are: ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV), not stripped

Other library objects are: ELF 32-bit MSB relocatable, PowerPC or cisco 4500, version 1 (SYSV), with unknown capability 0x41000000 = 0x13676e75, with unknown capability 0x10000 = 0xb0402, not stripped

I now know how to test to ensure it's the right format, not I just need to figure out how to ensure it is the right format.

@Decipher
Copy link
Contributor

So I have now successfully cross compiled both openzwave and domoticz with openzwave support using the qoriq architecture (as that's what I own). I still need to wrap it all up in a SPK and test it, but very positive.

@Decipher
Copy link
Contributor

So I have a SPK running on my NAS, and the OpenZWave USB device is available, but I am getting the following error on run:

Error: OpenZWave: Driver Failed!!

So not quite there, yet, but getting close. It would be super helpful if someone else was able to weigh in on this though.

@Decipher
Copy link
Contributor

I don't know how much more I can do, it now compiles and is able to create a SPK with OpenZWave support, and you are able to choose 'OpenZWave USB' on the Hardware setup screen, but still getting the Driver Failed!! error. It's possibly something as simple as missing dependencies in the package, but I don't know enough to determine this for sure, although I will test that theory tomorrow.

@Decipher
Copy link
Contributor

Confirmed it builds on 64-bit architectures as well (Bromolow 5.1 for my XPEnology VM).

No more for tonight.

@remy3885
Copy link
Author

I installed "usb serial drivers". The spk is on Synology website.

2015-02-12 13:07 GMT+01:00 Stuart Clark notifications@github.com:

Confirmed it builds on 64-bit architectures as well (Bromolow 5.1 for my
XPEnology VM).

No more for tonight.


Reply to this email directly or view it on GitHub
#1478 (comment)
.

@Decipher
Copy link
Contributor

That won't give you the ability to use ZWave though, as without the openzwave
library (what I've compiled) Domiticz disables that functionality. Our did you mean something else? I'm unsure of the relevance of the comment.

@Decipher
Copy link
Contributor

I tracked down the SPK you where referring to, it shouldn't be necessary as the SPK you can get from compiling from my branch will enable the relevant USB side of things in the same way (I assume) that that SPK does. The only problem left is the OpenZWave driver failing, which I'm unsure of how to debug.

@Decipher
Copy link
Contributor

@remy3885, I have to apologize for my snappiness last night, because if it wasn't for your comment I wouldn't currently have a successful connection to my OpenZWave USB device.

The problem was one missing kernel mod, that was in the USB drivers package from http://www.domoticz.com/forum/viewtopic.php?t=2620.

I will try to track down the source for the USB drivers package as baking the missing kernal mod into this SPK will make for a nice easy one-click install of Domoticz with OpenZWave support.

Let me know your Syno architecture and I'll compile a SPK for you.

@Decipher
Copy link
Contributor

Looks like spksrc has support for cross compiling kernel modules, so once I wrap my head around it it should resolve the last outstanding issue, then we can wrap this up and get a PR done. Getting very close.

@remy3885
Copy link
Author

I'm glad to have served at least a little bit. I have a DS213j with
Marvell Armada 370

2015-02-14 5:24 GMT+01:00 Stuart Clark notifications@github.com:

Looks like spksrc has support for cross compiling kernel modules, so once
I wrap my head around it it should resolve the last outstanding issue, then
we can wrap this up and get a PR done. Getting very close.


Reply to this email directly or view it on GitHub
#1478 (comment)
.

@Decipher
Copy link
Contributor

I'll also need to know what version you're on, especially for the last bit I'm currently working on: 4.3, 5.0 or 5.1?

I can probably build you a SPK today that will require the USB Drivers that you've already got, or hopefully by tomorrow with out the need of the USB Drivers SPK.

Currently waiting for a very large download on a very slow internet connection before I can proceed any further.

@remy3885
Copy link
Author

Ok sorry, my DSM version is 5.1-5022 update 2.

2015-02-14 6:31 GMT+01:00 Stuart Clark notifications@github.com:

I'll also need to know what version you're on, especially for the last bit
I'm currently working on: 4.3, 5.0 or 5.1?

I can probably build you a SPK today that will require the USB Drivers
that you've already got, or hopefully by tomorrow with out the need of the
USB Drivers SPK.

Currently waiting for a very large download on a very slow internet
connection before I can proceed any further.


Reply to this email directly or view it on GitHub
#1478 (comment)
.

@Decipher
Copy link
Contributor

@remy3885 https://dl.dropboxusercontent.com/u/1804559/domoticz_armada370-5.1_2.0.2112-5.spk

It's still uploading (at the time of writing this), but should be done soon. This version assumes you've installed the cp210x driver via the USB Drivers 3.0.2 package.

I've tested a qoriq-5.1 version of this with a Z-Stick S2 and it worked fine, let me know how it goes for you, and if you do have any issues, let me know what hardware you are working with.

@Decipher
Copy link
Contributor

Actually, you don't even need choose the cp210x driver in USB Drivers, just having the package installed is enough.

@remy3885
Copy link
Author

thank you I'll test it on my way home . I'll keep you informed of the progress .

2015-02-14 10:32 GMT+01:00 Stuart Clark notifications@github.com:

Actually, you don't even need choose the cp210x driver in USB Drivers,
just having the package installed is enough.


Reply to this email directly or view it on GitHub
#1478 (comment)
.

@Decipher
Copy link
Contributor

And success. Commits and PR coming soon, but there is now OpenZWave support for Domoticz without any need for the USB Serial Drivers SPK or any annoying messing around.

@basbl
Copy link

basbl commented Feb 14, 2015

@Decipher, could I trouble you for an .spk as well? I have a qoriq ds413 on DSM5.1-5022 Update 2.

Will receive an Aeon Z stick today, so would be greatly helped :-)!

@mvveelen
Copy link

So this is the real thing :) ?

Great work, again ! I'll update as soon as I get back 👍

@gerard33
Copy link

@Jumbotroll Thanks for all your effort in making these packages available for Synology.

Gizmocuz just released 2.0.2563 as a stable release, http://sourceforge.net/p/domoticz/code/2563/?utm_source=Domoticz+SourceForge&utm_medium=twitter&utm_campaign=Code.
So you were just a bit too early with 2.0.2562 ;-)

Could you compile this stable version? Thanks!

@steef84
Copy link

steef84 commented Jun 15, 2015

Just installed qoriq 2563. Cant start the package though.
domoticz.log
/usr/local/domoticz/bin/domoticz: /lib/libc.so.6: version GLIBC_2.9' not found (required by /usr/local/domoticz/bin/domoticz) /usr/local/domoticz/bin/domoticz: /lib/libstdc++.so.6: versionGLIBCXX_3.4.11' not found (required by /usr/local/domoticz/bin/domoticz)
/usr/local/domoticz/bin/domoticz: /lib/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by /usr/local/domoticz/bin/domoticz)

@gkroone
Copy link

gkroone commented Jun 15, 2015

Thanks Steef.

I assume you're on DSM5.2?

I suspect I need to pick another toolchain from the following site for qoriq:

http://sourceforge.net/projects/dsgpl/files/DSM%205.2%20Tool%20Chains/PowerPC%20QorIQ%20Linux%202.6.32/

There's 3 to choose from, and I now just gambled and picked the top one...

If you could feed back the output of the following command on your systemfrom commandline:

it should give output similar to below on my DSM5.1 nas:
nas> /lib/libc.so.6
GNU C Library stable release version 2.13, by Roland McGrath et al.
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 4.6.3.
Compiled on a Linux 3.6.3 system on 2012-12-03.
Available extensions:
crypt add-on version 2.1 by Michael Glad and others
Native POSIX Threads Library by Ulrich Drepper et al
BIND-8.2.3-T5B
libc ABIs: UNIQUE IFUNC
For bug reporting instructions, please see:
http://www.gnu.org/software/libc/bugs.html.

@steef84
Copy link

steef84 commented Jun 15, 2015

True im on 5.2.5565 update 1. Update 2 is awaiting but not applied yet..

Output is as follows:

diskstation> /lib/libc.so.6
GNU C Library stable release version 2.8, by Roland McGrath et al.
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 4.3.2.
Compiled on a Linux >>2.4.18-3<< system on 2009-11-11.
Available extensions:
crypt add-on version 2.1 by Michael Glad and others
GNU Libidn by Simon Josefsson
Native POSIX Threads Library by Ulrich Drepper et al
Support for some architectures added on, not maintained in glibc core.
BIND-8.2.3-T5B
For bug reporting instructions, please see:
http://www.gnu.org/software/libc/bugs.html.
diskstation>

Will report more if necessary...

@gkroone
Copy link

gkroone commented Jun 15, 2015

@steef84 , I suspect I have set the minimum firmware version to DSM5.0 instead of DSM5.2, so really interrested to see if you are indeed running DSM5.2 or still on a lower DSM version.

If you're not on DSM5.2 and unable to upgrade at this time, you'll probably need to compile it with your current NAS firmware toolchain set in local.mk.

@gkroone
Copy link

gkroone commented Jun 15, 2015

ok, so you're indeed on DSM 5.2 and they are sticking with glibc2.8 there. I would have expected synology to use latest one.

I've committed the switch back to glibc 2.8

@steef84
Copy link

steef84 commented Jun 15, 2015

@gkroone qoriq arch is not the best arch to own for a Syno, but thanks to your switch back to older glibc and @Jumbotroll for the compilation I now running 2563! Thanks both 👍

@gerard33
Copy link

@Jumbotroll Thanks for the 2563 version 👍

Just installed it an it's working okay. One minor issue, the folder for the scripts is not present.
The following error is in the log:
Error: EventSystem: Error accessing lua script directory /usr/local/domoticz/var/scripts/lua/

I manually added the scripts/lua folder and copied my lua scripts.
There is a folder samplescripts present with the lua demo scripts and the python scripts. Maybe that folder was intented to be copied to var/scripts?

@gkroone
Copy link

gkroone commented Jun 17, 2015

I just upgraded my NAS to DSM5.2 and installed the ne wDSM5.2 package. I noticed I had to run "udevadm control --reload-rules" and unplug/plug my usb serial device in order to have it get the correct permissions(666). Did anyone else notice something similar, or noticed they had to reboot before serial devices got proper permissions after a reboot? If anyone else had this, I might need to add the above command into the package scripts...

@Speedliner
Copy link

are there any chances on an new evansport version? also an version for DSM5.2 would be nice!

@jorikcaljouw
Copy link
Contributor

Looks like a typo?: 1686 should be i686 no idea where that is defined though ;-)

@Diaoul
Copy link
Member

Diaoul commented Jun 18, 2015

Can we have a PR for this? Spreading unreviewed packages is strongly disencouraged.

@Speedliner
Copy link

Thanks @Jumbotroll ! keep up the good work :-)

@Speedliner
Copy link

That's sad. Can't get the official syncommunity package running on my ds415play. @Jumbotroll can you give me a dropbox link (or something like that) to your latest evansport version (incl. usb drivers)?

@gkroone
Copy link

gkroone commented Jun 18, 2015

@Diaoul, PR is being worked on but seems like @Decipher doesn't have time to work on this.

I suggested this morning to open another PR directly to synocommunity/spksrc instead of decipher's repo.

@Diaoul
Copy link
Member

Diaoul commented Jun 18, 2015

I agree, open directly the PR here.

@gkroone gkroone mentioned this issue Jun 19, 2015
@gkroone
Copy link

gkroone commented Jun 19, 2015

PR opened as per above. #1766

@gkroone
Copy link

gkroone commented Jun 22, 2015

I removed my previous fork and submitted a new PR: #1769

@mvveelen
Copy link

Just installed DomoticzV2.2585 from Jumbotroll's repo on my DS414 with DSM 5.2 and it works fine. Seems a bit faster, smoother too. Wanted to let him know by DM on Domo forum, but that has been disabled atm. Thanks Jumbotroll !

@Schim9
Copy link

Schim9 commented Jun 25, 2015

Hi all,

It has been several days I am testing a ZWave controller (Aeon Labs Z-Stick S2) with a Fibaro FGS-211 and a Vision ZG8101 (garage door sensor).
My system :

  • NAS Synology DS410J
  • DSM 5.0-4493
  • Domoticz v 2.0.2514-18

First, everything works well. I can retrieve the status of my Fibaro and my Vision garage door sensor. After a couple of days, Domoticz does not receive any information from my ZWave devices.
I have to:

  • stop Domoticz,
  • execute "chmod 777 /dev/ttyUSB1" command (since from the version 2514, several USB devices are created but do not get valid access rights)
  • restart the package.

I have also plugged a RFXTRX433E on my NAS and the latter works correctly for one year controlling my SOMFY blinds.

For information, I have moved the NAS and the controllers at less 8 meters from the zwave devices since I thought it could be due to the range of my ZWave network..

Would you mind helping me please? Is there any additional information I can provide you with?

Schim'

@mvveelen
Copy link

mvveelen commented Jul 5, 2015

I'm running the latest from Jadahl's repository, and everything seems fine (thanks for all the updates !).

Question: is it 'safe' to update DSM to the latest (Version : 5.2-5592), from my current DSM 5.2-5565 Update 2? Or is it better to wait...? I don't want any troubles with Domoticz you see :)

@ctve
Copy link

ctve commented Jul 8, 2015

Hi Schim57300,

I've been using Domoticz on a Raspberry Pi with the Aeon Lab USB Stick and I'v encountered the same problem.
During the same period, my RfXTrx433 worked like a charm !
I've tried exactly the same ZWave network with a Fibaro Home Center 2 as a ZWave controller and the problem never appeared.
So I suppose it's caused by the Stick, by Domoticz or by the association of them.
Of course it doesn't help you a lot but I've supposed you'll be intersted in this info.
Sorry for my poor English.

@Schim9
Copy link

Schim9 commented Jul 8, 2015

@ctve : thank you very much for your experience. It helps ^^
I will try to update my DSM to the latest version (currently DSM 5.0-4493) and will install the latest version of Domoticz (currently I'm running under 2.0.2514-18 version)
I will see if it will change anything and will keep you in touch.
@mvveelen : I'll tell you if it works fine :-)

Additional Information? Don't know if it could be usefull but once my ZWave controller falls "asleep", I notice domoticz process uses between 60 and 90% of my CPU.

@Schim9
Copy link

Schim9 commented Jul 12, 2015

@mvveelen : did you see my answer here : #1769

@bonestaak
Copy link

Too bad al the dropbox links are not working anymore. On this moment i Use Domoticz 2.0.3113-7 and use the usb drivers from Stephan296 3.0.3.40 but too bad, the zwave nodes are gone after aboud 12 hours.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
request request for new package
Projects
None yet
Development

No branches or pull requests