Tag: Ago Control

RaspberryPi ZWave.me and agocontrol configuration

Raspberry Pi with RazBerry Zwave daughter card installed
Raspberry Pi B+ Board with RazBerry Zwave daughter card installed
Been fighting with getting agocontrol working with Rasbian Wheezy for a few days. Seeing messages like this in /var/log/messages:

Feb 1 13:00:31 raspberrypi agozwave[455]: ERROR: ZW_SEND_DATA could not be delivered to Z-Wave stack
Feb 1 13:00:33 raspberrypi agozwave[455]: ERROR: ZW_SEND_DATA could not be delivered to Z-Wave stack
Feb 1 13:00:34 raspberrypi agozwave[455]: WARNING: Unexpected Callback ID received
Feb 1 13:00:35 raspberrypi agozwave[455]: ERROR: Dropping command, expected response not received after 3 attempt(s)
Feb 1 13:00:37 raspberrypi agozwave[455]: ERROR: ZW_SEND_DATA could not be delivered to Z-Wave stack
Feb 1 13:00:39 raspberrypi agozwave[455]: ERROR: ZW_SEND_DATA could not be delivered to Z-Wave stack
root@raspberrypi:/var/log# tail messages
Feb 1 13:00:35 raspberrypi agozwave[455]: ERROR: Dropping command, expected response not received after 3 attempt(s)
Feb 1 13:00:37 raspberrypi agozwave[455]: ERROR: ZW_SEND_DATA could not be delivered to Z-Wave stack
Feb 1 13:00:39 raspberrypi agozwave[455]: ERROR: ZW_SEND_DATA could not be delivered to Z-Wave stack
Feb 1 13:00:41 raspberrypi agozwave[455]: ERROR: Dropping command, expected response not received after 3 attempt(s)
Feb 1 13:00:41 raspberrypi agozwave[455]: ERROR: ZW_SEND_DATA could not be delivered to Z-Wave stack

Also in the webmin on the zwave plugin at the top see:
zwavecontroller is not responding. Unable to execute action

Several fixes here:

  1. First, make sure you have a /etc/opt/agocontrol/conf.d/zwave.conf file with this text:

    [zwave]
    device=/dev/ttyAMA0
  2. Next, we need to disable the serial console which is configured to /dev/ttyAMA0. This requires editing two files:
    1. /etc/inittab
    Change this line:

    T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100

    and disable the serial console with a # sign in front and save the file.

    #T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100

    2. /boot/cmdline.txt
    It should look like this:

    dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait

    Change to like so, (removing console=ttyAMA0,115200 kgdboc=ttyAMA0,115200) and save.

    dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
  3. Third, run the command: dmesg | grep tty
    You’ll see something like this:

    [ 0.000000] Kernel command line: dma.dmachans=0x7f35 bcm2708_fb.fbwidth=1318 bcm2708_fb.fbheight=736 bcm2708.boardrev=0x10 bcm2708.serial=0xd2466e69 smsc95xx.macaddr=B8:27:EB:46:6E:69 bcm2708_fb.fbswap=1 bcm2708.disk_led_gpio=47 bcm2708.disk_led_active_low=0 sdhci-bcm2708.emmc_clock_freq=250000000 vc_mem.mem_base=0x1ec00000 vc_mem.mem_size=0x20000000 dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p6 rootfstype=ext4 elevator=deadline rootwait
    [ 0.001423] console [tty1] enabled
    [ 0.706431] dev:f1: ttyAMA0 at MMIO 0x20201000 (irq = 83, base_baud = 0) is a PL011 rev3

    See the last line, thats the zwave.me RazBerry. Note the revision level is 3. The folks at zwave.me missed a production step (see http://razberry.z-wave.me/index.php?id=29). Easy to solve. Just do in terminal of your Raspberry Pi:

    echo -ne "\x01\x04\x00\x42\x01\xB8" > /dev/ttyAMA0

    After making that change run the command below to shutdown Wheezy.

    shutdown -h now

    And then power cycle the RaspberryPi, waiting a few seconds before plugging back in.