Domoticz on NSA 325v2

Marvell Kirkwood based
Post Reply
lucaswiersma
Posts: 24
Joined: Sun Feb 05, 2017 12:55 pm

Re: Domoticz on NSA 325v2

Post by lucaswiersma » Thu Feb 09, 2017 10:59 pm

The log from a fresh startup is this:

2017-02-09 20:20:27.122 Domoticz V3.3.5877 (c)2012-2016 GizMoCuz
2017-02-09 20:20:27.123 Build Hash: b97777b, Date: 2016-11-09 11:33:42
2017-02-09 20:20:27.125 Startup Path: /e-data/d7275ec5-09aa-4432-b20a-ffdbef22e3e0/ffproot/ffp/opt/domoticz/
2017-02-09 20:20:27.783 WebServer(HTTP) started on address: 0.0.0.0 with port 8181
2017-02-09 20:20:27.813 WebServer(SSL) started on address: 0.0.0.0 with port 8443
2017-02-09 20:20:27.818 Proxymanager started.
2017-02-09 20:20:27.823 RxQueue: queue worker started...
2017-02-09 20:20:27.823 TCPServer: shared server started...
2017-02-09 20:20:29.856 P1 Smart Meter: Using serial port: /dev/ttyUSB0
2017-02-09 20:20:29.861 EventSystem: reset all events...
2017-02-09 20:20:29.863 EventSystem: reset all device statuses...
2017-02-09 20:20:29.864 EventSystem: Started
2017-02-09 20:20:33.240 Incoming connection from: 192.168.0.101


Does not seem to be providing much info

barmalej2
Posts: 2395
Joined: Sun Apr 29, 2012 5:24 pm

Re: Domoticz on NSA 325v2

Post by barmalej2 » Fri Feb 10, 2017 8:21 am

lucaswiersma wrote:So aparently domoticz keeps track of things I have done in other installs. Does either one of you know if I can reset the sqllite db some how?
Easy. Stop domoticz service:

Code: Select all

sh /ffp/start/domoticz.sh stop
Then remove database:

Code: Select all

rm /ffp/opt/domoticz/domoticz.db
Instead of this, I would suggest to do clean install:

Code: Select all

sh /ffp/start/domoticz.sh stop
funpkg -r domoticz
rm -rf /ffp/opt/domoticz
funpkg -i /ffp/funpkg/cache/br2/domoticz-3.5877-arm-0.txz
Then:

Code: Select all

sh /ffp/start/zyxel-modules.sh start
sh /ffp/start/udevd.sh start
sh /ffp/start/domoticz.sh start
Do a little test. When setting new hardware, first sellect incorrect boudrate 115200, then set it back to correct one 9600 and only then press add button.
Can you paste your Domoticz Hardware settings picture?

lucaswiersma
Posts: 24
Joined: Sun Feb 05, 2017 12:55 pm

Re: Domoticz on NSA 325v2

Post by lucaswiersma » Tue Feb 14, 2017 9:02 pm

In my attempt to remove domoticz I was a bit to trigger happy on the rm -rf command... So I removed some trivial ffp stuff too :shock:

My bad but I figured it was good to give it a try on a clean system anyways so I removed the ffp all together. Reinstalling did not go to well however (think it was the timing issue). After installing it on a different usb key it all worked fine. This took me a while to figure out so I did not try the suggestions you made untill today.

I tried to do the boudrate thing but no luck. In my log it did not say anything different from the other attempts and it still does not show any devices.

my hardware tab looks like this:

Image

barmalej2
Posts: 2395
Joined: Sun Apr 29, 2012 5:24 pm

Re: Domoticz on NSA 325v2

Post by barmalej2 » Mon Feb 20, 2017 7:32 am

Well, it seems we are stuck. Only one idea is left to try: update boost version and compile as separate packages some of third party libs, which domoticz uses as builtin-lua and libmosquitto. It can take a week to accomplish this task, because this involves updating subdependent packages as well.

barmalej2
Posts: 2395
Joined: Sun Apr 29, 2012 5:24 pm

Re: Domoticz on NSA 325v2

Post by barmalej2 » Tue Feb 28, 2017 11:17 am

Compiling Domoticz with updated boost and using external libs-mqtt and lua, right now. Progress on my box after 24h 70 %. I hope it will finish tomorrow.

barmalej2
Posts: 2395
Joined: Sun Apr 29, 2012 5:24 pm

Re: Domoticz on NSA 325v2

Post by barmalej2 » Wed Mar 01, 2017 7:14 pm

Uploaded latest domoticz build with external libraries (lua,mosquitto,c-ares,libwebsockets, openzwave, updated boost with deps) to br2 repository.
# Do some cleanup again, before installing it:

Code: Select all

sh /ffp/start/domoticz.sh stop
funpkg -r domoticz
rm -rf /ffp/opt/domoticz
# Unplug device and reboot NAS. Then update domoticz:

Code: Select all

slapt-get -u
slapt-get -i domoticz
# Start required services first:

