Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Controllers
  3. Domoticz
  4. Pulse Powermeter, set to the same value as real power meter?

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

Scheduled Pinned Locked Moved Domoticz
16 Posts 6 Posters 8.1k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    koen01
    wrote on last edited by
    #2

    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

    1 Reply Last reply
    0
    • F Offline
      F Offline
      fleinze
      wrote on last edited by
      #3

      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...

      1 Reply Last reply
      0
      • alexsh1A Offline
        alexsh1A Offline
        alexsh1
        wrote on last edited by
        #4

        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?

        1 Reply Last reply
        0
        • sundberg84S Offline
          sundberg84S Offline
          sundberg84
          Hardware Contributor
          wrote on last edited by
          #5

          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

          Controller: Proxmox VM - Home Assistant
          MySensors GW: Arduino Uno - W5100 Ethernet, Gw Shield Nrf24l01+ 2,4Ghz
          MySensors GW: Arduino Uno - Gw Shield RFM69, 433mhz
          RFLink GW - Arduino Mega + RFLink Shield, 433mhz

          1 Reply Last reply
          0
          • alexsh1A Offline
            alexsh1A Offline
            alexsh1
            wrote on last edited by
            #6

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

            1 Reply Last reply
            0
            • S Offline
              S Offline
              Slorf
              wrote on last edited by
              #7

              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

              alexsh1A 1 Reply Last reply
              1
              • S Slorf

                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

                alexsh1A Offline
                alexsh1A Offline
                alexsh1
                wrote on last edited by
                #8

                @Slorf - Many thanks!

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  Slorf
                  wrote on last edited by
                  #9

                  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 )

                  1 Reply Last reply
                  0
                  • S Offline
                    S Offline
                    Slorf
                    wrote on last edited by
                    #10

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

                    1 Reply Last reply
                    0
                    • sundberg84S Offline
                      sundberg84S Offline
                      sundberg84
                      Hardware Contributor
                      wrote on last edited by
                      #11

                      @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.

                      Controller: Proxmox VM - Home Assistant
                      MySensors GW: Arduino Uno - W5100 Ethernet, Gw Shield Nrf24l01+ 2,4Ghz
                      MySensors GW: Arduino Uno - Gw Shield RFM69, 433mhz
                      RFLink GW - Arduino Mega + RFLink Shield, 433mhz

                      1 Reply Last reply
                      0
                      • S Offline
                        S Offline
                        Slorf
                        wrote on last edited by
                        #12

                        @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

                        1 Reply Last reply
                        0
                        • sundberg84S Offline
                          sundberg84S Offline
                          sundberg84
                          Hardware Contributor
                          wrote on last edited by
                          #13

                          @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

                          Controller: Proxmox VM - Home Assistant
                          MySensors GW: Arduino Uno - W5100 Ethernet, Gw Shield Nrf24l01+ 2,4Ghz
                          MySensors GW: Arduino Uno - Gw Shield RFM69, 433mhz
                          RFLink GW - Arduino Mega + RFLink Shield, 433mhz

                          1 Reply Last reply
                          0
                          • S Offline
                            S Offline
                            Slorf
                            wrote on last edited by
                            #14

                            @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

                            1 Reply Last reply
                            0
                            • sundberg84S Offline
                              sundberg84S Offline
                              sundberg84
                              Hardware Contributor
                              wrote on last edited by
                              #15

                              @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.

                              Controller: Proxmox VM - Home Assistant
                              MySensors GW: Arduino Uno - W5100 Ethernet, Gw Shield Nrf24l01+ 2,4Ghz
                              MySensors GW: Arduino Uno - Gw Shield RFM69, 433mhz
                              RFLink GW - Arduino Mega + RFLink Shield, 433mhz

                              1 Reply Last reply
                              0
                              • S Offline
                                S Offline
                                Slorf
                                wrote on last edited by
                                #16

                                @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

                                1 Reply Last reply
                                0
                                Reply
                                • Reply as topic
                                Log in to reply
                                • Oldest to Newest
                                • Newest to Oldest
                                • Most Votes


                                18

                                Online

                                11.7k

                                Users

                                11.2k

                                Topics

                                113.1k

                                Posts


                                Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                                • Login

                                • Don't have an account? Register

                                • Login or register to search.
                                • First post
                                  Last post
                                0
                                • MySensors
                                • OpenHardware.io
                                • Categories
                                • Recent
                                • Tags
                                • Popular