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. Announcements
  3. 💬 Power Meter Pulse Sensor

💬 Power Meter Pulse Sensor

Scheduled Pinned Locked Moved Announcements
183 Posts 40 Posters 45.0k Views 37 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.
  • F flopp

    @moumout31
    Yes correct.
    When I checked with Serial Monitor and some serial.print in different places I could see that arduino registered double interrupts

    moumout31M Offline
    moumout31M Offline
    moumout31
    wrote on last edited by
    #74

    @flopp Thanks a lot, I will try this solution and check if it's better !

    1 Reply Last reply
    0
    • F flopp

      @moumout31
      Yes correct.
      When I checked with Serial Monitor and some serial.print in different places I could see that arduino registered double interrupts

      moumout31M Offline
      moumout31M Offline
      moumout31
      wrote on last edited by
      #75

      @flopp It seems to work, index on Domoticz is still consistent with the real index... I will see in a few days if it's still the case.
      Thanks a lot for your help !

      1 Reply Last reply
      1
      • F flopp

        @moumout31
        Yes correct.
        When I checked with Serial Monitor and some serial.print in different places I could see that arduino registered double interrupts

        moumout31M Offline
        moumout31M Offline
        moumout31
        wrote on last edited by
        #76

        @flopp After a few days, I confirm you that the index is consistent with power meter index.
        However, instant power in watt is not correcly calculated.
        For example, when power meter indicates 550W, about 1500W is calculated by the sketch. Do you know how I can resolve this problem please ?

        Thanks a lot !

        F 1 Reply Last reply
        0
        • moumout31M moumout31

          @flopp After a few days, I confirm you that the index is consistent with power meter index.
          However, instant power in watt is not correcly calculated.
          For example, when power meter indicates 550W, about 1500W is calculated by the sketch. Do you know how I can resolve this problem please ?

          Thanks a lot !

          F Offline
          F Offline
          flopp
          wrote on last edited by
          #77

          @moumout31
          Watt calculation is using time between two interrupts.
          How often do you send watt?
          Did you measure watt with a measurement tool How did you get 500 watts from power meter?
          When you send watt you need to measure exact same second otherwise it will not be correct.

          moumout31M 1 Reply Last reply
          0
          • F flopp

            @moumout31
            Watt calculation is using time between two interrupts.
            How often do you send watt?
            Did you measure watt with a measurement tool How did you get 500 watts from power meter?
            When you send watt you need to measure exact same second otherwise it will not be correct.

            moumout31M Offline
            moumout31M Offline
            moumout31
            wrote on last edited by
            #78

            @flopp Watt is sent every 20 seconds (as done in the original sketch).
            500 watts is the power indicated on the screen of the power meter.

            1 Reply Last reply
            0
            • NiklasON Offline
              NiklasON Offline
              NiklasO
              wrote on last edited by NiklasO
              #79

              Just changed from 1-wire counter to MySensors for logging my power consumption. Using the same LED detector as I did when using 1-wire. Also changed watt limit to 20 000 (my heat pump likes to use 9-10kW sometimes). The wires from the old 1-wire net now provide power for the new MySensors-sensor. I have 10 000 led blinks per kWh. Had som crazy counter values with 1-wire that totally messed up the graphs and haven't seen anything like that with this sketch. Let's hope it stays that way. ;) Dumping data to Domoticz. This sensor gives me higher resolution as a bonus. The 1-wire counter was read every minute, this every 20-sec. ;-)

              0_1490286464866_Domoticz_-_Google_Chrome_2017-03-23_17-27-32_78641890.png

              0_1490286540285_Domoticz_-_Google_Chrome_2017-03-23_17-28-46_94994234.png

              My old 1-wire counter with one crazy value messing upp all the graphs:
              0_1490286637201_Domoticz_-_Google_Chrome_2017-03-23_17-30-09_29365468.png
              I know that you can hold shift and click the value that is crazy to make the graphs show up good but you loose the data for the full day. That's not good. ;-)

              henninneH 1 Reply Last reply
              0
              • S Offline
                S Offline
                Samuel235
                Hardware Contributor
                wrote on last edited by
                #80

                I seem to be getting a connection to my gateway, while monitoring the two topics for the gateway i only seem to see any activity regarding this sensor on the gateway-out topic, and it keeps sending out a type 2 message (req). The serial monitor of the sensors is showing:

                104198 TSF:MSG:SEND,16-16-0-0,s=1,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK:
                114199 TSF:MSG:SEND,16-16-0-0,s=1,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK:
                124200 TSF:MSG:SEND,16-16-0-0,s=1,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK:
                134201 TSF:MSG:SEND,16-16-0-0,s=1,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK:
                144202 TSF:MSG:SEND,16-16-0-0,s=1,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK:
                154203 TSF:MSG:SEND,16-16-0-0,s=1,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK:
                164204 TSF:MSG:SEND,16-16-0-0,s=1,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK:
                174205 TSF:MSG:SEND,16-16-0-0,s=1,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK:
                184206 TSF:MSG:SEND,16-16-0-0,s=1,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK:
                194207 TSF:MSG:SEND,16-16-0-0,s=1,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK:

                So it seems to be sending a request package, but i don't see it on the gateway-in topic and i see other sensors sending data to the gateway-in topic so i'm not subscribed to the wrong one. Is this a structural request message or is this the feature that requests the last known message from the gateway? Either way, there doesn't seem to be any sensor data being sent from the node to the gateway.

                sundberg84S 1 Reply Last reply
                0
                • S Samuel235

                  I seem to be getting a connection to my gateway, while monitoring the two topics for the gateway i only seem to see any activity regarding this sensor on the gateway-out topic, and it keeps sending out a type 2 message (req). The serial monitor of the sensors is showing:

                  104198 TSF:MSG:SEND,16-16-0-0,s=1,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK:
                  114199 TSF:MSG:SEND,16-16-0-0,s=1,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK:
                  124200 TSF:MSG:SEND,16-16-0-0,s=1,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK:
                  134201 TSF:MSG:SEND,16-16-0-0,s=1,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK:
                  144202 TSF:MSG:SEND,16-16-0-0,s=1,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK:
                  154203 TSF:MSG:SEND,16-16-0-0,s=1,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK:
                  164204 TSF:MSG:SEND,16-16-0-0,s=1,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK:
                  174205 TSF:MSG:SEND,16-16-0-0,s=1,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK:
                  184206 TSF:MSG:SEND,16-16-0-0,s=1,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK:
                  194207 TSF:MSG:SEND,16-16-0-0,s=1,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK:

                  So it seems to be sending a request package, but i don't see it on the gateway-in topic and i see other sensors sending data to the gateway-in topic so i'm not subscribed to the wrong one. Is this a structural request message or is this the feature that requests the last known message from the gateway? Either way, there doesn't seem to be any sensor data being sent from the node to the gateway.

                  sundberg84S Offline
                  sundberg84S Offline
                  sundberg84
                  Hardware Contributor
                  wrote on last edited by sundberg84
                  #81

                  @Samuel235 said in 💬 Power Meter Pulse Sensor:

                  164204 TSF:MSG:SEND,16-16-0-0,s=1,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK:

                  I dont know if I dont understand you, but it seems like your node is requesting the last pulse counter. I have mentioned this in several threads I have a problem with this (both this thread and rain sensor thread). Im using an ethernet gw and the request reaches the gw but there my error led blinks and it fails to send it back (or recieve it on the node) so it re-request it.

                  I have never been able to pinpoint it due to repeaters in between.
                  https://forum.mysensors.org/topic/2116/hard-to-grab-time-and-value-sent-from-controller/ (old).

                  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

                  S 1 Reply Last reply
                  1
                  • sundberg84S sundberg84

                    @Samuel235 said in 💬 Power Meter Pulse Sensor:

                    164204 TSF:MSG:SEND,16-16-0-0,s=1,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK:

                    I dont know if I dont understand you, but it seems like your node is requesting the last pulse counter. I have mentioned this in several threads I have a problem with this (both this thread and rain sensor thread). Im using an ethernet gw and the request reaches the gw but there my error led blinks and it fails to send it back (or recieve it on the node) so it re-request it.

                    I have never been able to pinpoint it due to repeaters in between.
                    https://forum.mysensors.org/topic/2116/hard-to-grab-time-and-value-sent-from-controller/ (old).

                    S Offline
                    S Offline
                    Samuel235
                    Hardware Contributor
                    wrote on last edited by
                    #82

                    @sundberg84 - You do understand me correctly :). I made a thread on the troubleshooting section of the forum for this simply because i suspected it was normal behaviour, however. It seems that the node isn't sending any other data to the gateway at all and it can not get the previous value as there isn't one. So, my post here and on the troubleshooting section was me aiming to get to this point and then troubleshoot the actual node to see what can be done to get it to send data.

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      Samuel235
                      Hardware Contributor
                      wrote on last edited by
                      #83

                      Has anyone came across their pulse meter not sending the message for WATT, the other two messages are being sent perfectly fine. My WATT message has been working all day and suddenly stopped.

                      1 Reply Last reply
                      0
                      • NiklasON Offline
                        NiklasON Offline
                        NiklasO
                        wrote on last edited by
                        #84

                        Make sure that you don't reach your wattage limit in the sketch.

                        S 1 Reply Last reply
                        0
                        • NiklasON NiklasO

                          Make sure that you don't reach your wattage limit in the sketch.

                          S Offline
                          S Offline
                          Samuel235
                          Hardware Contributor
                          wrote on last edited by
                          #85

                          @NiklasO - Where is this value stored? I've cleared the EEPROM and the MQTT topic too, but it still refuses to send the watt value.

                          NiklasON 1 Reply Last reply
                          0
                          • S Samuel235

                            @NiklasO - Where is this value stored? I've cleared the EEPROM and the MQTT topic too, but it still refuses to send the watt value.

                            NiklasON Offline
                            NiklasON Offline
                            NiklasO
                            wrote on last edited by NiklasO
                            #86

                            @Samuel235
                            In the sketch, change this
                            #define MAX_WATT 10000 // Max watt value to report. This filetrs outliers.
                            I have it set to 20000, using 15 000 easily when it's cold outside. ;-) Just make sure that you use the right divider for your pulse/kWh count.

                            S 1 Reply Last reply
                            0
                            • NiklasON NiklasO

                              @Samuel235
                              In the sketch, change this
                              #define MAX_WATT 10000 // Max watt value to report. This filetrs outliers.
                              I have it set to 20000, using 15 000 easily when it's cold outside. ;-) Just make sure that you use the right divider for your pulse/kWh count.

                              S Offline
                              S Offline
                              Samuel235
                              Hardware Contributor
                              wrote on last edited by
                              #87

                              Ahh i see what it is it; its set to not send if it hasn't changed.... how much of a silly error that was from me. The wattage is way below 1000 but because i'm using a normal LED on another arduino flashing at a constant rate to set my node up, its not changing the watt value.

                              Back to solving my initial issue now >.<

                              Thank you.

                              1 Reply Last reply
                              1
                              • NiklasON Offline
                                NiklasON Offline
                                NiklasO
                                wrote on last edited by
                                #88

                                Ah, I see. Well, I would like the sensor to send data even if it hasn't changed. What did you change?

                                1 Reply Last reply
                                0
                                • gohanG Offline
                                  gohanG Offline
                                  gohan
                                  Mod
                                  wrote on last edited by
                                  #89

                                  Watt usage is normally changing all the time, so you should have data reported quite often

                                  NiklasON 1 Reply Last reply
                                  0
                                  • gohanG gohan

                                    Watt usage is normally changing all the time, so you should have data reported quite often

                                    NiklasON Offline
                                    NiklasON Offline
                                    NiklasO
                                    wrote on last edited by NiklasO
                                    #90

                                    @gohan But Samuel235 had that problem? ;-) Edit: well, ok, he had a different setup. I need to read better. ;)

                                    1 Reply Last reply
                                    0
                                    • S Offline
                                      S Offline
                                      Samuel235
                                      Hardware Contributor
                                      wrote on last edited by
                                      #91

                                      To be honest, i had it running for a while before it stopped sending the WATTS. But i'm guessing this is the issue as if i vary the blinks it sends it. I'de like to see if anyone has this working recently on OpenHAB through means of not touching the node sketch like people have posted before. I have an idea to send the data of the pulse count message onto the request message topic on MQTT and so then when it requests previous count it would have it.

                                      M 1 Reply Last reply
                                      0
                                      • S Offline
                                        S Offline
                                        Samuel235
                                        Hardware Contributor
                                        wrote on last edited by Samuel235
                                        #92
                                        This post is deleted!
                                        1 Reply Last reply
                                        0
                                        • S Samuel235

                                          To be honest, i had it running for a while before it stopped sending the WATTS. But i'm guessing this is the issue as if i vary the blinks it sends it. I'de like to see if anyone has this working recently on OpenHAB through means of not touching the node sketch like people have posted before. I have an idea to send the data of the pulse count message onto the request message topic on MQTT and so then when it requests previous count it would have it.

                                          M Offline
                                          M Offline
                                          mickecarlsson
                                          wrote on last edited by mickecarlsson
                                          #93

                                          EDIT:
                                          This was not the case, I am still debugging the issue, in the mean time I have deleted the code.

                                          After some debugging it seems that Domoticz messes with the V_WATT and V_KWH, and the solution is to have two sensors, one for kWh and one for W.
                                          After I changed it, I have consistent W and kWh.
                                          See also this issue for Home Assistant

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


                                          15

                                          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