Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hygge IT powermeasure from blog seems not to work #3

Open
nightcatnl opened this issue Jun 24, 2019 · 1 comment
Open

Hygge IT powermeasure from blog seems not to work #3

nightcatnl opened this issue Jun 24, 2019 · 1 comment

Comments

@nightcatnl
Copy link

Hi !

I installed all described from you blog but things are not working.
I do see there is another version of the powermeter on GitHub.... Though there is no install instruction included

Any help would be appreciated.

This is the output of the webpage (when app is installed according your blog). It is just plain text (php is working though):

"; $watt[] = (($row['watt']*$intervalmultiply)/1000); $dates[] = $row['date'].""; } echo "Minutes Hours Days Months

"; echo "Usage right now: ".round($watt[0],2)." kWh ".round((($watt[0])*2.1),2)." Kr/h.
"; // Standard inclusions include("pChart/pData.class"); include("pChart/pChart.class"); // Dataset definition $DataSet = new pData; $DataSet->AddPoint($watt); $DataSet->AddSerie(); $DataSet->SetSerieName("kWh","Serie1"); //$DataSet->addPoint($dates,"Labels"); //$DataSet->setSerieDescription("Labels",$dates); //$DataSet->setAbscissa("Labels"); // Initialise the graph $Test = new pChart(800,400); $Test->setFontProperties("Fonts/tahoma.ttf",10); $Test->setGraphArea(60,30,680,200); $Test->drawGraphArea(252,252,252); $Test->drawScale($DataSet->GetData(),$DataSet->GetDataDescription(),SCALE_NORMAL,150,150,150,TRUE,0,2); $Test->drawGrid(4,TRUE,230,230,230,255); // Draw the line graph $Test->drawLineGraph($DataSet->GetData(),$DataSet->GetDataDescription()); $Test->drawPlotGraph($DataSet->GetData(),$DataSet->GetDataDescription(),3,2,255,255,255); // Finish the graph $Test->setFontProperties("Fonts/tahoma.ttf",8); $Test->drawLegend(45,35,$DataSet->GetDataDescription(),255,255,255); $Test->setFontProperties("Fonts/tahoma.ttf",10); $Test->drawTitle(80,22,"kWh usage at home",50,50,50,585); $Test->Render("chart.png"); echo "

"; foreach ($watt as $key => $value){ echo $dates[$key]." - ".round($value,2)." kWh ".round(((($value)*2.1)/$intervalmultiply),2)." kr.
"; } mysql_close($link); ?>

@nightcatnl
Copy link
Author

Another question... I don't understand the formula exactly in your page
I am using another meter with grafana.... would like to do the same with the powermeasure tool you wrote in python.
Though dunno how to calculate current power consumption....
Can you bring me up to speed ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant