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

Domoticz #1041

Closed
dbouchabou opened this issue Jun 2, 2014 · 159 comments
Closed

Domoticz #1041

dbouchabou opened this issue Jun 2, 2014 · 159 comments
Labels

Comments

@dbouchabou
Copy link

After the installation on my DS1512+ it is impossible to start the package. Error message: faill, file format invalid

@remb0
Copy link

remb0 commented Jun 3, 2014

var/logs:
Jun 3 08:53:20 Nas entry.cgi_SYNO.Core.Package.Control[1].start[27281]: pkgstartstop.cpp:121 Failed to start package domoticz
Jun 3 08:53:22 Nas PkgMan.cgi: pkgtool.cpp:2005 Failed to query package status, domoticz

@unheilig
Copy link

unheilig commented Jun 5, 2014

hi all,
on ds213 it's impossible to start the package. It looks like it's a compatibility issue related to DSM 5
Can anyone help finding a solution for Domoticz to work?

thanks

@therealmko
Copy link

I don't have a solution but I build a Domoticz package for my cedarview DS1812+. It installed but like reported here did not start. This is what is said in /var/log/messages. Unfortunately I can't find any more meaningful logs.

Jun 4 20:43:05 MiesStorage entry.cgi_SYNO.Core.Package.Installation[1].install[23710]: pkgtool.cpp:1450 Failed to exrtact package INFO to /volume1/@tmp/538F68B97653CC7A/
Jun 4 20:43:05 MiesStorage entry.cgi_SYNO.Core.Package.Installation[1].install[23710]: pkgtool.cpp:1451 /bin/tar xf /volume1/@tmp/upload_tmp.229410 -C /volume1/@tmp/538F68B97653CC7A/ INFO
Jun 4 21:00:24 MiesStorage entry.cgi_SYNO.Core.Package.Control[1].start[2392]: pkgstartstop.cpp:121 Failed to start package domoticz
...
Jun 4 21:08:44 XXX PkgMan.cgi: pkgtool.cpp:2052 Failed to query package status, domoticz

However I can manually start the binary, although connecting with a browser gives a 404 message, so it is not working properly in any case.

./domoticz -www 8085 -verbose 1
Domoticz V1.0.10 (c)2012-2013 GizMoCuz
Startup Path: /volume1/@appstore/domoticz/bin/
Webserver started on port: 8085
Camera settings (re)loaded
Incoming connection from: 192.168.x.x
^CClosing application!...
stopping worker...
Scheduler stopped...
Camera fetch stopped...
WebServer stopped...
Mainworker Stopped...

@ghost
Copy link

ghost commented Jun 5, 2014

Hello
I try install Domoticz on my Synology DS713+ but i can not. I have a error: Can not run service packet and then Invalid file format.

@Dr-Bean
Copy link
Contributor

Dr-Bean commented Jun 5, 2014

This package doesn't work right now, regardless of DSM version, and will need some attention to get in working order again.

@Diaoul: Until we have time to work on it, maybe it's best to turn off distribution of this package? I don't know that it was originally shared on the old repo.

@Dr-Bean Dr-Bean added the bug label Jun 5, 2014
@waveterm
Copy link

waveterm commented Jun 6, 2014

Same issue on RS3412xs. I hope it gets fixed,as I'd love to give it a try :)

@Diaoul
Copy link
Member

Diaoul commented Jun 6, 2014

Yep, let's disable it.
I don't have time to work on this yet, still working on the server side :)

@Dr-Bean
Copy link
Contributor

Dr-Bean commented Jun 7, 2014

Done, disabled. I might take a look at it, after sorting some other things out, at least just to get it running.

@unheilig
Copy link

unheilig commented Jun 9, 2014

thanks guys, we'd like you to fix it.
it would be great to have a running version!

thank you

@jorikcaljouw
Copy link
Contributor

Yeah, I also found that the package is missing lots of files. I'll do my best to see if I can create a version of the spk that works correctly. Don't hold your breath though, it may take quite some time for me to understand all the necessary steps to make this work ;-)
(the www folder is for instance missing from the package, which explains the 404 I think)

@unheilig
Copy link

that would be definitely great!
thank you for all your time... please keep us updated :)

@jorikcaljouw
Copy link
Contributor

Just a quick note. Making pretty good progress. I have overcome some issues with compiling and running. Although I'm not sure I found the best solution for all of them, I think I should be able to make some packages available for x86 (my own DS411+II uses x86 arch) by the end of the week for testing purposes.
edit: I'm using r1801 from the domoticz repository (currently latest revision)

@Diaoul
Copy link
Member

Diaoul commented Jun 12, 2014

Submit a pull request instead of distributing your own package. A bad package can screw up the system prety bad so it's best to have it reviewed.

@jorikcaljouw
Copy link
Contributor

Thanks, I'll do that instead! I will probably have a couple of questions as to the best way to workaround a certain issue, I'll make sure to put those in the pull request ;-)

@unheilig
Copy link

Guys, I own a DS213, it's a marwel kirkwood processor.
do you think it will be available also for that kind of processor?

thanks

@remb0
Copy link

remb0 commented Jun 12, 2014

when the package is good it can be compiled for every CPU.

maybe gizmocuz (creator of domoticz) can help with the compile issues?

@Diaoul
Copy link
Member

Diaoul commented Jun 12, 2014

There are no compile issue with domoticz. The package I created basically just contains the binary. @Dr-Bean built all archs successfully.
The only issue, from what I understand, is that the package doesn't ship the html pages for the webui so when one attempts to access the web interface, domoticz crashes.

@jorikcaljouw
Copy link
Contributor

I have no reason to think that there will be issues with compiling for other archs.

BTW, the issues I found so far (and I am using r1801) are the following

  1. I am using cmake from Ubuntu 12.04 and it thinks that boost libraries should have -mt added, but if the boost libraries are built, they do not have -mt as a postfix.
    This page indicates that this has to do with threadsafety:
    http://www.boost.org/doc/libs/1_55_0/more/getting_started/unix-variants.html#library-naming
    But I have also found other references that state, that newer boost-version do not use the -mt postfix anymore. I'm not sure what is correct here.
    I "fixed" FindBoost.cmake on my system, but I don't think that is the best solution for this. Maybe we should create symlinks after building boost? (like e.g. Ubuntu itself does?)
  2. cross/curl is a dependency for domoticz
  3. the include-boost.patch in cross/domoticz cannot be applied for r1801 and does not seem to be necessary anymore
  4. domoticz-r1801/hardware/Teleinfo.cpp has a unicode BOM, which does not appear to be a problem for the build-tools in ubuntu 12.04, but the toolchain that is used for x86, chokes on it. So I had to remove the BOM for compiling Teleinfo.cpp. This should probably be fixed upstream, though.
  5. Then indeed the www-folder should be included in the package and the starting-script can then point the -wwwroot input argument to where the www-folder is stored. (I don't think we should put it inside a www-subdirectory of where the binary is located, which is where domoticz expects it to be by default).

@Diaoul
Copy link
Member

Diaoul commented Jun 12, 2014

3 You can make a patch for this until it's fixed upstream
4 If there is a compile-time option for this, I think it's better to use it rather than having an argument in the starting script.

I advise you to test compilation on ARM architectures rather than x86. With x86 there is a small chance that your system libraries are picked instead of the compiled ones.

@unheilig
Copy link

Hi guys, any news on this?
thank you very much for your work...

@jorikcaljouw
Copy link
Contributor

Yes, sorry this is taking a bit longer than I hoped. Still working on it, but had very limited time last week. Hope to get a bit further and work on the suggestions given above this week :).

@jorikcaljouw
Copy link
Contributor

Pull request #1098 created.
If there are issues with linking against boost, you may need to update cmake. An alternative is to create symlinks for the -mt names of boost libraries.
I was able to correctly compile arch-88f6281 and arch-x86 and since I only have a DS411+II, I could only test the x86 package.
This package does NOT use/depend on openzwave (yet).

@Diaoul
Copy link
Member

Diaoul commented Jun 22, 2014

I added a few comments on the PR

@jorikcaljouw
Copy link
Contributor

