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 Mar 16, 2017 1:55 pm

stty -F /dev/ttyUSB0 9600
I did this one already when I figured out that I did not have the cu package...
It did not make any difference.

I will try to install the cu package tonight and see if it can fix my problems.

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

Re: Domoticz on NSA 325v2

Post by lucaswiersma » Thu Mar 16, 2017 7:03 pm

barmalej2 wrote:

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.
I could install the package just find and when running:

Code: Select all

cu -l /dev/ttyUSB0 -s 9600 --parity=even


I get an output which looks just fine:

Code: Select all

/ISk5\2ME382-1004

0-0:96.1.1(4B414C37303035313338393938333133)
1-0:1.8.1(08234.559*kWh)
1-0:1.8.2(03543.334*kWh)
1-0:2.8.1(02018.359*kWh)
1-0:2.8.2(04940.602*kWh)
0-0:96.14.0(0002)
1-0:1.7.0(0000.46*kW)
1-0:2.7.0(0000.00*kW)
0-0:17.0.0(0999.00*kW)
0-0:96.3.10(1)
0-0:96.13.1()
0-0:96.13.0()
0-1:24.1.0(3)
0-1:96.1.0(3238303131303031333036303636343133)
0-1:24.3.0(170316190000)(00)(60)(1)(0-1:24.2.1)(m3)
(05479.482)
0-1:24.4.0(1)
!
However when running the command that is said to be the fix I get an error:

Code: Select all

cu -l /dev/ttyUSB0 -s 9600 --parity=even|bash
Gives:

: No such file or directory004
bash: line 2: $'\r': command not found
bash: line 3: syntax error near unexpected token `4B414C37303035313338393938333133'
' bash: line 3: `0-0:96.1.1(4B414C37303035313338393938333133)

It doesn't say anything to me. Do you have any suggestions?

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

Re: Domoticz on NSA 325v2

Post by barmalej2 » Thu Mar 16, 2017 8:50 pm

lucaswiersma wrote:However when running the command that is said to be the fix I get an error:

Code: Select all

cu -l /dev/ttyUSB0 -s 9600 --parity=even|bash
This command makes no senses to me and is totally illogic. It passes all output from
cu -l /dev/ttyUSB0 -s 9600 --parity=even
to bash command line, which only understands bash syntax, thus gives errors of executing code.
The obvious thing is that data is incoming via /dev/ttyUSB0, but domoticz is not getting (fetching) it. Why, I have no clue. Without having device to test I can only guess that some of others required devices nodes are missing or it is old kernel issue or something else.
It would be great, if you post this problem on domoticz forum. Maybe developer(s) or advanced users will be able to help to find out, where the key-reason is.

greenwitch
Posts: 25
Joined: Sun Feb 26, 2017 10:09 pm

Re: Domoticz on NSA 325v2

Post by greenwitch » Mon Sep 04, 2017 9:03 pm

I have some xiaomi led bulbs and I want to try with domoticz.
I have nas 542, managed to install sucessfully domoticz through slapt-get, no missing libraries, but when i want to start i got this error:
any ideas what is wrong:


root@NAS542:~# sh /ffp/start/domoticz.sh start
Starting /ffp/opt/domoticz/domoticz -www 8181 -sslwww 8443 -sslcert /ffp/opt/domoticz/server_cert.pem -log /ffp/var/log/domoticz.log -loglevel 1 -daemon
2017-09-04 20:49:13.427 Domoticz V3.3.5877 (c)2012-2016 GizMoCuz
2017-09-04 20:49:13.433 Build Hash: b97777b, Date: 2016-11-09 11:33:42
2017-09-04 20:49:13.435 Startup Path: /i-data/4ad20f06/.PKG/ffp/ffproot/ffp/opt/domoticz/
domoticz: Domoticz is starting up....
/ffp/opt/domoticz/domoticz: can't resolve symbol 'SSL_COMP_free_compression_methods'

Adam

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

Re: Domoticz on NSA 325v2

Post by barmalej2 » Tue Sep 05, 2017 5:10 am

You need to upgrade your ffp base packages including openssl first:

Code: Select all

slapt-get -u
slapt-get  --upgrade
If you are using ffp sshd, then restart of it is required after upgrade:

Code: Select all

sh /ffp/start/sshd.sh restart 

greenwitch
Posts: 25
Joined: Sun Feb 26, 2017 10:09 pm

Re: Domoticz on NSA 325v2

Post by greenwitch » Tue Sep 05, 2017 7:23 pm

Fixed!
Thanks!
You are the guy!

Adam

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

Re: Domoticz on NSA 325v2

Post by barmalej2 » Wed Sep 06, 2017 5:01 am

You are welcome.
Does xiaomi led bulbs works with Domoticz?

greenwitch
Posts: 25
Joined: Sun Feb 26, 2017 10:09 pm

Re: Domoticz on NSA 325v2

Post by greenwitch » Thu Sep 21, 2017 9:55 am

I have 3 type of Xiaomi Led lights:
1) https://www.gearbest.com/smart-lighting/pp_361555.html I have only white.
You need to enable developer mode in yeelight app add yeelight led in domoticz and equipment is found automatically - so yes it works.
2) https://www.gearbest.com/flush-ceiling- ... 33589.html Philips ceiling lamp. I do not think it is yet supported by domoticz, also not able to put it in developers mode easily.
https://github.com/aholstenson/miio/issues/57 <- I can see that some works to understand the protocol has been done
3) https://www.gearbest.com/smart-lighting/pp_644095.html / not supported by yeelight app, could not turn on developer mode, do not know if it is supported by domoticz.

Another questions:
Is it possible to update domoticz on zyxek nas:
Current version: 3.3.5877
I get communicate about update:
A new version of Domoticz is Available!...
Version: 8153, Latest Changes: Click Here

Another comment:
Do not add yeelight led in domoticz in hardware tab twice. It will ruin database and you will have to erase everything!
Make backup of you DB frequently :-)
Another comment:
Domoticz is not updating status, when lamp was disabled in other app.
Adam

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

Re: Domoticz on NSA 325v2

Post by barmalej2 » Thu Sep 21, 2017 4:53 pm

greenwitch wrote:Is it possible to update domoticz on zyxek nas?
At the moment my box is on half way of updating ffp toolchain. So can't help you with update, but you can do it yourself.

Code: Select all

slapt-get -i ffp-buildtools

Code: Select all

mkdir -p /mnt/HD_a2/ffp0.7arm/src/scripts
cd /mnt/HD_a2/ffp0.7arm/src/scripts

Code: Select all

wget http://downloads.zyxel.nas-central.org/Users/barmalej2/ffp/0.7/arm/scripts/reposcripts/gendeps -O /ffp/bin/gendeps
chmod 755 /ffp/bin/gendeps
wget http://downloads.zyxel.nas-central.org/Users/barmalej2/ffp/0.7/arm/scripts/build/src/domoticz.sh
chmod 755 domoticz.sh
Edit domoticz.sh script:change to current version-3.8153 line VERSION="3.5877", then run:

Code: Select all

nohup ./domoticz.sh >> domoticz.log 2>&1 &

greenwitch
Posts: 25
Joined: Sun Feb 26, 2017 10:09 pm

Re: Domoticz on NSA 325v2

Post by greenwitch » Sun Sep 24, 2017 11:17 am

Hi,

I follow your instruction and your script generated this error:
nohup: ignoring input
Start point:2017-09-24 11:03:36
dd: failed to open '/i-data/7cf371c4/.zyxel/nsa310swapfile': No such file or dir

I am using NAS542 and I do not see swapfile from your script:
root@NAS542:~# cd /i-data/
root@NAS542:/i-data# ls
4ad20f06 sysvol
root@NAS542:/i-data# cd 4ad20f06/
root@NAS542:/i-data/4ad20f06# ls
admin ffp0.7arm ffpdata lost+found music photo video aquota.user
root@NAS542:/i-data/4ad20f06# cd .zyxel
-sh: cd: .zyxel: No such file or directory
root@NAS542:/i-data/4ad20f06# cd ./.zyxel
-sh: cd: ./.zyxel: No such file or directory

