Pulse Powermeter, set to the same value as real power meter?



  • I just gotten the pulse power metet sketch to work, but is it possible to set the total kWh so that it matches my Power Meter?



  • I think you have the same challenge as I do. See my pulse water meter topic here:
    http://forum.mysensors.org/topic/2101/pulse-water-meter



  • I updated the pulse value in the domoticz.db file with an external database editor, then restarted the sensor as it requests the pulse count from domoticz on startup.
    But there should be a better way...



  • Is there any other way to set the real meter value please? I know some people are changing the sketch to add the value in the beginning to match the meter value.

    I do not understand why JSON is not working.

    @fleinze what DB editor did you use please?


  • Hardware Contributor

    I think its possible to send the V_Var1 on startup.
    Then you need to wait 24h (new day) since some values are the sum of that day (From midnihgt).
    Then you can remove V_VAR1 on startup och instead request it from Domoticz.

    Br
    Andreas



  • Thanks @sundberg84
    @fleinze Which value did you update in the DB please?



  • Stop Domoticz
    Copy de Databse to your pc
    ( make a backup of the database )
    Use SQLLite Expert Personal to edit the database
    Go to "Device Status" and look for the row on the right side with your device
    Double click on the row, goto "SValue", edit this, click ok, clock ok again.

    Then the most important one:

    On the leftside goto "MySensorsVars", click on it, on the right side you will see your MySensors devices, click on your device and edit the "Value"

    Both SValue and Value should be the same and match whatever your whatever meter reads when you start using your sensor.

    Regards

    Alex



  • @Slorf - Many thanks!



  • After a couple of days troubleshooting I found a way !!

    Steps:

    • Clear the Eeprom of your sensor ( there is a sketch for this in the mysensors librairy ), this because your sensor keeps the readings in Eeprom
    • Reload your sketch
    • Connect the Sensor to Domoticz, it will be seen in Domoticz as a new device.
    • When the sensor starts it has a cleared Eeprom, it will request the values from the gateway, the gateway will request them from Domoticz
    • Connect the sensor to whatever you want to read, and wait for the first readings in domoticz
      ( when the sensor sends it first reading it will replace the values it got from the gateway with the values it has in it's own Eeprom, thus sending a wrong reading, when we clear the Eeprom we don't have this problem.
    • Backup the domoticz database from domoticz

    Then use the procedure from my previous post:

    ( make a backup of the database )
    Use SQLLite Expert Personal to edit the database
    Go to "Device Status" and look for the row on the right side with your device
    Double click on the row, goto "SValue", edit this: it should read something like:
    000.000;3424000 ( the first part is todat usage, the second part total usage

    click ok, click ok again.

    On the leftside goto "MySensorsVars", click on it, on the right side you will see your MySensors devices, click on your device and edit the "Value"

    Both SValue and Value should be the same and match whatever your whatever meter reads when you start using your sensor.

    Goto Meter on the leftside, sort the "device row id" find your device id and edit the value here to ( it could be that when you have a new sensor there is no entry here )



  • Mhhhhh.. forget what I wrote, I still get strange readings.
    Next try will be to clear the gateway's Eeprom


  • Hardware Contributor

    @Slorf You are aware that some values are calculated on a daily basis? I think you can do as you said and manually change the db but you need to wait 24h (or after next midnight) to get the daily values right.



  • @sundberg84

    I did that, but it did not help.

    From my observations sofar:

    • Changed the settings in the Domoticz database ( for example: changed the value of the my solarpanels to 3424000 kwh )
    • Waited a couple of days
    • Erased the Eeprom of the sensor
    • Connected the sensor
    • Domoticz shows 3424.000 kwh as it should be
    • On the first watt read by the sensors Domoticz shows 3642.150 kwh, this value is nowhere
      to be found in the Domoticz database.

    So the next thing is to erase the Eeprom of the Gateway, it might be that the Gateway still holds a wrong value from testing.

    Regards

    Alex


  • Hardware Contributor

    @Slorf

    and with "connected the sensor" you mean retrieve the V_VAR1 and set kwg as this value as well?
    This is my example from V_RAIN and a counter (V_VAR1)

    Example with a bucketsize of 0.5 mm:
    (V_RAIN counts on, counter counts on)
    Day1 ................ Day2
    V_rain 0.5 ............ V_rain 2.5
    V_rain 1.0 ............ V_rain 3.0
    Counter 1.0 ............ Counter 3.0
    V_Rain 1.5 ............ V_Rain 3.5
    V_Rain 2.0 ............ V_Rain 4.0
    Counter 2.0 ............ Counter 4.0



  • @sundberg84

    With connecting I mean power it on and have it count.

    I am wondering why the sensor should get the readings from the gw ?, the only thing I want is the sensor to send a signal to Domoticz for every pulse it detects

    Alex


  • Hardware Contributor

    @slorf Im pretty sure it does not get any reading from the gateway, its stored only in domoticz database or if you have manually entered some value in the sketch.



  • @sundberg84

    I cleared the Eeprom from both gateway and sensor, then set the V_VAR2 on the sensor on a start value for example 5555

    I changed the sketch not to request any values from the gateway

    When the sensor gets it's first reading it's registered in Domoticz with the value of 5556 ( 5555 + first reading of 1 )

    Now I have to questions:

    After the first reading ( 5556 ) is send to Domoticz I can change the sketch back to where it requests the reading form the gateway ?

    But if the sensor for example quits working for a week, then I have to change the V_VAR2 on the sensor again, which is not very handy ?

    Thanks for the help !!

    Alex


Log in to reply
 

Suggested Topics

56
Online

11.4k
Users

11.1k
Topics

112.6k
Posts