General NAS-Central Forums

Welcome to the NAS community
It is currently Mon Oct 23, 2017 6:21 am

All times are UTC




Post new topic Reply to topic  [ 107 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7, 8  Next
Author Message
PostPosted: Tue Feb 07, 2017 8:06 pm 
Offline

Joined: Sun Feb 05, 2017 12:55 pm
Posts: 21
I read up on it and it seems to be doing the same thing so I went ahead and followed your instructions.

however... No luck.

Still can't see any devices in domoticz.


Top
 Profile  
 
PostPosted: Tue Feb 07, 2017 8:51 pm 
Offline

Joined: Sun Apr 29, 2012 5:24 pm
Posts: 2303
Quote:
What is slapt? Seems like a new package manager. I am used to slacker. Is this one replacing slacker?

Yes, it is new package manager for ffp and I hope it will replace slacker one day, but actually they do not conflict to each other and they can co-exist. Slapt-get is like debian/ubuntu apt-get package manager and has one BIG benefit comparing with slacker-it can install dependent packages. Only one issue left to be solved: slapt-get can't reinstall packages. C programming skills are required for this task and I don't have them.

Quote:
Still can't see any devices in domoticz.

No devices? Are you sure? Or you mean no output from devices in domoticz?
Anyway, I am building domoticz myself right now, but progress is very slow on my box-it is only 48 % after 24 hours :shock: Would you mind to test it after it will be ready? I have a little hope, that domoticz will work, but it is worth to try.


Top
 Profile  
 
PostPosted: Tue Feb 07, 2017 9:02 pm 
Offline

Joined: Sun Feb 05, 2017 12:55 pm
Posts: 21
The problem is actually that I do not see any devices in the list.

So I add the hardware. P1 usb device. Select the correct USB port, and bautrate 9600 and click add
In the log now I see that a serial device has been added.

Now I go to the device tab expecting to see two devices there (gas and electra meter) however none show up.

I have just installed domoticz on my Mac to see if it was something domoticz related icm with my usb device but on my Mac all worked fine. Added the hardware and the devices showed up. I could add them and read out the values.

48% after 24 hours... WOW that is slow. Took about 4 to 6 ours on my machine.

Yes I will try it out. It's not working now so I won't break anything trying it.


Top
 Profile  
 
PostPosted: Tue Feb 07, 2017 9:17 pm 
Offline

Joined: Sun Apr 29, 2012 5:24 pm
Posts: 2303
You are running domoticz as root, don't you?

Can you paste several debug outputs:
Stop udev and domoticz services, unplug device.
Use two parallel ssh windows. In one run udev in debug mode:
Code:
sh /ffp/start/udevd.sh debug

In second one run domoticz in debug mode (assuming you are in domo install dir):
Code:
./domoticz -verbose=1

Plug you device(s) and paste outputs from both windows. Then stop domoticz and udev debugging. Paste additional output of:
Code:
/bin/dmesg | tail -n50

Start udev service again.


Top
 Profile  
 
PostPosted: Tue Feb 07, 2017 9:43 pm 
Offline

Joined: Sun Feb 05, 2017 12:55 pm
Posts: 21
barmalej2 wrote:
You are running domoticz as root, don't you?

Yes running it as root.

Can you paste several debug outputs:
Stop udev and domoticz services, unplug device.
Use two parallel ssh windows. In one run udev in debug mode:
Code:
sh /ffp/start/udevd.sh debug


log of udevd.sh can be found here: http://pastebin.com/Fax5AbXd

In second one run domoticz in debug mode (assuming you are in domo install dir):
Code:
./domoticz -verbose=1


Log of domoticz:

root@NSA310S:/ffp/domoticz# ./domoticz -verbose=1
2017-02-07 21:34:11.018 Domoticz V3.5837 (c)2012-2016 GizMoCuz
2017-02-07 21:34:11.018 Build Hash: 591a669-modified, Date: 2016-10-30 08:04:45
2017-02-07 21:34:11.019 Startup Path: /e-data/d7275ec5-09aa-4432-b20a-ffdbef22e3e0/ffproot/ffp/domoticz/
2017-02-07 21:34:13.054 Sunrise: 07:12:00 SunSet:16:38:00
2017-02-07 21:34:13.055 EventSystem: reset all events...
2017-02-07 21:34:13.083 Active notification subsystems: (0/12)
2017-02-07 21:34:13.089 WebServer(HTTP) started on address: 0.0.0.0 with port 8080
2017-02-07 21:34:13.117 Error: WebServer(SSL) startup failed on address 0.0.0.0 with port: 443: bind: Address already in use
2017-02-07 21:34:13.118 Error: WebServer(SSL) check privileges for opening ports below 1024
2017-02-07 21:34:13.121 Proxymanager started.
2017-02-07 21:34:13.126 Starting shared server on: 0.0.0.0:6144
2017-02-07 21:34:13.127 RxQueue: queue worker started...
2017-02-07 21:34:13.127 TCPServer: shared server started...
2017-02-07 21:34:15.165 P1 Smart Meter: Using serial port: /dev/ttyUSB0
2017-02-07 21:34:15.165 Error: P1 Smart Meter: Error opening serial port!
2017-02-07 21:34:15.166 EventSystem: reset all events...
2017-02-07 21:34:15.167 EventSystem: reset all device statuses...
2017-02-07 21:34:15.168 EventSystem: Started
2017-02-07 21:38:22.887 Incoming connection from: 192.168.0.102
2017-02-07 21:38:45.885 P1 Smart Meter: Serial Worker stopped...
2017-02-07 21:38:45.885 P1 Smart Meter: Using serial port: /dev/ttyUSB0

I started domoticz without the usb device attached.
After I pluged in my usb device again nothing happened in the log.
I went to the hardware tab and updated the hardware added and it gave the last two lines in the log

Plug you device(s) and paste outputs from both windows. Then stop domoticz and udev debugging. Paste additional output of:
Code:
/bin/dmesg | tail n50


The demsg log can be found here http://pastebin.com/rE2VZZCy

Start udev service again.


Top
 Profile  
 
PostPosted: Wed Feb 08, 2017 6:39 pm 
Offline

Joined: Sun Apr 29, 2012 5:24 pm
Posts: 2303
So far so slow. Compiling progress 68 % after ~46 hours. I hope it will finish tomorrow.
Your dmesg output is unexpected subject for concern. usbserial driver is crashing (twice?) and ftdi driver also produces error on usb disconnecting event. I suspect it might not release device node.
Can you repeat part of test, while udev is running:
1. Disconnect device.
2. Clear dmesg buffer:
Code:
/bin/dmesg -c

3. Attach device and wait a bit.
4. Unplug it and paste output of:
Code:
/bin/dmesg


Top
 Profile  
 
PostPosted: Wed Feb 08, 2017 8:24 pm 
Offline

Joined: Sun Feb 05, 2017 12:55 pm
Posts: 21
What did you to to your device that it is making you wait for so long :D

barmalej2 wrote:
Code:
/bin/dmesg


[ 0.000000] usb 1-1.3: new full speed USB device using ehci_marvell and address 9
[ 0.000000] In hub_port_init, usb_device_id = 8, devnum = 9
[ 0.000000] In hub_port_init, and number is 2, retry 0, port 3 .....
[ 0.000000] usb 1-1.3: configuration #1 chosen from 1 choice
[ 0.000000] ftdi_sio 1-1.3:1.0: FTDI USB Serial Device converter detected
[ 0.000000] usb 1-1.3: Detected FT232RL
[ 0.000000] usb 1-1.3: Number of endpoints 2
[ 0.000000] usb 1-1.3: Endpoint 1 MaxPacketSize 64
[ 0.000000] usb 1-1.3: Endpoint 2 MaxPacketSize 64
[ 0.000000] usb 1-1.3: Setting MaxPacketSize 64
[ 0.000000] usb 1-1.3: FTDI USB Serial Device converter now attached to ttyUSB0
[ 0.000000] In usb_disconnect, and number is 1 .....
[ 0.000000] usb 1-1.3: USB disconnect, address 9
[ 0.000000] ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from ttyUSB0
[ 0.000000] ftdi_sio 1-1.3:1.0: device disconnected


Top
 Profile  
 
PostPosted: Wed Feb 08, 2017 9:14 pm 
Offline

Joined: Sun Apr 29, 2012 5:24 pm
Posts: 2303
lucaswiersma wrote:
What did you to to your device that it is making you wait for so long :D
There is 3 reasons, why it is slow. Most important I think, it was leftover setting from previous build script, which set TMPDIR to HDD, thus input-output ops are much slower. Secondly I am using 2.5" HDD, which is again slower than 3,5". Thirdly it is older NSA 310, which has lower specs than yours, if I clearly remember.

Please repeat the last test involving running domoticz after plugging your device. I think it needs to connect to /dev/ttyUSB0 to reproduce driver crash.


Top
 Profile  
 
PostPosted: Thu Feb 09, 2017 8:07 pm 
Offline

Joined: Sun Apr 29, 2012 5:24 pm
Posts: 2303
Here you are. Freshly baked domoticz ffp package for testing. Stop your domoticz service if it running and make sure that you have all deps installed first:
Code:
slapt-get -i boost curl gcc-solibs libusb-compat openssl sqlite uClibc-solibs zlib python

Then
Code:
cd /ffp/funpkg/cache/br2
wget http://downloads.zyxel.nas-central.org/Users/barmalej2/ffp/0.7/arm/packages/testing/domoticz-3.5877-arm-0.txz
wget http://downloads.zyxel.nas-central.org/Users/barmalej2/ffp/0.7/arm/packages/testing/openzwave-1.4.164-arm-1.txz
funpkg -u domoticz-3.5877-arm-0.txz
funpkg -i openzwave-1.4.164-arm-1.txz
sh /ffp/start/domoticz.sh start


WEBui http login port is 8181.
WEBui https login port is 8443


Top
 Profile  
 
PostPosted: Thu Feb 09, 2017 8:26 pm 
Offline

Joined: Sun Feb 05, 2017 12:55 pm
Posts: 21
Installed your version and first tried my luck to see if it worked out of the box. But unfortunately no luck.

So I then repeated the steps from your previous post with the difference of now starting domoticz after plugin in the device.

The output is rather similar to the one without starting domoticz. I also pluged in the device again after removing it when domoticz was started but the output seems to be fine:

[ 0.000000] usb 1-1.3: new full speed USB device using ehci_marvell and address 11
[ 0.000000] In hub_port_init, usb_device_id = 10, devnum = 11
[ 0.000000] In hub_port_init, and number is 2, retry 0, port 3 .....
[ 0.000000] usb 1-1.3: configuration #1 chosen from 1 choice
[ 0.000000] ftdi_sio 1-1.3:1.0: FTDI USB Serial Device converter detected
[ 0.000000] usb 1-1.3: Detected FT232RL
[ 0.000000] usb 1-1.3: Number of endpoints 2
[ 0.000000] usb 1-1.3: Endpoint 1 MaxPacketSize 64
[ 0.000000] usb 1-1.3: Endpoint 2 MaxPacketSize 64
[ 0.000000] usb 1-1.3: Setting MaxPacketSize 64
[ 0.000000] usb 1-1.3: FTDI USB Serial Device converter now attached to ttyUSB0
[ 0.000000] In usb_disconnect, and number is 1 .....
[ 0.000000] usb 1-1.3: USB disconnect, address 11
[ 0.000000] ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from ttyUSB0
[ 0.000000] ftdi_sio 1-1.3:1.0: device disconnected
[ 0.000000] usb 1-1.3: new full speed USB device using ehci_marvell and address 12
[ 0.000000] In hub_port_init, usb_device_id = 11, devnum = 12
[ 0.000000] In hub_port_init, and number is 2, retry 0, port 3 .....
[ 0.000000] usb 1-1.3: configuration #1 chosen from 1 choice
[ 0.000000] ftdi_sio 1-1.3:1.0: FTDI USB Serial Device converter detected
[ 0.000000] usb 1-1.3: Detected FT232RL
[ 0.000000] usb 1-1.3: Number of endpoints 2
[ 0.000000] usb 1-1.3: Endpoint 1 MaxPacketSize 64
[ 0.000000] usb 1-1.3: Endpoint 2 MaxPacketSize 64
[ 0.000000] usb 1-1.3: Setting MaxPacketSize 64
[ 0.000000] usb 1-1.3: FTDI USB Serial Device converter now attached to ttyUSB1


Top
 Profile  
 
PostPosted: Thu Feb 09, 2017 9:12 pm 
Offline

Joined: Sun Apr 29, 2012 5:24 pm
Posts: 2303
I am beginning to think that problem is more drivers related than soft. Do the following commands gives output:
Code:
cat /dev/ttyUSB0
or
Code:
cat /dev/ttyUSB1

Btw. What does button in domoticz WEBUI Setup/Settings section:
Accept new Hardware Devices > Allow for 5 minutes ?


Top
 Profile  
 
PostPosted: Thu Feb 09, 2017 9:22 pm 
Offline

Joined: Sun Feb 05, 2017 12:55 pm
Posts: 21
barmalej2 wrote:

Code:
cat /dev/ttyUSB1




this one does since it is bound to 1 currently.

/ISk5\2ME382-1004

0-0:96.1.1(4B414C37303035313338393938333133)
1-0:1.8.1(08106.678*kWh)
1-0:1.8.2(03481.844*kWh)
1-0:2.8.1(01995.450*kWh)
1-0:2.8.2(04846.873*kWh)
0-0:96.14.0(0001)
1-0:1.7.0(0000.53*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(170209220000)(00)(60)(1)(0-1:24.2.1)(m3)
(05319.147)
0-1:24.4.0(1)
!
/ISk5\2ME382-1004

0-0:96.1.1(4B414C37303035313338393938333133)
1-0:1.8.1(08106.680*kWh)
1-0:1.8.2(03481.844*kWh)
1-0:2.8.1(01995.450*kWh)
1-0:2.8.2(04846.873*kWh)
0-0:96.14.0(0001)
1-0:1.7.0(0000.54*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(170209220000)(00)(60)(1)(0-1:24.2.1)(m3)
(05319.147)
0-1:24.4.0(1)
!

and so on and so on.

Quote:
Btw. What does button in domoticz WEBUI Setup/Settings section:
Accept new Hardware Devices > Allow for 5 minutes ?



From my understanding it allows new sensor to be added for five min. I have added the hardware both with this setting enabled and disabled but both yield the same result.
Hardware can be added. In the log it says that a serial device is connected. But I cannot see any devices in the device tab.


Top
 Profile  
 
PostPosted: Thu Feb 09, 2017 9:38 pm 
Offline
User avatar

Joined: Mon Dec 21, 2015 7:21 pm
Posts: 597
Hi,

Can You please provide a domoticz log file? As I Could saw at the wiki, You Can specify it for example at the start script (or hopefully, the default one is under /ffp/var/log folder somewhere)...

PS: I have not read the discussion from the beginning, So sorry if that is already asked! ;)

_________________
Thanks nas-central the lot of help! :)


Top
 Profile  
 
PostPosted: Thu Feb 09, 2017 10:08 pm 
Offline

Joined: Sun Apr 29, 2012 5:24 pm
Posts: 2303
lucaswiersma wrote:
But I cannot see any devices in the device tab.

Hmm. No devices at all? I can see my mainboard "virtual" devices in list:
Attachment:
domo.png

Do you see them as well?


You do not have the required permissions to view the files attached to this post.


Top
 Profile  
 
PostPosted: Thu Feb 09, 2017 10:56 pm 
Offline

Joined: Sun Feb 05, 2017 12:55 pm
Posts: 21
I will look into the log in a minute.

When I add my motherboard in the hardware section I can see these devices in the device tab like you see.
I removed the motherboard in the hardware section somewhere in the beginning. Even with a new domoticz install it was still gone. Did not realise untill now that I had those before.

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?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 107 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7, 8  Next

All times are UTC


Who is online

Users browsing this forum: Baidu [Spider], Bing [Bot] and 49 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group