Hi Diaoul, thanks for the comments/improvements! (Not sure if I should ask for your help here or if it's better in the PR).

One of your comments is to copy the binary to install/bin and set the path to include the bin directory instead of the root of the install_dir. I actually copied the binary to the root of the package folder, because that is also the location of the domoticz binary as being used upstream.

If I would put the binary file in /bin (which seems to be the best location!), then I would need to add source-code patches, to fix relative path changes in the source code. I thought it would be best to limit the changes to the source code as much as possible.

Can you advise me what is the best solution here?

  1. keep the binary in the root of install as it is is now or
  2. add patches to the source code and copy the binary to /bin or
  3. put the binary in /bin and add a symlink to the root and only start it from the symlink?

Thanks!
Jorik

@jorikcaljouw
Copy link
Contributor

Until further advise on the binary location, I'm keeping the domoticz binary in install_dir. I have committed some more changes (including update to rev 1809 which resolves the Unicode BOM from upstream).

@Diaoul
Copy link
Member

Diaoul commented Jun 22, 2014

No compile time option to change this behavior?

@jorikcaljouw
Copy link
Contributor

I have just created a topic for this in the domoticz forum. I could not find an option, but the project uses CMake, I am not very familiar with this makefile generator, so it might already be possible compile-time.

@jorikcaljouw
Copy link
Contributor

I'm one step further. There is now an -approot command line option that specifies the root that contains a bunch of other files/folders. Because of this the domoticz binary can now be stored in /bin.

I do have another question: I used port 8084 (as it is unclaimed in the synology ports wiki), is this ok? And can it be listed there such that no other App will use it? Or should I create a separate Issue for this?

I have a couple of other things I want to add to the package, but the package should work quite well already :)

  1. (I should be able to add this pretty soon) add an icon to the main menu and an URL to open domoticz from DSM directly
  2. add openzwave as a dependency as a cross/openzwave addition. Not sure how easy or difficult this will be. But since I want to use my Synology for openzwave, really looking forward to getting this to work as well!

@jorikcaljouw
Copy link
Contributor

And 1. is done (it is now accessible as a regular package/app in DSM) and domoticz is now also running as the domoticz user instead of as root :)

If somebody could look into my pull request I'd be happy to make other changes if necessary.

@tehnoinstyle
Copy link

Yes, a little clarifies.
I have Qnap TS-119 with installed ipkg. Ie I can do it on the package for installation on Synology?

@steef84
Copy link

steef84 commented Dec 6, 2014

@jorikcaljouw just a small request. Is it possible to save folder the folder /domoticz/scripts when updating domoticz. Atm i use winscp to save the folder, but life is easier when its automated. Thanks in advance. Still enjoying Domoticz everyday on my Syno DS213+

@jorikcaljouw
Copy link
Contributor

Yes this can be easily customized. If you're a bit familiar with shell scripting, you can add the necessary lines for this in:
spk/domoticz/src/installer.sh
And then in the functions for
preupgrade and postupgrade

@tehnoinstyle
Copy link

Hello, jorikcaljouw
I found a link to your dropbox - SynoTestPackages, and has found a package for bromolow platform. But also probably without the support of Z-Wave?
You have not tried to make the package, with support for Z-Wave?
Already need the packages for the two platforms, evansport and bromolow.
Thank you.

@vfd7
Copy link

vfd7 commented Dec 9, 2014

@jorik,
after having read the complete thread, I understand the followings:
1/ Zwave is not supported in this spk.
2/ To support it, I would need to compile OpenZwave then recompile domiticz. so I can't really use this spk.
3/ The steps to compile both are in domoticz' wiki.
Can you please confirm my understanding?

I would like to help you to support Zwave in Domoticz' spk but you'll have to tell me if you want my help. I am not very familar with spk compilation but I can learn.

@tehnoinstyle
Copy link

to vfd7
Yes, I need help. Find out please. For platforms evansport and bromolow. With support Z-Wave AeonLab stick S2. Thanks.

@steef84
Copy link

steef84 commented Dec 9, 2014

Ok, with a brief talk with Jorik we agreed all the packages combined in one place would be a nice addon. Sadly the package at the time is not approved by official SynoCommunity devs. My idea was to add a temporary "TESTING !!!! " packages server where we could download different kinds of cpu structures. To add this server simply add http://steef84.asuscomm.com/sspks/ to to the Community Packetsource in DSM. I only test my Qoriq build, and thats working. Probabely others will also work. Its hosted on my Syno aswell, so dunno how the performance will be. Feel free to add this inofficial testing build server

