Author Topic: New Z-Wave driver  (Read 58603 times)

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: New Z-Wave driver
« Reply #105 on: May 28, 2009, 09:41:45 am »
i don't see any received DCE commands in that log. Please provide the complete log and tell me the exact timestamps when things did not work. Please have the ACT unit replaced. I really suspect it is flaky.

Btw, what do you mean with innovus controller? A portable controller used as inclusion remote?

br, Hari
rock your home - http://www.agocontrol.com home automation

Viking

  • Addicted
  • *
  • Posts: 521
    • View Profile
Re: New Z-Wave driver
« Reply #106 on: May 28, 2009, 10:31:35 am »
Hallo Hari,

the ACT works like it should ;), but the Merten is the one that does not always work (ans also did not work the last time). After quick reloading this morning I switched it off using the orbiter and that worked. Unfortunately I did not think about trying to switch it off using the webinterface - maybe that would not work. I will have to try that the next time.

What exactly do you need ? I added the loglevel 36,40 and 41. in /etc/pluto.conf - is that not enough ?

Logfile is attached.

With "Innovus controller" I mean the Innovus Viasens 100 USB.

I am still using the Tricklestar ZW200-EU-W as SIS inclusion controller.


And I am still using the "ZWave-0.0.2-0710-32bit.bz2" driver. I have already compiled a newer one, but not installed it yet.

Greetings
Viking

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: New Z-Wave driver
« Reply #107 on: May 28, 2009, 11:10:39 am »
The Viasens is from Seluxit, not Innovus ;-)

Does the operation only fail for timed events or also for manual floorplan/web admin operation? Do you have some timestamps for me when problems occured?

best regards,
Hari
rock your home - http://www.agocontrol.com home automation

Viking

  • Addicted
  • *
  • Posts: 521
    • View Profile
Re: New Z-Wave driver
« Reply #108 on: May 29, 2009, 11:01:53 am »
Uuups, OK then viasens :)

I very rarely turn off theese lights manual. The idea is that the outside lights go on at sunset and the frontlight (Merten) goes off at sunrise. The lights in the garten is turned off at 23:59 (when we go to bed). With the Tricklestar it did not always work with both of them. Very offen it then worked after a quick reload but at least once that did not help. With the Viasens I only had the problem once and there the ACT(garten off at midnight) worked, but the fronside light (merten off at sunrise) did NOT work.

Timestamps - I would say search for "ON" and "OFF" as it is only done very rearely ;) and those at sunset/rise are the ones.

I hope that helps :)

Greetings
Viking

Viking

  • Addicted
  • *
  • Posts: 521
    • View Profile
Re: New Z-Wave driver
« Reply #109 on: May 29, 2009, 12:53:17 pm »
Just FYI

Today it worked again, it will probably work for some days and then stop working again. S

As I noted above IIRC then there always was the "something has changed, reload router?" message on the orbiter when it did not work.

Greetings
Viking

Viking

  • Addicted
  • *
  • Posts: 521
    • View Profile
Re: New Z-Wave driver
« Reply #110 on: June 01, 2009, 10:07:00 pm »
Hi Hari,

tried a newer driver from SVN - compiled fine, but did not work :

Code: [Select]
05      06/01/09 21:05:12.662           void ClientSocket::Disconnect() on this socket: 0x807a1c0 (m_Socket: 7) <0xb78c26c0>
Return code: 2
2       06/01/09 21:05:12       35 (spawning-device)    Device requests restart... count=2/50 dev=35
Mon Jun  1 21:05:12 CEST 2009 Restart
========== NEW LOG SECTION ==========
1       06/01/09 21:05:21       35 (spawning-device)    Starting... 2
1       06/01/09 21:05:21       35 (spawning-device)    Found /usr/pluto/bin/ZWave
Return code: 139
3       06/01/09 21:05:35       35 (spawning-device)    Device died... count=2/50 dev=35
Mon Jun  1 21:05:35 CEST 2009 died
========== NEW LOG SECTION ==========
1       06/01/09 21:05:45       35 (spawning-device)    Starting... 3
1       06/01/09 21:05:45       35 (spawning-device)    Found /usr/pluto/bin/ZWave
Return code: 139
3       06/01/09 21:05:45       35 (spawning-device)    Device died... count=3/50 dev=35
Mon Jun  1 21:05:45 CEST 2009 died

I pressed "Quick reload" and the copied it while it was unloaded. but it somehow died with error code 139.

Greetings
Viking

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: New Z-Wave driver
« Reply #111 on: June 02, 2009, 08:08:40 am »
139 is a segfault. How did you compile it? Did you mix libraries? If not I'd be interested in the coredump (should be in /usr/pluto/coredump/).

br, Hari
rock your home - http://www.agocontrol.com home automation

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: New Z-Wave driver
« Reply #112 on: June 02, 2009, 08:43:15 am »
Hi Viking,

was checking the provided logs, we had no error on the ON commands that I found in the logs:

light has been off, see the polling results:
36   05/27/09 21:50:53.415      Got basic report from node 3, value: 0 <0xb78d9b90>
36   05/27/09 21:50:53.571      Got basic report from node 4, value: 0 <0xb78d9b90>

then we get the DCE command:
36   05/27/09 21:51:01.914      ON RECEIVED FOR CHILD 4 <0xb68d7b90>
36   05/27/09 21:51:01.916      ON RECEIVED FOR CHILD 3 <0xb68d7b90>

we send a job to node 4, after the 0x13 (ZW_SEND) you see the node id (0x4):
40   05/27/09 21:51:02.014      Sending job 0x840e7e8 (cb 141) - 0x1 0xa 0x0 0x13 0x4 0x3 0x20 0x1 0xff 0x5 0x8d 0xb7 (#\n#### #####) <0xb78d9b90>

and we succeed:
36   05/27/09 21:51:02.062      ZW_SEND was successful, removing job <0xb78d9b90>

same for node 3:
40   05/27/09 21:51:02.162      Sending job 0x840ea08 (cb 142) - 0x1 0xa 0x0 0x13 0x3 0x3 0x20 0x1 0xff 0x5 0x8e 0xb3 (#\n#### #####) <0xb78d9b90>
36   05/27/09 21:51:02.210      ZW_SEND was successful, removing job <0xb78d9b90>

next report shows them switched on:
36   05/27/09 21:51:35.264      Got basic report from node 3, value: 255 <0xb78d9b90>
36   05/27/09 21:51:35.420      Got basic report from node 4, value: 255 <0xb78d9b90>


I've also checked the OFF commands, and this is where things get interesting:

node 3 is off and node 4 is on:
36   05/28/09 4:47:21.079      Got basic report from node 3, value: 0 <0xb78d9b90>
36   05/28/09 4:47:21.161      Got basic report from node 4, value: 255 <0xb78d9b90>

we get the OFF:
36   05/28/09 4:47:22.284      OFF RECEIVED FOR CHILD 4 <0xb68d7b90>
36   05/28/09 4:47:22.285      OFF RECEIVED FOR CHILD 3 <0xb68d7b90>

send to 4 and 3, both succeed:
40   05/28/09 4:47:22.286      Sending job 0x8479f08 (cb 185) - 0x1 0xa 0x0 0x13 0x4 0x3 0x20 0x1 0x0 0x5 0xb9 0x7c (#\n#### ####|) <0xb78d9b90>
36   05/28/09 4:47:22.334      ZW_SEND was successful, removing job <0xb78d9b90>
40   05/28/09 4:47:22.439      Sending job 0x847a128 (cb 186) - 0x1 0xa 0x0 0x13 0x3 0x3 0x20 0x1 0x0 0x5 0xba 0x78 (#\n#### ####x) <0xb78d9b90>
36   05/28/09 4:47:22.487      ZW_SEND was successful, removing job <0xb78d9b90>

but on the next report:
36   05/28/09 4:47:53.076      Got basic report from node 3, value: 0 <0xb78d9b90>
36   05/28/09 4:47:53.234      Got basic report from node 4, value: 255 <0xb78d9b90>

Please note that the node 4 is not off. But we got an acknowledge from that exact node that the ZW_SEND did succeed. Did you manually operate it between the OFF and the next polling report?

The third OFF occurence has no errors either:
36   05/27/09 23:59:20.353      OFF RECEIVED FOR CHILD 3 <0xb68d7b90>
40   05/27/09 23:59:20.407      Sending job 0x842fb28 (cb 136) - 0x1 0xa 0x0 0x13 0x3 0x3 0x20 0x1 0x0 0x5 0x88 0x4a (#\n#### ####J) <0xb78d9b90>
36   05/27/09 23:59:20.455      ZW_SEND was successful, removing job <0xb78d9b90>

That makes me assume that you don't have a problem with the DCE Z-Wave driver or the dongle itself. I can't see any errors for the ON/OFF commands in the log. When you further look at the issue, just check for ON/OFF log entries like above. When you see the "ZW_SEND was successful" for that job, everything from the z-wave side is fine for that command.

best regards,
Hari
rock your home - http://www.agocontrol.com home automation

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: New Z-Wave driver
« Reply #113 on: June 03, 2009, 12:20:19 pm »
i was busy finishing the associaton stuff and supporting non-listening devices without wake up command class. So you can now set associations for e.g. merten remote switches with the  web admin and then tripple press the switch to awake.

I've looked a the needed command for the softreset, is very easy, I'm just thinking about how (and how often) to trigger that. Be prepared to see some code over the next days.

br,Hari
rock your home - http://www.agocontrol.com home automation

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: New Z-Wave driver
« Reply #114 on: June 03, 2009, 10:33:11 pm »
the event (on/off) will come soon (already there for EnOcean, just need to implement). Be aware that we are not able to distinguish the different paddles, z-wave does not give us that information.

best regards,
Hari
rock your home - http://www.agocontrol.com home automation

caiman

  • Veteran
  • ***
  • Posts: 119
    • View Profile
Re: New Z-Wave driver
« Reply #115 on: June 03, 2009, 11:01:48 pm »
Hi Hari and team,

has anyone tried or made the Schlage z-wave doorlock work with LMCE ?
http://consumer.schlage.com/LiNK/

It is sold with its own zwave controller, but of course I would love to integrate it with the existing LMCE network and be able to get notifications in LMCE when someone unlocks the door...

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: New Z-Wave driver
« Reply #116 on: June 03, 2009, 11:58:37 pm »
encryption support is a different beast, I'm not aware of any secure inclusion controllers. So only pairing in reach of the core, and we'd need a bunch of code for the needed command classes and utilize some aes implementation. I don't think I feel like doing that until those devices are available in Europe. But if you want to look into z-wave development, I can assist you with that task :-)

br, Hari
rock your home - http://www.agocontrol.com home automation

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: New Z-Wave driver
« Reply #117 on: June 04, 2009, 11:32:48 pm »
Hi Domodude,

I've added the soft reset to the code. But it is not yet triggered automatically. Would you mind to try the latest svn revision and send a "StatusReport" DCE command to the Z-Wave interface when it locks up? That will do soft reset. If this solves the problem I'll add some error counters and a trigger.

best regards,
Hari
rock your home - http://www.agocontrol.com home automation

Viking

  • Addicted
  • *
  • Posts: 521
    • View Profile
Re: New Z-Wave driver
« Reply #118 on: June 05, 2009, 03:14:12 pm »
139 is a segfault. How did you compile it? Did you mix libraries? If not I'd be interested in the coredump (should be in /usr/pluto/coredump/).

Sorry for the late reply, my house, wife, kids and jobs cost me a lot of time at the moment ;)

Some time ago I did this on my core :

Code: [Select]
svn co http://svn.linuxmce.org/svn/trunk #this will take a while
cd trunk
./configure
make

And when building again I went to the Zwave directory on that checkout, did a svn update (which did not do anything) and then IIRC I did a "make clean" and a "make ; make bin"

What is the right way of doing it ? And what do you mean by "did you mix libraries" ?

Greetings
Viking

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: New Z-Wave driver
« Reply #119 on: June 05, 2009, 04:06:34 pm »
no, thats not the proper way of doing it. Something like that should work:

Code: [Select]
svn co http://svn.linuxmce.org/svn/branches/LinuxMCE-0710/src LinuxMCE-0710/src
svn co http://svn.linuxmce.org/svn/branches/LinuxMCE-0810/src/ZWave LinuxMCE-0810/src/ZWave
cd LinuxMCE-0710/src
cp /usr/pluto/lib/*.so lib/
rm -r ZWave
cp -r ../../LinuxMCE-0810/src/ZWave .
cd ZWave

# edit the file 'Makefile' and remove this line: SNR_CPPFLAGS ?= <-mkr_t_compile_defines->

make bin

(all commands are from memory, so you maybe have to tweak one path or the other)

best regards,
Hari
rock your home - http://www.agocontrol.com home automation