How to reset a Utility Widget ?

Moderator: leecollings

Post Reply
pipiche
Posts: 2016
Joined: Monday 02 April 2018 20:33
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: France
Contact:

How to reset a Utility Widget ?

Post by pipiche »

I have a Electricity counter and I would like to reset all the history. How can I do that ?
User avatar
waltervl
Posts: 5853
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: How to reset a Utility Widget ?

Post by waltervl »

I don't think there is an API call for this.
Delete the device and make a new one?
Else you would have to manipulate the SQLite database and delete the idx related entries in meter_calendar table.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
pipiche
Posts: 2016
Joined: Monday 02 April 2018 20:33
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: France
Contact:

Re: How to reset a Utility Widget ?

Post by pipiche »

Thanks @waltervl, I was more looking to an API or even to do it straight from the User Interface, as we can do for other logs.
Removing the device is not a possibility as this is created by a plugin.
Zigbee for Domoticz plugin / RPI3B+ / Electrolama ZZH-P / 45 devices

If the plugin provides you value, you can support me with a donation Paypal.

Wiki is available here.

Zigbee for Domoticz FAQ
pipiche
Posts: 2016
Joined: Monday 02 April 2018 20:33
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: France
Contact:

Is COMPUTE Usage (meter) is supported on Python Framework Plugin

Post by pipiche »

In fact I'll describe more my problem an may be someone can help me. Any thing I'm doing Wrong ?

I'm using the Electricity (instant and counter) via a Python Framework Plugin. As I don't have any data for Usage, I'm updating the device with the instant power and putting 0 for the usage

basically when updating via the plugin

Code: Select all

nValue=0 and sValue="power;0" 

power is usually expressed in a float type

My main issue is that the Usage remains to 0

Here after are the log. We see the Instant Power, but nothing happen for the Usage !
Screenshot 2021-10-06 at 17.06.47.png
Screenshot 2021-10-06 at 17.06.47.png (265.95 KiB) Viewed 580 times
I've checked the device and it is defined as COMPUTE as you can see in the hereafter screenshoot
Screenshot 2021-10-06 at 17.07.57.png
Screenshot 2021-10-06 at 17.07.57.png (119.32 KiB) Viewed 580 times
User avatar
waltervl
Posts: 5853
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: How to reset a Utility Widget ?

Post by waltervl »

This could be a python plugin framework issue not updating the device the same way as an http API call would do. What happens if you use an http API call instead to test?
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
pipiche
Posts: 2016
Joined: Monday 02 April 2018 20:33
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: France
Contact:

Re: How to reset a Utility Widget ?

Post by pipiche »

API call indeed works. Thanks @waltervl
Zigbee for Domoticz plugin / RPI3B+ / Electrolama ZZH-P / 45 devices

If the plugin provides you value, you can support me with a donation Paypal.

Wiki is available here.

Zigbee for Domoticz FAQ
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest