Aeotec Water Sensor reporting NaN

  • Platform information:

    • Hardware: Raspberry Pi 4 Model B Rev 1.2
    • OS: Raspbian GNU/Linux 10 (buster)
    • Java Runtime Environment: openjdk version “1.8.0_252”
    • openHAB version: 2.5.6-2
  • Issue of the topic: Aeotec Water Sensor 6 is online but reporting NaN. I just installed a HUSBZB-1 Z-wave stick which went smoothly, and it is configured with a serial port. The Z-wave stick found the Water Sensor and added it as a thing along with the channels. However, the reported temperature and battery level is -NaN, and if I activate the water alarm it is not reported.

Please let me know what info I need to provide in order to diagnose. Thank you!

Welcome

The zwave binding instructions are pretty clear about how to collect debug logs when things to not go as planned. If you did plan this, then never mind. :wink:

Have you added Items linked to the Channels and woken the device up several times until it completed initialization?

1 Like

Ah, I did not add items! Thank you, I’ll try that. I kept the device awake for 15 min when I added it.

I started debug logging, uninstalled the device and z-wave stick, then reinstalled Both devices appeared to install normally according to the documentation for the zwave binding and the water sensor. Still the same behavior – both z-wave serial controller and the water sensor are online, but when I go into PaperUI > Control, the water sensor channels are not reporting any data. I used simple mode for item linking.

I didn’t see anything obvious in the debug logs, but I also don’t know exactly what to look for. Due to the size, the log file can be downloaded here.

https://drive.google.com/file/d/1VaewODgYya34wh6K3rKbncZWxwSCBtZ1/view?usp=sharing

It looks like the device is joining ok, but it’s not fully initialised. Try waking the device up a few times to see if this completes. If it doesn’t, please provide a longer log showing what happens when it stops.

The device also won’t send reports until the initialisation is complete - or at least more complete than I see in this log. That’s because the device needs to be told to send reports, and this is done during the initialisation phase.

1 Like

The device was saying it was Online only, but now it is saying:

Status: ONLINE Node initialising: GET_CONFIGURATION

I’ve kept the device awake for 15 min after installation, and have periodically reawakened it.

Thats still online - the second part simply means that it’s still initialising.

How? I suspect that it went to sleep pretty quickly.

Do this a few more times then. The GET_CONFIGIRATION status is nearly at the end of the initialisation phase. At this point the device ought to report changes as well.

The docs for this device says you can hold down the Action button on the device for 3 seconds until it glows yellow, then it stays awake for 10 minutes, or 15, not sure.

Partial success. After much searching I found in these forums that I should update etc/default/openhab2 with the serial port paths for the Zwave stick. I didn’t think this was necessary since they were already showing up in the drop-down, but apparently its needed for reliability.

EXTRA_JAVA_OPTS="-Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB0:/dev/ttyS0:/dev/ttyS2:/dev/ttyACM0:/dev/ttyAMA0"

I did that, then reinstalled the Water Sensor. After it finished initialization it began to report temperature and battery, as viewed in the Control page in PaperUI. Woo-hoo! It’s been a few hours and it is still online and apparently working.

However, after manually setting off the vibration alarm or water alarm these events were still not being reported in the Control page. Again, I used Simple Mode to set up the channels. I wonder if I should manually add items instead?

Most everyone here has avoided simple mode. I strongly suspect it may not be available in OH3.

You can choose whether to create items through the Paper UI, through text files, or through the REST API. Which one you choose is a personal choice based on your experience level.

Hi,

So my partial success was short-lived, but here is a clue. If I pull out my z-wave stick and reinsert it, let it come online, then activate my z-wave device, it will update the channels. After that, if I activate my device again, the channels will no longer update. The z-wave controller is reporting additional start frames and frames acknowledged, though, each time I activate the device. The relevant logs for this exact scenario are below. I still couldn’t find a smoking gun in the logs but again I’m a newbie at this. Thanks again. Relevant logs at: https://drive.google.com/file/d/1VaewODgYya34wh6K3rKbncZWxwSCBtZ1/view?usp=sharing

Have you got any openHAB Items linked to these channels?

Yes, automatically via simple mode. I plan to create my own items manually but haven’t done it yet. Regardless, it works once then not again.

My guess here is that the issue is with associations. The fact that it updates once tells me that polling is working (the binding will poll the state on startup), but if it’s not routinely updating, then this probably indicates that associations are not configured.

This should be configured during startup, but can also be configured manually using the UI.

1 Like

The associations are automatically set up such that lifeline is sent to Controller, and that’s it. From what I’ve read that’s the proper way to do it. Are there other association options to set?

I also found this relevant thread on the forum, which is pretty discouraging. It seems like if this water sensor doesn’t work, it just doesn’t work, although others have reported success with it in OpenHab. Aeotec Water Sensor 6 ZW122 Won't Report

Yes, that’s what I said above - this should be configured automatically during startup, but if something didn’t work for some reason, then you could try and set it manually.

I think that’s unlikely, and as I already said, IMHO this is likely to be related to association configuration. The link that you posted looks the same issue to me.

Well I appreciate your help here Chris. But you’ll have to talk me through this, being a newbie. Now I can edit the Sensor thing manually and confirm that the association groups are set:

Is there something else related to associations I should be checking?

All I can really suggest is to change it to something else, then change it back. You must then wake up the device so that the configuration actually transfers, or wait until after the next wakeup.

If you grab a log of this we can take a look.

I did that. Instead of using PaperUI, I did this with Habmin since I read in the forums that was the preferred way to work with Zwave devices (I don’t know why). I also changed, somewhat out of desperation, the Wakeup Time Out from 30 to 60 seconds, though I don’t think it mattered. I further removed the links created by Simple Mode and manually added my own items.

After all this, it started working. I’m not sure what did it, though. It has reliably been reporting the flood alarm, and I created a rule to send an Alexa announcement when it happens. So all of that is a major success for me. So thank you Chris for your patience and help, it’s much appreciated. Below are my device settings and items file in case anyone might find it useful.

Configuration Parameters

2: Enable/Disable Power on Wake Period
Enabled

8: WakeUp Time Out
60

48: Enable/Disable Sensor report
Enable Sensor report

88: Basic Set sent to association group 3
Send nothing

89: Basic Set sent to association group 4
Send nothing

94: Power source level reported
Report Battery power level

101: Lifeline Report Type
Battery and Temperature

111: Lifeline Report Interval
3600

Association Groups

1: Lifeline
Controller

2: Sensor Status
(empty)

3: Sensor 1 Alarm
(empty)

4: Sensor 2 Alarm
(empty)

Device Configuration

Polling Period
3 hours

Command Poll Period
1500

Wakeup Configuration

Wakeup Interval
3600

Items file:

Number:Temperature Sensor_Temp_F   "Sensor Temperature F"  { channel="zwave:device:a5f14603:node3:sensor_temperature" }
Number             Battery_Level   "Battery Level"         { channel="zwave:device:a5f14603:node3:battery-level" }
Number             Alarm_Flood1    "Flood Alarm1"          { channel="zwave:device:a5f14603:node3:alarm_flood1" }
Number             Alarm_Flood2    "Flood Alarm2"          { channel="zwave:device:a5f14603:node3:alarm_flood2" }