SpoturDeal / MMM-Domoticz

Read data from you Domoticz system
MIT License
8 stars 2 forks source link

energyToday Meter Offset #12

Closed 1kohm closed 5 years ago

1kohm commented 5 years ago

My power meter readings are correct but I have one main meter that I have set "MeterOffset" in Domoticz. I'd like to add offset to power meter so it's not counting from 0 but from MeterOffset value. How can I achieve that?

SpoturDeal commented 5 years ago

Hello @1kohm I am not sure what you mean by MeterOffset. Where do you set it? Does it end up in the JSON result if you request http://ipaddress:port/json.htm?type=devices&used=true&filter=all

like http://192.168.1.188:8088/json.htm?type=devices&used=true&filter=all

1kohm commented 5 years ago

I set MeterOffset in Domoticz GUI to adjust my main power meter reader (so i can see actual data). I.E. power meter without MeterOffset show 6000 kWh and with offset shows 20000 kWh, so MeterOffset=14000. Your module pull power meter value but without offset, so on MM2 I see 6000 kWh. Where in your module I can adjust that reading to add static 14000 MeterOffset ?

SpoturDeal commented 5 years ago

Hello 1 kilo Ohm,

I was not able to find the MeterOffset in Domoticz.

I have changed the system for Power Usage metering.

In the config file add the following lines to see the smart meter data in the list

smartMeter:  true,
smartMeterOffset: 0

You can set the smartMeterOffset to any value you like.

SpoturDeal commented 5 years ago

Hello @1kohm ,

Did the update do what you wanted?

grtz

Carl

1kohm commented 5 years ago

Hello,

thank you! today i can finally test your function "smartMeterOffset". I did git pull, changed config.js with:

smartMeter:  true,
smartMeterOffset: 1000

As a result I see no data ("0") on screen. When I delete "smartMeter: true" value then power usage is shown but without defined in "smartMeterOffset" offset value.

MMM-Domoticz.js version: 1.18

I don't know yet why it's not working

SpoturDeal commented 5 years ago

did you write a comma behind

smartMeterOffset: 0,

if you are using smartMeter:true the values from the devices will not be added to get a total. Only with smartMeter true there is a smartMeterOffset it doesn't affect non if you use smartMeter: false