Any advice?

should I create it manually before?
I changed path to folder which exists:
nohup: ignoring input
Start point:2017-09-24 11:12:44
dd: failed to open '/i-data/video/nsa310swapfile': No such file or directory

still no luck

ok I make mistake
/i-data/4ad20f06/video/nsa310swapfile

fixed the issue...

OK again stucked:
Could NOT find PythonLibs (missing: PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS) (R
CMake Error at CMakeLists.txt:108 (MESSAGE):
Python3 not found on your system, use USE_PYTHON=NO or sudo apt-get install
python3-dev)

I do not see place in script where I could set USE_PYTHON=NO nor i cant install it:

slapt-get -i python3-dev
Reading Package Lists...Done
No such package: python3-dev



Adam

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

Re: Domoticz on NSA 325v2

Post by barmalej2 » Sun Sep 24, 2017 6:34 pm

Paste output of:

Code: Select all

cat /proc/swaps
and

Code: Select all

slapt-get --show python
Upload somewhere content of domoticz.log.

greenwitch
Posts: 25
Joined: Sun Feb 26, 2017 10:09 pm

Re: Domoticz on NSA 325v2

Post by greenwitch » Mon Sep 25, 2017 9:27 pm

swap is ok I have fixed issue :-)

Code: Select all

root@NAS542:~# cat /proc/swaps
Filename                                Type            Size    Used    Priority
/dev/md1                                partition       1998780 408     -1
/i-data/4ad20f06/video/nsa310swapfile   file            1048572 0       -2

slapt-get --show python output:

Code: Select all

root@NAS542:~# slapt-get --show python
Package Name: python
Package Mirror: http://downloads.zyxel.nas-central.org/Users/barmalej2/ffp/0.7/arm/packages/
Package Priority: Preferred
Package Location: ./python
Package Version: 2.7.13-arm-1
Package Size: 12977 K
Package Installed Size: 77070 K
Package Required:   bzip2,db5,expat,gdbm,gettext,libffi,ncurses,openssl,readline,sqlite,uClibc-solibs | uClibc,zlib
Package Conflicts:
Package Suggests:
Package MD5 Sum:  e2494fdb619e35f7e634cd475115fbe1
Package Description:
 Python is an interpreted, interactive, object-oriented programming language often compared to Tcl,
 Perl, Scheme or Java. Python includes modules, classes, exceptions, very high level dynamic data
 types and dynamic typing. It supports interfaces to many system calls and libraries.
 Python can be used as an extension language for applications that need a programmable interface.
 License:PSFL v2
 Version:2.7.13
 Homepage:http://www.python.org
Package Installed: yes
domoticz.log is not so big, so I can attach it here:

Code: Select all

nohup: ignoring input
Start point:2017-09-25 23:30:12
Current swapfile(s) in use is:
Filename                                Type            Size    Used    Priority
/dev/md1                                partition       1998780 408     -1
/i-data/4ad20f06/video/nsa310swapfile   file            1048572 0       -2
2017-09-25 23:30:20 URL:https://codeload.github.com/domoticz/domoticz/tar.gz/3.8
-- Failed to get ProjectRevision from git
-- Read ProjectRevision from appversion.default
-- ###########################
-- Compiling Revision #3.8153
-- ###########################
-- Found mosquittopp.h at: /ffp/include
-- Found libmosquittopp at: /ffp/lib/libmosquittopp.so
-- Could NOT find PythonLibs (missing:  PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS) (R
CMake Error at CMakeLists.txt:108 (MESSAGE):
  Python3 not found on your system, use USE_PYTHON=NO or sudo apt-get install
  python3-dev)


-- Configuring incomplete, errors occurred!
See also "/mnt/HD_a2/build/domoticz-3.8153/CMakeFiles/CMakeOutput.log".
/mnt/HD_a2/build/domoticz-3.8153/CMakeFiles/CMakeOutput.log output:

Code: Select all

Detecting CXX [-std=c++98] compiler features compiled with the following output:
Change Dir: /mnt/HD_a2/build/domoticz-3.8153/CMakeFiles/CMakeTmp

Run Build Command:"/ffp/bin/make" "cmTryCompileExec1547234902/fast"
/ffp/bin/make -f CMakeFiles/cmTryCompileExec1547234902.dir/build.make CMakeFiles/cmTryCompileExec1547234902.dir/build
make[1]: Entering directory '/i-data/4ad20f06/build/domoticz-3.8153/CMakeFiles/CMakeTmp'
/mnt/HD_a2/.PKG/ffp/ffproot/ffp/bin/cmake -E cmake_progress_report /mnt/HD_a2/build/domoticz-3.8153/CMakeFiles/CMakeTmp/CMakeFiles 1
Building CXX object CMakeFiles/cmTryCompileExec1547234902.dir/feature_tests.cxx.o
/ffp/bin/c++    -std=c++98 -o CMakeFiles/cmTryCompileExec1547234902.dir/feature_tests.cxx.o -c /mnt/HD_a2/build/domoticz-3.8153/CMakeFiles/feature_tests.cxx
Linking CXX executable cmTryCompileExec1547234902
/mnt/HD_a2/.PKG/ffp/ffproot/ffp/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec1547234902.dir/link.txt --verbose=1
/ffp/bin/c++       CMakeFiles/cmTryCompileExec1547234902.dir/feature_tests.cxx.o  -o cmTryCompileExec1547234902 -rdynamic
make[1]: Leaving directory '/i-data/4ad20f06/build/domoticz-3.8153/CMakeFiles/CMakeTmp'


    Feature record: CXX_FEATURE:0cxx_alias_templates
    Feature record: CXX_FEATURE:0cxx_alignas
    Feature record: CXX_FEATURE:0cxx_alignof
    Feature record: CXX_FEATURE:0cxx_attributes
    Feature record: CXX_FEATURE:0cxx_attribute_deprecated
    Feature record: CXX_FEATURE:0cxx_auto_type
    Feature record: CXX_FEATURE:0cxx_binary_literals
    Feature record: CXX_FEATURE:0cxx_constexpr
    Feature record: CXX_FEATURE:0cxx_contextual_conversions
    Feature record: CXX_FEATURE:0cxx_decltype
    Feature record: CXX_FEATURE:0cxx_decltype_auto
    Feature record: CXX_FEATURE:0cxx_decltype_incomplete_return_types
    Feature record: CXX_FEATURE:0cxx_default_function_template_args
    Feature record: CXX_FEATURE:0cxx_defaulted_functions
    Feature record: CXX_FEATURE:0cxx_defaulted_move_initializers
    Feature record: CXX_FEATURE:0cxx_delegating_constructors
    Feature record: CXX_FEATURE:0cxx_deleted_functions
    Feature record: CXX_FEATURE:0cxx_digit_separators
    Feature record: CXX_FEATURE:0cxx_enum_forward_declarations
    Feature record: CXX_FEATURE:0cxx_explicit_conversions
    Feature record: CXX_FEATURE:0cxx_extended_friend_declarations
    Feature record: CXX_FEATURE:0cxx_extern_templates
    Feature record: CXX_FEATURE:0cxx_final
    Feature record: CXX_FEATURE:0cxx_func_identifier
    Feature record: CXX_FEATURE:0cxx_generalized_initializers
    Feature record: CXX_FEATURE:0cxx_generic_lambdas
    Feature record: CXX_FEATURE:0cxx_inheriting_constructors
    Feature record: CXX_FEATURE:0cxx_inline_namespaces
    Feature record: CXX_FEATURE:0cxx_lambdas
    Feature record: CXX_FEATURE:0cxx_lambda_init_captures
    Feature record: CXX_FEATURE:0cxx_local_type_template_args
    Feature record: CXX_FEATURE:0cxx_long_long_type
    Feature record: CXX_FEATURE:0cxx_noexcept
    Feature record: CXX_FEATURE:0cxx_nonstatic_member_init
    Feature record: CXX_FEATURE:0cxx_nullptr
    Feature record: CXX_FEATURE:0cxx_override
    Feature record: CXX_FEATURE:0cxx_range_for
    Feature record: CXX_FEATURE:0cxx_raw_string_literals
    Feature record: CXX_FEATURE:0cxx_reference_qualified_functions
    Feature record: CXX_FEATURE:0cxx_return_type_deduction
    Feature record: CXX_FEATURE:0cxx_right_angle_brackets
    Feature record: CXX_FEATURE:0cxx_rvalue_references
    Feature record: CXX_FEATURE:0cxx_sizeof_member
    Feature record: CXX_FEATURE:0cxx_static_assert
    Feature record: CXX_FEATURE:0cxx_strong_enums
    Feature record: CXX_FEATURE:1cxx_template_template_parameters
    Feature record: CXX_FEATURE:0cxx_thread_local
    Feature record: CXX_FEATURE:0cxx_trailing_return_types
    Feature record: CXX_FEATURE:0cxx_unicode_literals
    Feature record: CXX_FEATURE:0cxx_uniform_initialization
    Feature record: CXX_FEATURE:0cxx_unrestricted_unions
    Feature record: CXX_FEATURE:0cxx_user_literals
    Feature record: CXX_FEATURE:0cxx_variadic_macros
    Feature record: CXX_FEATURE:0cxx_variadic_templates


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

Re: Domoticz on NSA 325v2

Post by barmalej2 » Tue Sep 26, 2017 4:39 pm

It is not good idea, to place swapfile into shared directory with relaxed permissions.
Remove it:

Code: Select all

swapoff /i-data/4ad20f06/video/nsa310swapfile
rm /i-data/4ad20f06/video/nsa310swapfile
Seems like new domoticz versions requires python>=3.4. I disabled use of python in domoticz in latest build script. You need re-download it:

Code: Select all

cd /mnt/HD_a2/ffp0.7arm/src/scripts
wget http://downloads.zyxel.nas-central.org/Users/barmalej2/ffp/0.7/arm/scripts/build/src/domoticz.sh -O domoticz.sh
chmod 755 domoticz.sh
Then:

Code: Select all

nohup ./domoticz.sh >> domoticz.log 2>&1 &

greenwitch
Posts: 25
Joined: Sun Feb 26, 2017 10:09 pm

Re: Domoticz on NSA 325v2

Post by greenwitch » Mon Oct 02, 2017 8:02 pm

Code: Select all

Linking CXX executable domoticz
/ffp/bin/ld: cannot find -lresolv
collect2: error: ld returned 1 exit status
CMakeFiles/domoticz.dir/build.make:5253: recipe for target 'domoticz' failed
make[2]: *** [domoticz] Error 1
CMakeFiles/Makefile2:61: recipe for target 'CMakeFiles/domoticz.dir/all' failed
make[1]: *** [CMakeFiles/domoticz.dir/all] Error 2
Makefile:137: recipe for target 'all' failed
make: *** [all] Error 2
I checked solution on following topic, but cannot find lresolv line in your script :-(

Code: Select all

http://forum.nas-central.org/viewtopic.php?f=249&t=7055
I don't think that compiling new domoticz is for me :P

Adam

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

Re: Domoticz on NSA 325v2

Post by barmalej2 » Tue Oct 03, 2017 5:30 am

You was almost at finish, when build failed with linking error. I am not sure, why this problem didn't rise for me earlier, but solution you found can be used as temporary workaround. Further it will be unnecessary with updated ffp toolchain.
So, all you need is to create libresolve symlink to uClibc:

Code: Select all

ln -s libc.so /ffp/lib/libresolv.so
Then try to finish build manually:

Code: Select all

cd /mnt/HD_a2/build/domoticz-3.8153
make
echo $?
Last command should return zero in case of success and any other number in case of compilation fail.
If build succeeds, then start again from the begining:

Code: Select all

rm -rf /mnt/HD_a2/build
cd /mnt/HD_a2/ffp0.7arm/src/scripts
rm domoticz.log
nohup ./domoticz.sh >> domoticz.log 2>&1 &
This time compilation should finish with resulting domoticz ffp package in /mnt/HD_a2/ffp0.7arm/packages directory. You can install it with funpkg tool.

Post Reply