How do I get batterylevels back?

Please use template to report bugs and problems. Post here your questions when not sure where else to post
Only for bugs in the Domoticz application! other problems go in different subforums!

Moderators: leecollings, remb0

Forum rules
Before posting here, make sure you are on the latest Beta or Stable version.
If you have problems related to the web gui, clear your browser cache + appcache first.

Use the following template when posting here:

Version: xxxx
Platform: xxxx
Plugin/Hardware: xxxx
Description:
.....

If you are having problems with scripts/blockly, always post the script (in a spoiler or code tag) or screenshots of your blockly

If you are replying, please do not quote images/code from the first post

Please mark your topic as Solved when the problem is solved.
Doler
Posts: 159
Joined: Friday 31 July 2015 21:02
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Sint-Oedenrode, Netherlands
Contact:

How do I get batterylevels back?

Post by Doler »

Sinds some time I'm missing the battery level report on Z-wave devices. It concerns motion sensors from Fibar/Neo and doorsensors from Neo. I am checking battery levels with a Lua script using:

Code: Select all

local function getDevices()
	local  url = dz.settings['Domoticz url'] .. "/json.htm?type=command&param=getdevices&used=true&displayhidden=1" 
	dz.openURL({ url = url, method = "GET", callback = CALLBACK })
end

local function processDevices(result)
	for index in pairs(result) do
		local deviceName = result[index].Name
		local batteryLevel = result[index].BatteryLevel
		
		dz.log(format('Device: %s, Battery level %s %%', deviceName, batteryLevel), dz.LOG_INFO)
		if batteryLevel and batteryLevel ~= 255  then
			dz.globalData.batteryLevels[deviceName] = batteryLevel
		end
	end
end
and in another script checking the retrieved values against a threshold level. This works for all battery operated devices (like Zigbee) but not, sinds some time, for the mentioned Z-wave devices.

The discovery configs are all like this:

Code: Select all

FMS1
temperature_air
config = {"value_template":"{{ value_json.value }}","unit_of_measurement":"°C","state_class":"measurement","device_class":"temperature","state_topic":"zwave/FMS1/49/0/Air_temperature","availability":[{"payload_available":"true","payload_not_available":"false","topic":"zwave/FMS1/status","value_template":"{{'true' if value_json.value else 'false'}}"},{"topic":"zwave/_CLIENTS/ZWAVE_GATEWAY-zwave-js-ui/status…
illuminance
config = {"value_template":"{{ value_json.value }}","unit_of_measurement":"lx","state_class":"measurement","device_class":"illuminance","state_topic":"zwave/FMS1/49/0/Illuminance","availability":[{"payload_available":"true","payload_not_available":"false","topic":"zwave/FMS1/status","value_template":"{{'true' if value_json.value else 'false'}}"},{"topic":"zwave/_CLIENTS/ZWAVE_GATEWAY-zwave-js-ui/status","v…
battery_level
config = {"value_template":"{{ value_json.value }}","unit_of_measurement":"%","device_class":"battery","state_topic":"zwave/FMS1/128/0/level","availability":[{"payload_available":"true","payload_not_available":"false","topic":"zwave/FMS1/status","value_template":"{{'true' if value_json.value else 'false'}}"},{"topic":"zwave/_CLIENTS/ZWAVE_GATEWAY-zwave-js-ui/status","value_template":"{{'online' if value_js…
And the report for the battery_level like this:

Code: Select all

128
0
isLow = {"time":1753016911001,"value":false,"nodeName":"FMS1","nodeLocation":"Living"}
level = {"time":1753639020819,"value":100,"nodeName":"FMS1","nodeLocation":"Living"}
In this example the battery level appears on the FMS1 MultiSensor device, on other hardware devices (if reported) on Low Battery. After enabling new devices and restarting the Z-wave AD hardware new devices '...128-0-level' were created, something that (imho) should not be.

Code: Select all

71	  ZWave-AD	zwavejs2mqtt_0xfe88fc1e_14-156-0-state-0	1	FMS1 | MultiSensor		    Light/Switch	Switch		  Off	    -	
72	  ZWave-AD	zwavejs2mqtt_0xfe88fc1e_14-48-0-Any  		1	FMS1 | Motion Living		  Light/Switch	Switch		  Off	    -	-
73	  ZWave-AD	zwavejs2mqtt_0xfe88fc1e_14-49-0-Illuminance	    1	FMS1 | Lux Living		      Lux		        Lux		      9 Lux	  -	-
74	  ZWave-AD	zwavejs2mqtt_0xfe88fc1e_14-49-0-Air_temperature	1	FMS1 | Temperature Living	Temp	THR128/138, THC138	24.3 C	-	-
75	  ZWave-AD	zwavejs2mqtt_0xfe88fc1e_14-128-0-isLow		      1	FMS1 | Low Battery		    Light/Switch	Switch		  Off	    -	-
1030	  ZWave-AD	zwavejs2mqtt_0xfe88fc1e_14-128-0-level		      1	FMS1 | Battery Level		  General	      Percentage	100%	  -	-
Could there be a connection with the commit on June 15?
Mark: Domoticz latest Beta on Virtual machine (Proxmox) running Debian Bookworm - Z-Stick 7 - RFXCom - P1 - SolarEdge - Dahua - Philips Hue - Docker - Zigbee2mqtt (latest, docker) via python plugin - Zwave-js-ui (latest, docker) - dzVents - Nodered
User avatar
waltervl
Posts: 6002
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2025.1
Location: NL
Contact:

Re: How do I get batterylevels back?

Post by waltervl »

You are not mentioning on what version of Domoticz and Zwave-JS-Ui you are.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Doler
Posts: 159
Joined: Friday 31 July 2015 21:02
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Sint-Oedenrode, Netherlands
Contact:

Re: How do I get batterylevels back?

Post by Doler »

All latest version (see my signature).

I forgot to mention that the newly created devices (Battery_level) are NOT updated.
Mark: Domoticz latest Beta on Virtual machine (Proxmox) running Debian Bookworm - Z-Stick 7 - RFXCom - P1 - SolarEdge - Dahua - Philips Hue - Docker - Zigbee2mqtt (latest, docker) via python plugin - Zwave-js-ui (latest, docker) - dzVents - Nodered
User avatar
gizmocuz
Posts: 2594
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: How do I get batterylevels back?

Post by gizmocuz »

All your above config payloads are truncated and you also need to post the complete topics
Quality outlives Quantity!
Doler
Posts: 159
Joined: Friday 31 July 2015 21:02
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Sint-Oedenrode, Netherlands
Contact:

Re: How do I get batterylevels back?

Post by Doler »

The not truncated configs for FMS1:

Code: Select all

zwave-ad/sensor/FMS1/temperature_air/config
{
  "value_template": "{{ value_json.value }}",
  "unit_of_measurement": "°C",
  "state_class": "measurement",
  "device_class": "temperature",
  "state_topic": "zwave/FMS1/49/0/Air_temperature",
  "availability": [
    {
      "payload_available": "true",
      "payload_not_available": "false",
      "topic": "zwave/FMS1/status",
      "value_template": "{{'true' if value_json.value else 'false'}}"
    },
    {
      "topic": "zwave/_CLIENTS/ZWAVE_GATEWAY-zwave-js-ui/status",
      "value_template": "{{'online' if value_json.value else 'offline'}}"
    },
    {
      "payload_available": "true",
      "payload_not_available": "false",
      "topic": "zwave/driver/status"
    }
  ],
  "availability_mode": "all",
  "json_attributes_topic": "zwave/FMS1/49/0/Air_temperature",
  "device": {
    "identifiers": [
      "zwavejs2mqtt_0xfe88fc1e_node14"
    ],
    "manufacturer": "Fibargroup",
    "model": "Motion Sensor (FGMS001)",
    "name": "FMS1",
    "sw_version": "2.7"
  },
  "name": "FMS1_temperature_air",
  "unique_id": "zwavejs2mqtt_0xfe88fc1e_14-49-0-Air_temperature"
}

zwave-ad/sensor/FMS1/illuminance/config
{
  "value_template": "{{ value_json.value }}",
  "unit_of_measurement": "lx",
  "state_class": "measurement",
  "device_class": "illuminance",
  "state_topic": "zwave/FMS1/49/0/Illuminance",
  "availability": [
    {
      "payload_available": "true",
      "payload_not_available": "false",
      "topic": "zwave/FMS1/status",
      "value_template": "{{'true' if value_json.value else 'false'}}"
    },
    {
      "topic": "zwave/_CLIENTS/ZWAVE_GATEWAY-zwave-js-ui/status",
      "value_template": "{{'online' if value_json.value else 'offline'}}"
    },
    {
      "payload_available": "true",
      "payload_not_available": "false",
      "topic": "zwave/driver/status"
    }
  ],
  "availability_mode": "all",
  "json_attributes_topic": "zwave/FMS1/49/0/Illuminance",
  "device": {
    "identifiers": [
      "zwavejs2mqtt_0xfe88fc1e_node14"
    ],
    "manufacturer": "Fibargroup",
    "model": "Motion Sensor (FGMS001)",
    "name": "FMS1",
    "sw_version": "2.7"
  },
  "name": "FMS1_illuminance",
  "unique_id": "zwavejs2mqtt_0xfe88fc1e_14-49-0-Illuminance"
}

zwave-ad/sensor/FMS1/battery_level/config
{
  "value_template": "{{ value_json.value }}",
  "unit_of_measurement": "%",
  "device_class": "battery",
  "state_topic": "zwave/FMS1/128/0/level",
  "availability": [
    {
      "payload_available": "true",
      "payload_not_available": "false",
      "topic": "zwave/FMS1/status",
      "value_template": "{{'true' if value_json.value else 'false'}}"
    },
    {
      "topic": "zwave/_CLIENTS/ZWAVE_GATEWAY-zwave-js-ui/status",
      "value_template": "{{'online' if value_json.value else 'offline'}}"
    },
    {
      "payload_available": "true",
      "payload_not_available": "false",
      "topic": "zwave/driver/status"
    }
  ],
  "availability_mode": "all",
  "json_attributes_topic": "zwave/FMS1/128/0/level",
  "device": {
    "identifiers": [
      "zwavejs2mqtt_0xfe88fc1e_node14"
    ],
    "manufacturer": "Fibargroup",
    "model": "Motion Sensor (FGMS001)",
    "name": "FMS1",
    "sw_version": "2.7"
  },
  "name": "FMS1_battery_level",
  "unique_id": "zwavejs2mqtt_0xfe88fc1e_14-128-0-level"
}
Is this enough info?
Mark: Domoticz latest Beta on Virtual machine (Proxmox) running Debian Bookworm - Z-Stick 7 - RFXCom - P1 - SolarEdge - Dahua - Philips Hue - Docker - Zigbee2mqtt (latest, docker) via python plugin - Zwave-js-ui (latest, docker) - dzVents - Nodered
User avatar
gizmocuz
Posts: 2594
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: How do I get batterylevels back?

Post by gizmocuz »

Thank you, and could you also post the content of

zwave/FMS1/128/0/level
Quality outlives Quantity!
Doler
Posts: 159
Joined: Friday 31 July 2015 21:02
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Sint-Oedenrode, Netherlands
Contact:

Re: How do I get batterylevels back?

Post by Doler »

Code: Select all

zwave/FMS1/128/0/isLow
{
  "time": 1753016911001,
  "value": false,
  "nodeName": "FMS1",
  "nodeLocation": "Living"
}
zwave/FMS1/128/0/level
{
  "time": 1754261342547,
  "value": 100,
  "nodeName": "FMS1",
  "nodeLocation": "Living"
}
Mark: Domoticz latest Beta on Virtual machine (Proxmox) running Debian Bookworm - Z-Stick 7 - RFXCom - P1 - SolarEdge - Dahua - Philips Hue - Docker - Zigbee2mqtt (latest, docker) via python plugin - Zwave-js-ui (latest, docker) - dzVents - Nodered
User avatar
gizmocuz
Posts: 2594
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: How do I get batterylevels back?

Post by gizmocuz »

I think the topic "zwave/FMS1/128/0/isLow" should have been "zwave/FMS1/128/0/level"

I added support for the battery isLow indication (boolean) in beta 16757

When it is 'true', I set all device battery levels to zero, you should be able to see this in the device overview
Quality outlives Quantity!
Doler
Posts: 159
Joined: Friday 31 July 2015 21:02
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Sint-Oedenrode, Netherlands
Contact:

Re: How do I get batterylevels back?

Post by Doler »

Hmm,

After updating Domoticz won't start anymore. Status message:

Code: Select all

/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found (required by /home/pi/domoticz/domoticz)
What to do?
Mark: Domoticz latest Beta on Virtual machine (Proxmox) running Debian Bookworm - Z-Stick 7 - RFXCom - P1 - SolarEdge - Dahua - Philips Hue - Docker - Zigbee2mqtt (latest, docker) via python plugin - Zwave-js-ui (latest, docker) - dzVents - Nodered
User avatar
waltervl
Posts: 6002
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2025.1
Location: NL
Contact:

Re: How do I get batterylevels back?

Post by waltervl »

Doler wrote: Tuesday 12 August 2025 8:30 Hmm,

After updating Domoticz won't start anymore. Status message:

Code: Select all

/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found (required by /home/pi/domoticz/domoticz)
What to do?
Are you running Ubuntu? Then you need 24.04 to get it running. Ubuntu 22.04 that has openssl3 but wrong version of glibc viewtopic.php?p=325831#p325831
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Doler
Posts: 159
Joined: Friday 31 July 2015 21:02
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Sint-Oedenrode, Netherlands
Contact:

Re: How do I get batterylevels back?

Post by Doler »

No, I'm running Debian Bookworm on a virtual machine (AMD64).
Mark: Domoticz latest Beta on Virtual machine (Proxmox) running Debian Bookworm - Z-Stick 7 - RFXCom - P1 - SolarEdge - Dahua - Philips Hue - Docker - Zigbee2mqtt (latest, docker) via python plugin - Zwave-js-ui (latest, docker) - dzVents - Nodered
User avatar
waltervl
Posts: 6002
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2025.1
Location: NL
Contact:

Re: How do I get batterylevels back?

Post by waltervl »

Then it seems you run a different version of bookworm than the Domoticz build system...
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Doler
Posts: 159
Joined: Friday 31 July 2015 21:02
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Sint-Oedenrode, Netherlands
Contact:

Re: How do I get batterylevels back?

Post by Doler »

Never had problems before. My bookworm version number is:

Code: Select all

cat /etc/debian_version
12.11
Mark: Domoticz latest Beta on Virtual machine (Proxmox) running Debian Bookworm - Z-Stick 7 - RFXCom - P1 - SolarEdge - Dahua - Philips Hue - Docker - Zigbee2mqtt (latest, docker) via python plugin - Zwave-js-ui (latest, docker) - dzVents - Nodered
User avatar
gizmocuz
Posts: 2594
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: How do I get batterylevels back?

Post by gizmocuz »

The build system was updated to Trixy.... Maybe that is causing the issue?

Seems like the Docker (compose) AMD64 has no issues with it... running fine
Quality outlives Quantity!
User avatar
gizmocuz
Posts: 2594
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: How do I get batterylevels back?

Post by gizmocuz »

You could upgrade your system with

Code: Select all

sudo sed -i 's/bookworm/trixie/g' /etc/apt/sources.list
sudo find /etc/apt/sources.list.d -type f -exec sed -i 's/bookworm/trixie/g' {} \;
sudo apt update
sudo apt full-upgrade
sudo apt modernize-sources
sudo apt autoremove
sudo reboot
Quality outlives Quantity!
User avatar
gizmocuz
Posts: 2594
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: How do I get batterylevels back?

Post by gizmocuz »

Seems this error has already been reported in 2023... ... so don't think (hope) it has anything to do with Trixy

https://www.reddit.com/r/linux4noobs/co ... und_error/
Quality outlives Quantity!
User avatar
waltervl
Posts: 6002
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2025.1
Location: NL
Contact:

Re: How do I get batterylevels back?

Post by waltervl »

gizmocuz wrote: Tuesday 12 August 2025 14:23 The build system was updated to Trixy.... Maybe that is causing the issue?

Seems like the Docker (compose) AMD64 has no issues with it... running fine
Possibly not AMD64 but also update issues on Docker viewtopic.php?f=6&t=43859
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Doler
Posts: 159
Joined: Friday 31 July 2015 21:02
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Sint-Oedenrode, Netherlands
Contact:

Re: How do I get batterylevels back?

Post by Doler »

I'm running the virtual machine on Proxmox that is still running on Debian bookworm. There is a Proxmox upgrade 8 to 9 that is based on Trixy but other than running a script checking if Proxmox is ok for an upgrade. I did nothing else since I wanted the problem with Domoticz be solved first. So I have no idea what changed.

I'm not running Domoticz in Docker.

Question is where the requirement for GLIBC comes from?

I'll try to switch to Trixy on my test system and see if it works.
Mark: Domoticz latest Beta on Virtual machine (Proxmox) running Debian Bookworm - Z-Stick 7 - RFXCom - P1 - SolarEdge - Dahua - Philips Hue - Docker - Zigbee2mqtt (latest, docker) via python plugin - Zwave-js-ui (latest, docker) - dzVents - Nodered
Doler
Posts: 159
Joined: Friday 31 July 2015 21:02
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Sint-Oedenrode, Netherlands
Contact:

Re: How do I get batterylevels back?

Post by Doler »

Doler wrote: Tuesday 12 August 2025 14:58 I'll try to switch to Trixy on my test system and see if it works.
Ok, Domoticz updated fine. Going to do the same on my live system (backup first) and see if the Z-wave problem is solved. Thanks sofar.
Mark: Domoticz latest Beta on Virtual machine (Proxmox) running Debian Bookworm - Z-Stick 7 - RFXCom - P1 - SolarEdge - Dahua - Philips Hue - Docker - Zigbee2mqtt (latest, docker) via python plugin - Zwave-js-ui (latest, docker) - dzVents - Nodered
User avatar
gizmocuz
Posts: 2594
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: How do I get batterylevels back?

Post by gizmocuz »

I was just going to say I am trying to build a schroot environment on build server to build for bookworm again...
Quality outlives Quantity!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest