battery low device not available in LUA

Xiaomi, Ikea TRÅDFRI, Philips Hue and more.

Moderator: leecollings

Post Reply
manjh
Posts: 749
Joined: Saturday 27 February 2016 12:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

battery low device not available in LUA

Post by manjh »

I have one Zigbee PIR sensor, several more on order.
The "occupancy" switch works OK now. I have a LUA script to react to this.

But I am trying to set up a LUA script to keep track of the battery level.
So I enabled the "battery low" device, it comes into Domoticz as a simple switch.

When I try to read the status of this switch in LUA, it is not available.
Also, when I click the device list button (top left, in the LUA editor), the device is not there in the list. The "occupancy" device is there.

WHen I try to get the device status via a json command in my browser, status info comes back OK.

Am I missing something?
Hans
User avatar
waltervl
Posts: 5904
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: battery low device not available in LUA

Post by waltervl »

How is zigbee connected to Domoticz? Zigbee2mqtt? With plugin or MQTT Autodiscover?
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
manjh
Posts: 749
Joined: Saturday 27 February 2016 12:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: battery low device not available in LUA

Post by manjh »

Problem is no longer a problem for me. I moved to "Zigbee for Domoticz", and discovered that it ha a special display on the dashboard to inform about battery levels of the Zigbee devices. That is sufficient for me.
Hans
User avatar
waltervl
Posts: 5904
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: battery low device not available in LUA

Post by waltervl »

And the plugin also sends that data to Domoticz where you can see the battery status in the device overview (menu setup - devices). Also the device widget will go yellow if the battery is low.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
manjh
Posts: 749
Joined: Saturday 27 February 2016 12:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: battery low device not available in LUA

Post by manjh »

excellent!
Hans
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest