add tasmota power monitoring

This commit is contained in:
mrtg 2023-05-13 19:59:02 +02:00
parent 87648fa13d
commit d295cc8af7
9 changed files with 110 additions and 16 deletions

View File

@ -1,24 +1,31 @@
Target[Wohnzimmer-Couchlicht.power]: `curl -s "http://192.168.178.38/cm?cmnd=STATUS+8" | jq '.StatusSNS.ENERGY | "\(.Voltage) \(.Current)"' | sed 's/"//g; s/ /\n/g'`
Title[Wohnzimmer-Couchlicht.power]: [Power] Wohnzimmer-Couchlicht
MaxBytes[Wohnzimmer-Couchlicht.power]: 42949672950000000
LoadMIBs: /usr/share/snmp/mibs/UCD-SNMP-MIB.txt
WorkDir: /var/www/mrtg/rrd
LogFormat: rrdtool
Target[Wohnzimmer-Pflanze.power]: `curl -s "http://192.168.178.30/cm?cmnd=STATUS+8" | jq '.StatusSNS.ENERGY | "\(.Voltage) \(.Current)"' | sed 's/"//g; s/ /\n/g'`
Title[Wohnzimmer-Pflanze.power]: [Power] Wohnzimmer-Pflanze
MaxBytes[Wohnzimmer-Pflanze.power]: 42949672950000000
#Target[Wohnzimmer-Couchlicht.power]: `curl -s "http://192.168.178.38/cm?cmnd=STATUS+8" | jq '.StatusSNS.ENERGY | "\(.Voltage) \(.Current)"' | sed 's/"//g; s/ /\n/g'`
#Title[Wohnzimmer-Couchlicht.power]: [Power] Wohnzimmer-Couchlicht
#MaxBytes[Wohnzimmer-Couchlicht.power]: 42949672950000000
Target[Wohnzimmer-Tischlampe.power]: `curl -s "http://192.168.178.78/cm?cmnd=STATUS+8" | jq '.StatusSNS.ENERGY | "\(.Voltage) \(.Current)"' | sed 's/"//g; s/ /\n/g'`
Title[Wohnzimmer-Tischlampe.power]: [Power] Wohnzimmer-Tischlampe
MaxBytes[Wohnzimmer-Tischlampe.power]: 42949672950000000
#Target[Wohnzimmer-Pflanze.power]: `curl -s "http://192.168.178.30/cm?cmnd=STATUS+8" | jq '.StatusSNS.ENERGY | "\(.Voltage) \(.Current)"' | sed 's/"//g; s/ /\n/g'`
#Title[Wohnzimmer-Pflanze.power]: [Power] Wohnzimmer-Pflanze
#MaxBytes[Wohnzimmer-Pflanze.power]: 42949672950000000
Target[Wohnzimmer-TV.power]: `curl -s "http://192.168.178.91/cm?cmnd=STATUS+8" | jq '.StatusSNS.ENERGY | "\(.Voltage) \(.Current)"' | sed 's/"//g; s/ /\n/g'`
Title[Wohnzimmer-TV.power]: [Power] Wohnzimmer-TV
MaxBytes[Wohnzimmer-TV.power]: 42949672950000000
#Target[Wohnzimmer-Tischlampe.power]: `curl -s "http://192.168.178.78/cm?cmnd=STATUS+8" | jq '.StatusSNS.ENERGY | "\(.Voltage) \(.Current)"' | sed 's/"//g; s/ /\n/g'`
#Title[Wohnzimmer-Tischlampe.power]: [Power] Wohnzimmer-Tischlampe
#MaxBytes[Wohnzimmer-Tischlampe.power]: 42949672950000000
Target[Keller-Waschmaschine.power]: `curl -s "http://192.168.178.89/cm?cmnd=STATUS+8" | jq '.StatusSNS.ENERGY | "\(.Voltage) \(.Current)"' | sed 's/"//g; s/ /\n/g'`
Title[Keller-Waschmaschine.power]: [Power] Keller-Waschmaschine
MaxBytes[Keller-Waschmaschine.power]: 42949672950000000
Options[Keller-Waschmaschine.power]: growright,nopercent, nobanner, noinfo, gauge
Target[Wohnzimmer-TV.power]: `curl -s "http://192.168.178.91/cm?cmnd=STATUS+8" | jq '.StatusSNS.ENERGY | "\(.Voltage) \(.Current)"' | sed 's/"//g; s/ /\n/g'`
Title[Wohnzimmer-TV.power]: [Power] Wohnzimmer-TV
MaxBytes[Wohnzimmer-TV.power]: 42949672950000000
Options[Wohnzimmer-TV.power]: growright,nopercent, nobanner, noinfo, gauge
Target[Keller-Trockner.power]: `curl -s "http://192.168.178.90/cm?cmnd=STATUS+8" | jq '.StatusSNS.ENERGY | "\(.Voltage) \(.Current)"' | sed 's/"//g; s/ /\n/g'`
Title[Keller-Trockner.power]: [Power] Keller-Trockner
MaxBytes[Keller-Trockner.power]: 42949672950000000
Options[Keller-Trockner.power]: growright,nopercent, nobanner, noinfo, gauge

View File

@ -11,7 +11,7 @@
</HEAD>
<BODY>
<H1><a href="/">home</a>&nbsp;<a href="/lxc.html">lxc</a>&nbsp;<a href="/crypto.html">crypto</a>&nbspCrypto - Monitoring</H1>
<h1><a href="/">home</a>&nbsp;<a href="/lxc.html">lxc</a>&nbsp;<a href="/crypto.html">crypto</a>&nbsp;<a href="/power.html">power</a>&nbsp;Monitoring</h1>
<DIV>
<DIV>

View File

@ -12,7 +12,7 @@
</HEAD>
<BODY>
<h1><a href="/">home</a>&nbsp;<a href="/lxc.html">lxc</a>&nbsp;<a href="/crypto.html">crypto</a>&nbsp;Monitoring</h1>
<h1><a href="/">home</a>&nbsp;<a href="/lxc.html">lxc</a>&nbsp;<a href="/crypto.html">crypto</a>&nbsp;<a href="/power.html">power</a>&nbsp;Monitoring</h1>
<h2>br0tkasten.de</h2>
<div>

View File

@ -11,7 +11,7 @@
</HEAD>
<BODY>
<H1><a href="/">home</a>&nbsp;<a href="/lxc.html">lxc</a>&nbsp;<a href="/crypto.html">crypto</a>&nbspLXC - Monitoring</H1>
<H1><a href="/">home</a>&nbsp;<a href="/lxc.html">lxc</a>&nbsp;<a href="/crypto.html">crypto</a>&nbsp;<a href="/power.html">power</a>&nbspLXC - Monitoring</H1>
<DIV>
<DIV>

39
htdocs/power.html Normal file
View File

@ -0,0 +1,39 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML>
<HEAD>
<TITLE>MRTG Index Page</TITLE>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-15" >
<META HTTP-EQUIV="Refresh" CONTENT="600" >
<META HTTP-EQUIV="Cache-Control" content="no-cache" >
<META HTTP-EQUIV="Pragma" CONTENT="no-cache" >
<META HTTP-EQUIV="Expires" CONTENT="Thu, 24 Sep 2015 06:08:12 GMT" >
<LINK HREF="/cgi-bin/details.pl?graph=favicon.ico" rel="shortcut icon" >
<link rel="stylesheet" type="text/css" href="style.css"/>
</HEAD>
<BODY>
<h1><a href="/">home</a>&nbsp;<a href="/lxc.html">lxc</a>&nbsp;<a href="/crypto.html">crypto</a>&nbsp;<a href="/power.html">power</a>&nbsp;Monitoring</h1>
<h2>Power Usage</h2>
<div>
<h3>Wohnzimmer</h3>
<div>
<b>[Power] Wohnzimmer - TV</b><br/>
<A HREF="/cgi-bin/details.pl?graph=tasmota-tv"><IMG ALT="Power Usage TV" SRC="/cgi-bin/graph.pl?width=680&height=200&graph=tasmota-tv"></A>
</div>
</div>
<div>
<h3>Keller</h3>
<div>
<b>[Power] Keller - Waschmaschine</b><br/>
<A HREF="/cgi-bin/details.pl?graph=tasmota-waschmaschine"><IMG ALT="Power Usage Waschmaschine" SRC="/cgi-bin/graph.pl?width=680&height=200&graph=tasmota-waschmaschine"></A>
</div>
<div>
<b>[Power] Keller - Trockner</b><br/>
<A HREF="/cgi-bin/details.pl?graph=tasmota-trockner"><IMG ALT="Power Usage Trockner" SRC="/cgi-bin/graph.pl?width=680&height=200&graph=tasmota-trockner"></A>
</div>
</div>
</BODY>
</HTML>

View File

@ -13,7 +13,7 @@ echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www
</HEAD>
<BODY>
<H1><a href="/">home</a>&nbsp;<a href="/lxc.html">lxc</a>&nbsp;<a href="/crypto.html">crypto</a>&nbspLXC - Monitoring</H1>
<H1><a href="/">home</a>&nbsp;<a href="/lxc.html">lxc</a>&nbsp;<a href="/crypto.html">crypto</a>&nbsp;<a href="/power.html">power</a>&nbspLXC - Monitoring</H1>
<DIV>
'
curl -s http://10.3.0.1 | sort | while read c;

View File

@ -0,0 +1,16 @@
-v power usage
-t [Power] Trockner
--full-size-mode
--color=BACK#343637
--color=CANVAS#F0F0F0
--color=FONT#F0F0F0
--font=TITLE:12:DejaVu Bold
DEF:U=/var/www/mrtg/rrd/keller-trockner.power.rrd:ds0:AVERAGE
DEF:I=/var/www/mrtg/rrd/keller-trockner.power.rrd:ds1:AVERAGE
CDEF:P=U,I,*
COMMENT: max. avg. min. cur.\n
AREA:P#F5790060:Power
GPRINT:P:MAX:%6.2lf %sW
GPRINT:P:AVERAGE:%6.2lf %sW
GPRINT:P:MIN:%6.2lf %sW
GPRINT:P:LAST:%6.2lf %sW\n

16
tmpl/tasmota-tv.tmpl Normal file
View File

@ -0,0 +1,16 @@
-v power usage
-t [Power] TV
--full-size-mode
--color=BACK#343637
--color=CANVAS#F0F0F0
--color=FONT#F0F0F0
--font=TITLE:12:DejaVu Bold
DEF:U=/var/www/mrtg/rrd/wohnzimmer-tv.power.rrd:ds0:AVERAGE
DEF:I=/var/www/mrtg/rrd/wohnzimmer-tv.power.rrd:ds1:AVERAGE
CDEF:P=U,I,*
COMMENT: max. avg. min. cur.\n
AREA:P#F5790060:Power
GPRINT:P:MAX:%6.2lf %sW
GPRINT:P:AVERAGE:%6.2lf %sW
GPRINT:P:MIN:%6.2lf %sW
GPRINT:P:LAST:%6.2lf %sW\n

View File

@ -0,0 +1,16 @@
-v power usage
-t [Power] Waschmaschine
--full-size-mode
--color=BACK#343637
--color=CANVAS#F0F0F0
--color=FONT#F0F0F0
--font=TITLE:12:DejaVu Bold
DEF:U=/var/www/mrtg/rrd/keller-waschmaschine.power.rrd:ds0:AVERAGE
DEF:I=/var/www/mrtg/rrd/keller-waschmaschine.power.rrd:ds1:AVERAGE
CDEF:P=U,I,*
COMMENT: max. avg. min. cur.\n
AREA:P#F5790060:Power
GPRINT:P:MAX:%6.2lf %sW
GPRINT:P:AVERAGE:%6.2lf %sW
GPRINT:P:MIN:%6.2lf %sW
GPRINT:P:LAST:%6.2lf %sW\n