Page 1 of 1

update to newest version but graphs are not updating (Solved)

Posted: Thursday 20 March 2025 19:25
by sash
Version: 2025.1 (build 16581)
Build Hash: 13cb08fcd
Compile Date: 2025-03-18 21:51:10
dzVents Version: 3.1.8
Python Version: 3.11.2 (main, Nov 30 2024, 21:22:50) [GCC 12.2.0]
Active User: admin
arm64 debian on a orangepie 5plus also riscv64 spacemit bpi-f3 they both had the newest domoticz installed and both have the same behavior

hi there for some reason graphs are not updating for virtual-device (energy counter). I used this method for years but it does not seam to work in the newer versions domoticz .
perl script that takes a live MQTT feed and publishes it to domoticz

what the code does it take a MQTT live feed from an energy monitor. , sample it then averages it over a certtian period then publishes it to domoticz and a second mqtt stream that an mqtt connected lcd screen displaying current data

Code: Select all

#!/usr/bin/perl -w
my $MQTT2=0;
sleep(15);
open(SUB, "/usr/bin/mosquitto_sub -h 192.168.168.150 -t /solar |");
my $cnt=0;
while ($MQTT = <SUB>) {
$cnt++;
$MQTT2=($MQTT2+$MQTT);
print "$MQTT";
if ($cnt >15){
$MQTT2=($MQTT2/$cnt);
$MQTT2=int($MQTT2);
$cnt=0;
print " average = $MQTT2\n";
system("mosquitto_pub  -t /energy/solar -m '$MQTT2'");
system("curl -s 'http://127.0.0.1:8080/json.htm?type=command&param=udevice&idx=2&nvalue=0&svalue=$MQTT2;0' ");
$MQTT2=0;
}
}
it publishes correctly and live data displays in domoticz but there never any entry points into the graphs.
Image
it displays live data
Image
but not the historical data
Image

I have zigbee outlet switch with energy capabilities it displays historical energy usage

Re: update to newest version but graphs are not updating

Posted: Thursday 20 March 2025 21:13
by sash
I compiled from the current dev to the current stable and it is the same. no graphs are drawn. when you first initiated the virtual device it draws one instantaneous block. but at the next graph update. that one block is gone... I will keep rolling back and see when it last worked. I have current version running on a device and it 2022.1 I believe another device had 2023.2 and it it was working as well

Re: update to newest version but graphs are not updating

Posted: Thursday 20 March 2025 21:49
by sash
okay it seams that i forgot that I needed to enable compute now it seams to drawing my graphs