Bar charts of energy consumption
Moderators: leecollings, remb0
-
- Posts: 181
- Joined: Monday 14 November 2022 12:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.1
- Location: Poland
- Contact:
Bar charts of energy consumption
I connected the energy meter structure to ESP + PZEM from Tasmota and it shows nicely the daily, monthly and annual energy consumption.
The problem is that in the monthly consumption chart I have a solid line.
I saw someone on the Internet post a bar chart from a given month where consumption was shown in bars for each day.
The question is how to create such a chart in domoticz?
Do you need Grafana for this or can it be set somehow in Domoticz?
Topic with pictures:
https://www.elektroda.pl/rtvforum/topic ... l#20767204
The problem is that in the monthly consumption chart I have a solid line.
I saw someone on the Internet post a bar chart from a given month where consumption was shown in bars for each day.
The question is how to create such a chart in domoticz?
Do you need Grafana for this or can it be set somehow in Domoticz?
Topic with pictures:
https://www.elektroda.pl/rtvforum/topic ... l#20767204
- waltervl
- Posts: 5843
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Bar charts of energy consumption
What type of device is your Domoticz device that has these values?
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
- Posts: 181
- Joined: Monday 14 November 2022 12:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.1
- Location: Poland
- Contact:
Re: Bar charts of energy consumption
It is "custom sensor"
I would like to get total energy in the bars.
I would like to get total energy in the bars.
- Attachments
-
- Tasmota22.jpg (42.01 KiB) Viewed 3336 times
-
- custom senso1r.jpg (19.17 KiB) Viewed 3339 times
-
- Posts: 642
- Joined: Saturday 21 September 2019 17:55
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.1
- Location: The Netherlands
- Contact:
Re: Bar charts of energy consumption
General, custom sensors are stored in the percentage and percentage_calendar tables and therefore you get lines and daily min,max and avg values.
If you use a counter device (stored in the meter and meter_calendar tables), you will get the bars. You will get bars of the daily increase of the counter.
If you use a counter device (stored in the meter and meter_calendar tables), you will get the bars. You will get bars of the daily increase of the counter.
-
- Posts: 181
- Joined: Monday 14 November 2022 12:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.1
- Location: Poland
- Contact:
Re: Bar charts of energy consumption
How and where to change it?
Sensors and data are downloaded automatically by Tasmoticz and everything is added automatically. Is it possible to change this sensor?
Sensors and data are downloaded automatically by Tasmoticz and everything is added automatically. Is it possible to change this sensor?
- waltervl
- Posts: 5843
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Bar charts of energy consumption
That you should ask in Tasmota forum. How does Tasmota create the Domoticz device? Is it with MQTT Auto discover?
Edit: I read now you use the Tasmoticz Plugin. Please discuss this with the author. https://github.com/joba-1/Tasmoticz
Edit: I read now you use the Tasmoticz Plugin. Please discuss this with the author. https://github.com/joba-1/Tasmoticz
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
- Posts: 181
- Joined: Monday 14 November 2022 12:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.1
- Location: Poland
- Contact:
Re: Bar charts of energy consumption
If I complete the Configure MQTT data in Tasmota and provide the IP and Domoticz port there, the sensors automatically appear in Domoticz. So it's Tasmoticz's fault?
- waltervl
- Posts: 5843
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Bar charts of energy consumption
Yes.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
- Posts: 181
- Joined: Monday 14 November 2022 12:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.1
- Location: Poland
- Contact:
Re: Bar charts of energy consumption
So write a message to user Joba-1 with this problem? Or maybe a plugin update?
Is there any Tasmota forum?
Is there any Tasmota forum?
- waltervl
- Posts: 5843
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Bar charts of energy consumption
I think the best thing is to make a new issue on the GitHub repository https://github.com/joba-1/Tasmoticz/issues with reference to this forum topic.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
- Posts: 181
- Joined: Monday 14 November 2022 12:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.1
- Location: Poland
- Contact:
Re: Bar charts of energy consumption
Thanks for the link, I added a description of the problem with a link to this topic. I wonder if anything will be done about it.
-
- Posts: 642
- Joined: Saturday 21 September 2019 17:55
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.1
- Location: The Netherlands
- Contact:
Re: Bar charts of energy consumption
If you cannot change those created by Tasmoticz, you could create an additional device, type counter, and each time the Tasmoticz device changes you then also change this extra device using a dzvents script.
-
- Posts: 181
- Joined: Monday 14 November 2022 12:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.1
- Location: Poland
- Contact:
Re: Bar charts of energy consumption
Unfortunately, I'm bad at writing scripts.
- waltervl
- Posts: 5843
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Bar charts of energy consumption
Better to have it fixed in the plugin. Should be not so difficult.
In tasmota.py this section should be changed I think.
In tasmota.py this section should be changed I think.
Code: Select all
'zählerstand_total': {'Name':'Total Usage', 'Unit':'KWh', 'DomoType': 'Custom'},
'zählerstand_tarif_1': {'Name':'Tarif1 Usage', 'Unit':'KWh', 'DomoType': 'Custom'},
'zählerstand_tarif_2': {'Name':'Tarif2 Usage', 'Unit':'KWh', 'DomoType': 'Custom'},
Last edited by waltervl on Sunday 15 October 2023 21:52, edited 1 time in total.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Re: Bar charts of energy consumption
Hi just chiming in.
I also use this device, and had the same issues.
The solution indeed is a small script that you attach to a dummy device.
I basically hacked up a more complex script from SunnyBoy, and only made the bit referring to my Dummymeter device working.
See the attached file as for some reason the forum seems to interpret it all as external links in a code block.
Hendrik-Jan
I also use this device, and had the same issues.
The solution indeed is a small script that you attach to a dummy device.
I basically hacked up a more complex script from SunnyBoy, and only made the bit referring to my Dummymeter device working.
See the attached file as for some reason the forum seems to interpret it all as external links in a code block.
Hendrik-Jan
- Attachments
-
- Dummymeter.txt
- (4.81 KiB) Downloaded 62 times
- waltervl
- Posts: 5843
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Bar charts of energy consumption
The real solution would be to use an energy counter device instead of a custom sensor. You also would get better reports.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
- joba1
- Posts: 19
- Joined: Saturday 03 March 2018 16:39
- Target OS: Linux
- Domoticz version: V2024.7
- Location: DE
- Contact:
Re: Bar charts of energy consumption
Hi,
I'm willing to try your suggestion and you seem to know which type of device is needed.
Can you elaborate in terms of https://www.domoticz.com/wiki/Developin ... vice_Types which type would do what you want?
There are different flavors of counters with and without TypeName and even a kWh type.
I'm willing to try your suggestion and you seem to know which type of device is needed.
Can you elaborate in terms of https://www.domoticz.com/wiki/Developin ... vice_Types which type would do what you want?
There are different flavors of counters with and without TypeName and even a kWh type.
- waltervl
- Posts: 5843
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Bar charts of energy consumption
Yes, kWh would be the correct device
It needs 2 values to update, svalue=POWER;ENERGY
POWER = current power (W)
ENERGY = Integer, total cumulative energy in Watt-hours (Wh)
So from the screenshot above
Power = 2+2+33=37 W
Energy = Energy Total = 21.224*1000 W
It needs 2 values to update, svalue=POWER;ENERGY
POWER = current power (W)
ENERGY = Integer, total cumulative energy in Watt-hours (Wh)
So from the screenshot above
Power = 2+2+33=37 W
Energy = Energy Total = 21.224*1000 W
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
- joba1
- Posts: 19
- Joined: Saturday 03 March 2018 16:39
- Target OS: Linux
- Domoticz version: V2024.7
- Location: DE
- Contact:
Re: Bar charts of energy consumption
I just created a pull request on my repo that should do what you want.
You can download/clone the test version plugin from the corresponding branch https://github.com/joba-1/Tasmoticz/tre ... s-counters
I tested, that the devices have a counter type and show correct values, but please check if the diagrams look as expected (I never used them before so I don't know what to expect)
You need to delete the old devices or the plugin won't recreate the new ones.
Better save a backup of the database before deleting them. I try to make a script to save the history from the old device to the new one.
So maybe the history can be restored later.
You can download/clone the test version plugin from the corresponding branch https://github.com/joba-1/Tasmoticz/tre ... s-counters
I tested, that the devices have a counter type and show correct values, but please check if the diagrams look as expected (I never used them before so I don't know what to expect)
You need to delete the old devices or the plugin won't recreate the new ones.
Better save a backup of the database before deleting them. I try to make a script to save the history from the old device to the new one.
So maybe the history can be restored later.
Who is online
Users browsing this forum: No registered users and 1 guest