Get device battery level (zwave)

I would like to get the battery level of my zwave device weekly. But I couldn't find the exact command for this.

Here the JSON:

	"payload": {

which topic I have to use? I didn't found in OpenZWave::Manager...
cmdclass "128" = COMMAND_CLASS_BATTERY

Maybe anyone got the solution for this.


just send a command like this one

"payload": {"arg":[4,128,1,0]}
with :
4 : nodeId
128 : cmdclass (COMMAND_CLASS_BATTERY)
1 : instance number (usualy good but please check the value in zwcfg_xxx.xml)
0 : index value (usualy good but please check the value in zwcfg_xxx.xmll)

don't forget that the zw controler will send the command on next device wakeup !

Thanks for your input, @Francky.
But I don't receive any feedback.

the device will send the value at it's next wakeup.
This may take fews minutes, or hours, depend on it's wakeup interval... Just wait :slight_smile:

Sure, I'm still waiting. :wink:

In node-red-log, there are no failure oder any other infos. Is there another log I can check?

Add a switch and a debug node to the zwave-in node.

You should get a msg like this:

	"nodeid": 4,
	"notification": 3,
	"help": "Notification - Node Awake",
	"uuid": "xxxx"

In my case I get the message every 6 hours (Wake-up Interval = 21600).

Z-Wave messages already come in (temperature, motion detection, illumination, tamper, node Awake ...).

Only the battery level is not reported. I want to trigger the battery level weekly with a Z-Wave out message. But it didn't work.

JSON (with inject node)

"payload": {"arg":[4,128,1,0]}

I also tried with a function-node - same result.

I use: RazBerry with Fibaro Motion Sensor

node-red-contrib-openzwave version?

Fibaro Motion Sensor type? (e.g. FGMS001)

node-red-contrib-openzwave 1.2.4
Fibaro Motion Sensor FIBEFGMS-001-ZW5

Search in your zwcfg_xxx.xml file after <Node id="4" ... for:

<CommandClass id="128" name="COMMAND_CLASS_BATTERY" version="1" request_flags="4" innif="true">

I didn't find this file.
What's the path?

It should be in your node-red path, on a rpi .node-red
xxx = homeid

There is no zwcfg_xxx.xml file, but ozwcache_xxx.xml

In ozwcache_xxx.xml is command class 128:

<CommandClass id="128" name="COMMAND_CLASS_BATTERY">
	<Compatibility />
	<Instance index="1" />
	<Value type="byte" genre="user" instance="1" index="0" label="Battery Level" units="%" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="88">
		<Help>Current Battery Level</Help>

Strange! see source 10-zwave.js:

this.on("close", function() {
      log('full', 'zwave-controller: close');
      // write out zwcfg_homeid.xml to disk

I would ask the author.