Previous feed value for use in a dashboard

Two years in with my PV + Battery with emonpi, and looking to boost my dashboard skills.

I thought this would be an easy one - how do I get a previous value of a feed? I have several feeds with daily and all time accumulators displayed in assorted dashboard locations:-

image

The kWh/d values obviously accumulate through the day, and roll over at midnight.

How can I display yesterday’s accumulation, and ideally other individual daily figures?

I couldn’t immediately see similar questions - apologies if this is an old query.

Can I even get a 7 or 28 day accumulation to put on the dashboard? Or does that involve deeper coding and database accessing?

Server Information

Server Information

Services

  • emonhub :- Active Running

  • emoncms_mqtt :- Active Running

  • feedwriter :- Active Running - sleep 300s 427 feed points pending write

  • service-runner :- Active Running

  • emonPiLCD :- Inactive Dead

  • redis-server :- Active Running

  • mosquitto :- Active Running

  • demandshaper :- Active Running

Emoncms

Server

  • OS :- Linux 4.19.75-v7+
  • Host :- emonpi | emonpi | (10.5.1.215)
  • Date :- 2022-01-28 19:36:37 UTC
  • Uptime :- 19:36:37 up 29 days, 21:26, 0 users, load average: 0.55, 0.56, 0.36

Memory

  • RAM :- Used: 22.36%
    • Total :- 975.62 MB
    • Used :- 218.11 MB
    • Free :- 757.52 MB
  • Swap :- Used: 0.00%
    • Total :- 100 MB
    • Used :- 0 B
    • Free :- 100 MB
      Write Load Period

Disk

  • / :- Used: 52.01%
    • Total :- 3.92 GB
    • Used :- 2.04 GB
    • Free :- 1.69 GB
    • Write Load :- 908.49 B/s (8 days 2 hours 2 mins)
  • /var/opt/emoncms :- Used: 11.52%
    • Total :- 9.98 GB
    • Used :- 1.15 GB
    • Free :- 8.32 GB
    • Write Load :- 424.45 B/s (8 days 2 hours 2 mins)
  • /boot :- Used: 20.55%
    • Total :- 252.05 MB
    • Used :- 51.79 MB
    • Free :- 200.25 MB
    • Write Load :- 0 B/s (8 days 2 hours 2 mins)
  • /var/log :- Used: 9.59%
    • Total :- 50 MB
    • Used :- 4.8 MB
    • Free :- 45.2 MB
    • Write Load :- n/a

HTTP

  • Server :- Apache/2.4.38 (Raspbian) HTTP/1.1 CGI/1.1 80

MySQL

  • Version :- 5.5.5-10.3.17-MariaDB-0+deb10u1
  • Host :- 127.0.0.1 (127.0.0.1)
  • Date :- 2022-01-28 19:36:36 (UTC 00:00‌​)
  • Stats :- Uptime: 2582840 Threads: 15 Questions: 8970629 Slow queries: 0 Opens: 47 Flush tables: 1 Open tables: 41 Queries per second avg: 3.473

Redis

  • Version :-
    • Redis Server :- 5.0.3
    • PHP Redis :- 5.0.2
  • Host :- localhost:6379
  • Size :- 628 keys (935.80K)
  • Uptime :- 29 days

MQTT Server

  • Version :- Mosquitto 1.5.7
  • Host :- localhost:1883 (127.0.0.1)

PHP

  • Version :- 7.3.9-1~deb10u1 (Zend Version 3.3.9)
  • Modules :- apache2handlercalendar Core ctype curl date dom v20031129exif fileinfo filter ftp gd gettext hash iconv json v1.7.0libxml mbstring mosquitto v0.4.0mysqli mysqlnd vmysqlnd 5.0.12-dev - 20150407 - $Id: 7cc7cc96e675f6d72e5cf0f267f48e167c2abb23 $openssl pcre PDO pdo_mysql Phar posix readline redis v5.0.2Reflection session shmop SimpleXML sockets sodium SPL standard sysvmsg sysvsem sysvshm tokenizer wddx xml xmlreader xmlwriter xsl Zend OPcache zlib

Pi

  • Model :- Raspberry Pi 3 Model B Rev 1.2 - 1GB (Sony UK)

  • Serial num. :- ECC50CE4

  • CPU Temperature :- 48.31°C

  • GPU Temperature :- 48.9°C

  • emonpiRelease :- emonSD-17Oct19

  • File-system :- read-write

Client Information

Client Information

HTTP

  • Browser :- Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36
  • Language :- en-GB,en;q=0.9

Window

  • Size :- 2458 x 1337

Screen

  • Resolution :- 2560 x 1440

Hello @Simonsse

You should be able to use the kwhperiod widget to do this, but Im having a bit of trouble with it, testing today. I will have a closer looks and hopefully get back to you on this.