To clarify: NO Z-wave support at the moment

@tehnoinstyle
Copy link

to steef84

Ready to join the testing on the above platforms.
Currently have dimmers, switches, RGBdimer. Tomorrow I will have 5-7 Z-Wave devices (sensors, multisensor, thermostats, switch, etc.).

@tehnoinstyle
Copy link

Add a link to the source of the packages in the center of the packages on DS214play and DS3612. Packages saw. On DS214play proposed upgrade from version 2014-3 (Jorik link) to version 2146-1.
It is a pity that without the support Z-Wave. When planning to add Z-Wave?
Thanks.

@deanrparry
Copy link

So much more reliable than the Raspberry PI which constantly goes offline! I have just purchased the ZWAVE.ME Plus ZWave dongle so getting this working would be the "ultimate" home automation solution!

Media/Surveillance/Automation all om Synology! :)

And I could sell my Fibaro HC2 boxes aswell as they suck the development team have no idea what they are doing from day to day!

@deanrparry
Copy link

steelf84 will zwave support be added at all?

@deanrparry
Copy link

made an attempt to compile a version with openzwave!

now i am currently on medication for headaches! :)

@tehnoinstyle
Copy link

to deanrparry
Is there good news?

@deanrparry
Copy link

haha no! far from it! i am not cut out for this... everything went well until the cmake section!

@deanrparry
Copy link

i am now going the debian chroot method instead

@tehnoinstyle
Copy link

as this method to install on my server?

@deanrparry
Copy link

well the debian method is a lot easier... this is not my work so credit to the original author!

Domoticz on Synology in Debian Chroot

Debian Chroot an extra (Linux) operating system over the existing operating system, Synology go.
All installation carried out in a Debian Chroot are not integrated into the operating system Synology. When removing the Debian Chroot package in the DSM, all programs installed herein are removed! The use of a Debian Chroot advisable. It is easy to install and is for all Synology's. :)

Since it can not really go wrong, it is at your own risk ....... Automatic startup domoticz working on ... If somewhere in the system something is not going well, remove Debian Chroot of your system (DSM Packages). Any action to be lost.
Possible error messages locales you can ignore.

               Adding sources and packages

  1. Add the repo: http://packages.synocommunity.com to the package center (DSM)
  2. Install the following packages:
    • Python 2.7.8.10 of Synocommunity
    • Debian Chroot (then click Run as this does not happen automatically)
  3. Open Debian Chroot and wait status: Installed
  4. Open Control Panel Synology and go to Terminal / SNMP. Tick SSH to it.
  5. Open with program Putty SSH terminal session.
  6. Login with username root and password of your Admin account from Synology.
  7. Enter the following commands via SSH session:

Configuring Debian Chroot locales

• / var / packages / debian-chroot / scripts / start-stop status chroot
Now you come in Debian Chroot: Root @ Log: / #
• aptitude update
• aptitude upgrade
• aptitude install locales
• dpkg-reconfigure locales
select there nl_NL.UTF-8 UTF-8 (scroll with the arrow key) and go to OK (Tab key) (enter)
• dpkg-reconfigure tzdata
Select Europe and then there Amsterdam

Benodige tools to compillen domoticz

• apt-get install build-essential -y
• apt-get install cmake libboost-dev libboost-thread-dev libboost-system-dev libsqlite3-dev subversion curl libcurl4-openssl-dev libusb-dev zlib1g-dev libudev-dev

Drivers for Domoticz (OpenZwave)

• svn co http://open-zwave.googlecode.com/svn/trunk/ open-sulfuric-read-only
• CD-sulfuric open-read-only
• make
• CD

Domoticz Install

• svn checkout svn: //svn.code.sf.net/p/domoticz/code/trunk/ domoticz
• CD domoticz
• cmake -DCMAKE_BUILD_TYPE = Release
• make

Starting Domoticz

• ./domoticz
http: // ipvanjenas: 8080

After restarting your nas you start Domoticz manually. Starting Domoticz automatically works not quite tasty. test phase

To start domoticz manually after restarting the NAS, enter the following command and utilities:
• / var / packages / debian-chroot / scripts / start-stop status chroot
• CD domoticz
• ./domoticz

Autostart Domoticz (Test Phase)

• cp domoticz.sh /etc/init.d
• chmod + x /etc/init.d/domoticz.sh
• update-rc.d domoticz.sh defaults

Adjusting script. This can be done via command vi or the program Wincsp (recommended).

• vi /etc/init.d/domoticz.sh
Change the following settings:
DAEMON = domoticz / domoticz
User = root

Possibly a different port:
 
OPTIONS = "- www 8080"
Now you can run domoticz with:
• /etc/init.d/domoticz.sh start

stop:
• /etc/init.d/domoticz.sh stop

Check or domoticz start:
• /etc/init.d/domoticz.sh status

@steef84
Copy link

steef84 commented Dec 22, 2014

Chroot is disfunctional for some Synologys. At least for my DS213+ And here we talk about compiling spks, not running through chroot.

@deanrparry
Copy link

So can you answer my original question please :) packages with open ZWave?

@tehnoinstyle
Copy link

Thanks for the detailed instructions. I understand very little Linux.
I have two servers DS214play and DS3612 (xpenology). I copy all the data on one server, and the second will try to establish.
Is there a problem with the installation on the architecture evansport and bromolow?
I can just copy the strings, with your message to perform commands?

Do not quite understand the last question.
As long as I use Openremote and SynoZWave.

@steef84
Copy link

steef84 commented Dec 23, 2014

@deanrparry as mentioned many times in this thread no zwave when compiling with spksrc.

@tehnoinstyle
Copy link

@deanrparry
• dpkg-reconfigure locales
select there nl_NL.UTF-8 UTF-8 (scroll with the arrow key) and go to OK (Tab key) (enter)
• dpkg-reconfigure tzdata
Select Europe and then there Amsterdam

This is for example, or need to specify exactly?
If I need English or Russian, and Europe and the city of Zaporozhye (Ukraine).

@deanrparry
Copy link

i am not a retard steef84 i simply asked if there are plans to introduce it or not? simple yes or no question!

@deanrparry
Copy link

i personally don't care if it is weeks/months or a year!

@deanrparry
Copy link

technoinstyle sorry i cannot discuss this on this thread i went off topic and it looks like he is not the happiest of people so cannot help any further! :(

@jorikcaljouw
Copy link
Contributor

Hi everybody, @deanrparry I hope you're not referring to me :-). I'm a happy bunny (as one of my colleagues in the UK would say). I do think this is not the best place to discuss compiling Domoticz on a Synology. Domoticz has it's own forum for that ;-). This github repository (including the issues that are part of it) is meant for using the spksrc framework for building spk-packages for Synology machines.

Like I said before, I would really like to get Z-Wave working with spksrc and domoticz for Synology. I myself have a DS411+II and a Z-Wave stick and I started working on Domoticz package with spksrc in order to eventually control my Z-Wave dimmers with my Synology NAS.

I have given it a try a while back, but then I was unable to get all the dependencies compiled. But I really cannot say anything regarding if this is going to be possible (I expect it should be...) and if so when it will be available. I can't give more steps about what needs to be done then to just start building the Domoticz package yourself with spksrc and reading the documentation of Domoticz and the source to find out what is necessary to enable z-wave support. Anybody can give it a try, but I think it would be beneficial to have a combined effort and log attempts and results in some form such that we're not all going to try the same thing and fail the same way ;-).

@Dr-Bean
Copy link
Contributor

Dr-Bean commented Feb 4, 2015

Fyi, Domoticz 2.0.2112-5 has been published on the repository.

As this issue has been open for quite a while and includes a lot of outdated information, I am going to close it.
For problems with the current package or feature requests, you have the opportunity to start fresh: please open a new issue instead of posting to this one, or better yet, open a pull request with your improvements.
Thanks.

@Dr-Bean Dr-Bean closed this as completed Feb 4, 2015
@Decipher
Copy link
Contributor

Please refer to #1478 for work on Openzwave support for Domoticz. I have started, and have made a commit to a branch, but I am playing around with things I don't entirely understand yet, so relish any help from others.

@SynoCommunity SynoCommunity locked as too heated and limited conversation to collaborators Jun 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests