Skip to content

Hygge IT powermeasure from blog seems not to work  #3

@nightcatnl

Description

@nightcatnl

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); ?>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions