Z-Wave the public standard

Zip reference server/listener


#1

Hi,

Could somebody please detail what functionality it exposes, I tried to use it and it just sits there and reports nothing.
I expected to see some notifications (like devices wake up or something like that) but apparently I don’t understand its functionality.

Thank you,
Adrian


#2

Hi,

I would also appreciate an answer to Adrian’s question since I also can’t see its functionality.

Thanks,
Hokuto


#3

Hi,

In the meantime I found out, so here it is:

The ZIP gateway can be configured to forward the ‘unsolicited packets’ to a specific address & port.
The listener receives those packets.

Adrian


Reference Listener (Again)
#4

Hi Adrian,

It is solved now! Thanks for your help.

Thanks,
Hokuto


#5

Hi,

For the ones who have successfully managed to run the sample codes do you have a documentation which explains
step by step the configuration of the zip gateway and the usage of the reference_listener code.

How should there be a match between the unsolicited address at the zipgateway.cfg file and the parameter given to reference_listener code at startup?

thanks in advance


#6

Hi spero,

In my environment, these parameters seem to be essential.

ZipUnsolicitedDestinationIp6 = fd00:aaaa::0010
ZipUnsolicitedDestinationPort = 1984

You also need to change the port number accordingly, which is hard-coded in reference_listener.c

Hope this helps.

Thanks,
Hokuto


#7

Hi Hokuto,

Thank you for your reply but I would like to elaborate more on my situation.
I have downloaded the libzwaveip from github and compiled the code and with the code the samples are also compiled.
Regarding your pointer to the port number being hardcoded in reference_listener.c as in here


it seems that the port number and the ip address along with the psk is provided as arguments to the compiled code from the command line.

Given these info about my situation this is my zipgateway.cfg file which I have modified to match your comment

ZipUnsolicitedDestinationIp6 = fd00:aaaa::0010
ZipUnsolicitedDestinationPort = 1984
ZipUnsolicitedDestination2Ip6 = fd00:aaaa::0010
ZipUnsolicitedDestination2Port = 1984
ZipCaCert=/usr/local/etc/Portal.ca_x509.pem
ZipCert=/usr/local/etc/ZIPR.x509_1024.pem
ZipPrivKey=/usr/local/etc/ZIPR.key_1024.pem
ZipLanGw6 = fd00:aaaa::1234
ZipPSK=123456789012345678901234567890AA
ZipSerialAPIPortName=/dev/ttyACM0
ZipLanIp6=fd00:aaaa::3
ZipPanIp6=fd00:bbbb::1
ExtraClasses = 0x8F 0x85 0x59 0x5A 0xF100 0x8F 0x85 0x59

after this point I restart the zipgateway service and execute the referenece_listener executable as follows

$>./reference_listener -l fd00:aaaa::0010 -o 1984 -p 123456789012345678901234567890AA

the client starts running with the output

_-------1984
Listening on fd00:aaaa::0010 port 1984

from this point on I am looking to the blinking cursor on screen nothing happens. I have couple of sensors paired with
the sigma z-wave bridge controller they show up when I query my zwave network with the list command from
reference_client as follows

./reference_client -s 10.0.2.16 -p 123456789012345678901234567890AA
(ZIP) list
List of discovered Z/IP services:
— zwDF5F93AB01.local: “Static Controller [df5f93ab0100]”
— zwDF5F93AB06.local: “Switch Binary [df5f93ab0600]”
— zwDF5F93AB07.local: “Sensor Binary [df5f93ab0700]”
(ZIP)

the Sensor Binary is a door window sensor from fibaro and my aim is to get notified by it via the reference_listener

Thank you for your time and effort in advance.


#8

Hi spero,

  • Can you ping6 fd00:aaaa::0010?
  • reference_listener from the last commit 598b397 didn’t work for me neither
  • reference_listener from commit 4797742 worked with the following config file
  • I modified the port number in reference_listener from commit 4797742, it worked
  • also, I issueed a command “send “Switch Binary [xxxxxxxxx]” COMMAND_CLASS_ASSOCIATION ASSOCIATION_SET 0101” from reference_client

ZipSerialAPIPortName = /dev/ttyYourDevice
ZipUnsolicitedDestinationIp6 = fd00:aaaa::0010
ZipUnsolicitedDestinationPort = 1984
ZipUnsolicitedDestination2Ip6 = fd00:aaaa::0010
ZipUnsolicitedDestination2Port = 1984
ZipCaCert=/usr/local/etc/Portal.ca_x509.pem
ZipCert=/usr/local/etc/ZIPR.x509_1024.pem
ZipPrivKey=/usr/local/etc/ZIPR.key_1024.pem
Eepromfile=/usr/local/etc/zipgateway.eeprom
ZipPanIp6 = fd00:bbbb::1
ZipLanIp6 = fd00:aaaa::3
ZipLanGw6 = fd00:aaaa::1234
ZipPSK = 123456789012345678901234567890AA
ExtraClasses = 0x8F 0x85 0x59 0x5A 0xF100 0x8F 0x85 0x59

Thanks,
Hokuto


#9

Hi Hokuto,

as you mentioned at your first bullet I cannot ping6 fd00:aaaa::0010
I get

