rvdvoorde / domoticz-homewizard

Plugin for Domoticz
http://www.domoticz.com/
GNU General Public License v3.0
12 stars 10 forks source link

Energylink is not working correct #11

Closed avdl72 closed 5 years ago

avdl72 commented 6 years ago

I have just installed this plugin and noticed that the Energylink data is nor correct sliced in the dashboard.

The Dashboard of Domoticz is only showing the total value of the meter. So there are no usage values for electricity and gas. The gas and electricity are only showing the total usage of the day total.

This is the output of the error from Domoticz log and the get-sensors data: 2017-12-11 12:16:03.196 (Homewizard) Update 0:'3109.507;3432.917;429.583;952.327;0;0' (Homewizard - Electricity)

"energymeters": [],
"energylinks": [
  {
    "id": 0,
    "favorite": "no",
    "name": "EnergyLink",
    "code": "536893",
    "t1": "water",
    "c1": 1,
    "t2": "solar",
    "c2": 2000,
    "tariff": 2,
    "s1": {
      "po": 0,
      "dayTotal": 38,
      "po+": 6,
      "po+t": "08:05",
      "po-": 0,
      "po-t": "00:01"
    },
    "s2": {
      "po": 7,
      "dayTotal": 0.08,
      "po+": 7,
      "po+t": "09:15",
      "po-": 0,
      "po-t": "10:49"
    },
    "aggregate": {
      "po": 393,
      "dayTotal": 3.64,
      "po+": 1676,
      "po+t": "09:47",
      "po-": 200,
      "po-t": "06:38"
    },
    "used": {
      "po": 400,
      "dayTotal": 3.71,
      "po+": 1683,
      "po+t": "09:47",
      "po-": 206,
      "po-t": "06:38"
    },
    "gas": {
      "lastHour": 0.38,
      "dayTotal": 2.47
    },
    "kwhindex": 0.03,
    "wp": 2720
  }
Itsmmai commented 6 years ago

Hi,

Same here. the data is only showing day totals and not now and per hour. Before I used another script what I had to run every x seconds. Your script is much nicer but it would be nice if current power works also.

Now I use:

////Electricity $stv = $data['response']['energylinks']['0']['used']['dayTotal']; //daytotal $sta = $data['response']['energylinks']['0']['used']['po']; //actual

if(is_numeric($stv) and is_numeric($sta)){web('n',"http://1.1.1.1:88/json.htm type=command&param=udevice&idx=9&nvalue=0&svalue=".$sta.";".($stv*1000)."" );} //real usage

Kind regards, Abel