Code: Select all

sh /ffp/start/zyxel-modules.sh start
sh /ffp/start/udevd.sh start
# Now plug your device and check if the serial driver is properly loaded and to which port attached:

Code: Select all

cat /proc/tty/driver/usbserial
/bin/dmesg | tail -n50
# Start domoticz service.

Code: Select all

sh /ffp/start/domoticz.sh start
# Configure and test domoticz, try button allowing new sensors for 5 minutes, check log.
If still not working, then I have the last idea to rebuild it, linking to libusb 1.0 library instead of libusb-compat 0.1

lucaswiersma
Posts: 24
Joined: Sun Feb 05, 2017 12:55 pm

Re: Domoticz on NSA 325v2

Post by lucaswiersma » Thu Mar 09, 2017 11:42 pm

Sorry for my long absence I was enjoying a well deserved holiday and afterwards was swamped at work.

I will try this over the weekend!

Your help is much appreciated but if this and the last idea don't work we may have to give up.
Maybe buying a rpi won't be such a bad thing afterall. There is probably some nice other stuff I can do with that too,

lucaswiersma
Posts: 24
Joined: Sun Feb 05, 2017 12:55 pm

Re: Domoticz on NSA 325v2

Post by lucaswiersma » Fri Mar 10, 2017 6:14 pm

I have installed the new version but no luck.
the results do not differ from any previous attempts.

After adding the hardware I see in the log that a serial device is added to domoticz but I cannot see any devices to add in the device tab.
If still not working, then I have the last idea to rebuild it, linking to libusb 1.0 library instead of libusb-compat 0.1
Is this something I can do myself? I don't have that much experience with building from src, but I also managed to build the older version of domoticz with help of this thread, so I can give it a try.

barmalej2
Posts: 2395
Joined: Sun Apr 29, 2012 5:24 pm

Re: Domoticz on NSA 325v2

Post by barmalej2 » Sat Mar 11, 2017 9:58 pm

Good idea. It would be faster, besides I can't do compilation myself right now.
I have uploaded build script and patch to:
http://downloads.zyxel.nas-central.org/ ... uild/domo/
Just download build script, give 755 permissions for it and use nohup to detach from terminal and redirect output to log:

Code: Select all

nohup ./domoticz.sh >> domoticz.log 2>&1 &
Resulting ffp package will be placed in /mnt/HD_a2/ffp0.7arm/packages. Adjust paths in the script according to your needs.

lucaswiersma
Posts: 24
Joined: Sun Feb 05, 2017 12:55 pm

Re: Domoticz on NSA 325v2

Post by lucaswiersma » Wed Mar 15, 2017 7:39 am

I have started the build yesterday evening and will check back today when I get back from work.
So far it seemed to build just fine.

lucaswiersma
Posts: 24
Joined: Sun Feb 05, 2017 12:55 pm

Re: Domoticz on NSA 325v2

Post by lucaswiersma » Wed Mar 15, 2017 6:18 pm

So first the good news:

The build finished just fine in little under 15 hours. I removed the previous version of domoticz and installed this version.

So far so good. The latest version runs just fine but it does not solve my problems...

I can add the hardware, See in my log that a usb serial device is attached but no devices to add in the device settings tab....

I guess this is where I take my loss and buy myself a raspberry pi.

Thanks for helping me so far, I learned some fun new stuff about my NSA 310S so I've got that going :D

lucaswiersma
Posts: 24
Joined: Sun Feb 05, 2017 12:55 pm

Re: Domoticz on NSA 325v2

Post by lucaswiersma » Wed Mar 15, 2017 7:32 pm

Ok maybe one last attempt....

I noticed a new post was made on the domoticz forum: http://www.domoticz.com/forum/viewtopic ... 14&t=15998

Looks like the exact problem I am facing. Only problem is the cu command they mention. I've not seen this command before so I don't know from which package it comes.

Do you perchance know which package I have to install in order to run this command. That'll be my final try :D

barmalej2
Posts: 2395
Joined: Sun Apr 29, 2012 5:24 pm

Re: Domoticz on NSA 325v2

Post by barmalej2 » Thu Mar 16, 2017 8:23 am

cu tool belongs to uucp. There is no uucp ffp package right now, but I will compile and place it in repo after 4-5 hours

lucaswiersma
Posts: 24
Joined: Sun Feb 05, 2017 12:55 pm

Re: Domoticz on NSA 325v2

Post by lucaswiersma » Thu Mar 16, 2017 10:39 am

Thanks then I will try the steps they took later tonight/tomorrow.

barmalej2
Posts: 2395
Joined: Sun Apr 29, 2012 5:24 pm

Re: Domoticz on NSA 325v2

Post by barmalej2 » Thu Mar 16, 2017 1:30 pm

Code: Select all

slapt-get -u
slapt-get -i uucp
One more thing. Try to set baudrate on terminal:

Code: Select all

stty -F /dev/ttyUSB0 9600
And recheck domoticz.

Post Reply