From fd00:aaaa::7093:a677:7b0b:711 icmp_seq=1 Destination unreachable: Address unreachable

what could be the reason?

as command output the rest of my configuration is nearly the same as yours and I also checked out the
4797742 commit adn run the association commands using the reference_client and I also augmented
the extraclasses as follows

ExtraClasses = 0x20 0x30 0x31 0x43 0x59 0x5A 0x5E 0x70 0x71 0x72 0x73 0x75 0x80 0x84 0x85 0x86

Regards


#10

Hi spero,

I’m now trying with the RPi3 image, not my original environment. It’s not working at my side too.
Are you using RPI3 image too?

There are different behaviours on a different versions (zipgateway, libzwaveip…).
I will post when I have any updates.

Thanks,
Hokuto


#11

Hi Hokuto,
Thank you for your update,

I have three different setups

  1. raspberry pi3 with stock raspbian and everything else needed to run the zipgateway is compiled from source (v2.60.0)
  2. ubuntu 16.04 lts on a VM with bridged network the rest is the same with raspi
    3)native ubuntu 16.06 lts the rest same.

for the libzwaveip in order to use reference_listener and others I have fetched 4797742 version from github as you mentioned.

Regards.


#12

Hi spero,

I tried with zipgateway v2.60.0 (cross built) on a plain Rasbian environment.
The libzwaveip used was commit 7a1ac2b, but I also confirmed that the last master commit works fine too.

Here’s the output which explains better. I hope it helps.

pi@raspberrypi:~/libzwaveip/build $ ps auxf | grep zip
pi    2232  0.0  0.1   3732  1420 pts/1    S+   06:59   0:00  |           \_ grep --color=auto zip
root      1978  0.0  0.3   6264  2888 pts/0    S+   06:58   0:00              \_ sudo /usr/bin/zipgateway
root      1982  0.8  0.6   5632  4612 pts/0    S+   06:58   0:00                  \_ /usr/bin/zipgateway
pi@raspberrypi:~/libzwaveip/build $ uname -a
Linux raspberrypi 4.4.23-v7+ #913 SMP Tue Oct 4 14:16:19 BST 2016 armv7l GNU/Linux
pi@raspberrypi:~/libzwaveip/build $ cat /usr/local/etc/zipgateway.cfg 
ZipSerialAPIPortName = /dev/ttyACM0
ZipUnsolicitedDestinationIp6 = fd00:aaaa::0010
ZipUnsolicitedDestinationPort = 19849
ZipCaCert=/usr/local/etc/Portal.ca_x509.pem
ZipCert=/usr/local/etc/ZIPR.x509_1024.pem
ZipPrivKey=/usr/local/etc/ZIPR.key_1024.pem
Eepromfile=/usr/local/etc/zipgateway.eeprom
TunScript=/usr/local/etc/zipgateway.tun
ZipPanIp6 = fd00:bbbb::1
ZipLanIp6 = fd00:aaaa::3
ZipLanGw6 = fd00:aaaa::1234
ZipPSK=123456789012345678901234567890AA

pi@raspberrypi:~/libzwaveip/build $ git status
HEAD detached at 7a1ac2b
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

	modified:   ../examples/reference_apps/reference_listener.c

no changes added to commit (use "git add" and/or "git commit -a")

pi@raspberrypi:~/libzwaveip/build $ sudo ip addr add fd00:aaaa::0010/64 dev tap0
pi@raspberrypi:~/libzwaveip/build $ sudo ip -6 route add fd00:bbbb::/64 via fd00:aaaa::3
pi@raspberrypi:~/libzwaveip/build $ ./reference_client -s fd00:aaaa::3
PSK not configured - using default
(ZIP) list
List of discovered Z/IP services:
---   zwDF3C5BB901.local: "Static Controller [df3c5bb90100]"
---   zwDF3C5BB936.local: "Switch Binary [df3c5bb93600]"
(ZIP) send "Switch Binary [df3c5bb93600]" COMMAND_CLASS_ASSOCIATION ASSOCIATION_SET 0101
(ZIP) 
pi@raspberrypi:~/libzwaveip/build $ ./reference_listener -l fd00:aaaa::0010
PSK not configured - using default
Listening on fd00:aaaa::0010 port 19849
2001FF

cmd_class:  COMMAND_CLASS_BASIC  v2
cmd:  BASIC_SET 
    Value >
 	FF
bytestream:  20 01 ff

2001FF

cmd_class:  COMMAND_CLASS_BASIC  v2
cmd:  BASIC_SET 
    Value >
 	FF
bytestream:  20 01 ff

2001FF

cmd_class:  COMMAND_CLASS_BASIC  v2
cmd:  BASIC_SET 
    Value >
 	FF
bytestream:  20 01 ff

#13

I there. I have the same problem. I did everything as described and I do receive messages.

I added some classes to the ExtraClasses field, but I do not get messages for status change of devices. For example I do receive messages after inclusio/exclusion. If I manually wake up the sensor I also get a message but the COMMAND_CLASS_ALARM (0x71) I do not receive although I put it in the ExtraClasses field.

What is the reason for that?


#14

Hi,

I’m also searching for a solution. I cannot receive any notification from my nodes.

Regards,

Aurélien