ioBroker.sourceanalytix icon indicating copy to clipboard operation
ioBroker.sourceanalytix copied to clipboard

Reset DP

Open n3roGit opened this issue 4 years ago • 4 comments

What do I have to do to reset a measured data point? One of my measurement points is unfortunately on a completely wrong value (much too high).

i have already reset the meter reading. However, it remains high.

image image

n3roGit avatar Oct 20 '20 12:10 n3roGit

Hi @n3roGit

  • stop the source analytic adapter
  • delete the current reading state (if you would like to keep the history, otherwise everything under the device at sourceanalytix itself)
  • check the raw_data of the object if a "currentValue" and/or "valueAtDeviceReset" is present there, if yes remove it.
  • start source analytic, now all should start fresh

Please let me know if this works for you, hmm maybe I should implement a kind of reset button

example of a state in raw 👍

{
  "from": "system.adapter.sourceanalytix.0",
  "user": "system.user.admin",
  "ts": 1603144800069,
  "common": {
    "name": "SA_kWhTest",
    "role": "",
    "type": "number",
    "desc": "Manually created",
    "unit": "kWh",
    "read": true,
    "write": true,
    "custom": {
      "sourceanalytix.0": {
        "enabled": true,
        "alias": "",
        "selectedPrice": "ElectricityDay",
        "selectedUnit": "automatically",
        "costs": true,
        "consumption": true,
        "meter_values": true,
        "start_day": 790.0017700007443,
        "start_week": 766.0711300007201,
        "start_month": 528.0074500004698,
        "start_quarter": 528.0074500004698,
        "start_year": 0,
        "currentValue": 790.0017700007443,
        "valueAtDeviceReset": 58
      }
    }
  },
  "native": {},
  "acl": {
    "object": 1638,
    "owner": "system.user.admin",
    "ownerGroup": "system.group.administrator",
    "state": 1638
  },
  "_id": "0_userdata.0.SA_kWhTest",
  "type": "state"
}

change to :

{
  "from": "system.adapter.sourceanalytix.0",
  "user": "system.user.admin",
  "ts": 1603144800069,
  "common": {
    "name": "SA_kWhTest",
    "role": "",
    "type": "number",
    "desc": "Manually created",
    "unit": "kWh",
    "read": true,
    "write": true,
    "custom": {
      "sourceanalytix.0": {
        "enabled": true,
        "alias": "",
        "selectedPrice": "ElectricityDay",
        "selectedUnit": "automatically",
        "costs": true,
        "consumption": true,
        "meter_values": true,
        "start_day": 790.0017700007443,
        "start_week": 766.0711300007201,
        "start_month": 528.0074500004698,
        "start_quarter": 528.0074500004698,
        "start_year": 0
      }
    }
  },
  "native": {},
  "acl": {
    "object": 1638,
    "owner": "system.user.admin",
    "ownerGroup": "system.group.administrator",
    "state": 1638
  },
  "_id": "0_userdata.0.SA_kWhTest",
  "type": "state"
}

DutchmanNL avatar Oct 20 '20 12:10 DutchmanNL

Perfect that worked for me! Thanks =)

Yes a reset button would be great here!

n3roGit avatar Oct 20 '20 12:10 n3roGit

Super, dan wissen wir jetzt auch wie und kan ich das als Enhancement einbauen danke fürs Feedback !

DutchmanNL avatar Oct 20 '20 12:10 DutchmanNL

Documentation pending

Solved in 0.4.8-Beta.0 which will be released this weekend, alpha 0.4.8-Alpha.13 is already available for install and has all fixes included. Please do not install any version of 0.4.8 lower than alpha 13 ! (Or wait for beta release on Sunday 15-01-2021)

DutchmanNL avatar Jan 15 '21 15:01 DutchmanNL