Announcement

Collapse
No announcement yet.

Node-red gives double update bug.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #31
    So remove the debug node, Malosa and see if one of the messages goes away. You could just delete the wire to test this is you feel you need to keep the node long term.
    Karl S
    HS4Pro on Windows 10
    242 Devices
    56 Z-Wave Nodes
    37 Events
    HSTouch Clients: 3 Android, 1 iOS
    Google Home: 3 Mini units 1 display

    Comment


      #32
      Originally posted by Malosa View Post

      Well since i checked my influxdb i did see double value's all the time after a status and value gets updated by 1 device.
      This to me points to the device being updated twice by the plugin or script that is updating it and has nothing to do with node-red as you say it is fine for other devices. What is shown in the HS log when the device is triggered. Is it displayed twice in there?

      Originally posted by Malosa View Post

      So when it updates and i check the output in node-red it triggers 2x, 1 time for status and one time for value in a second..
      How do you know the update is for the value one time and the status another as both values in the debug are the same?
      Zwave = Z-Stick, 3xHSM100� 7xACT ZDM230, 1xEverspring SM103, 2xACT HomePro ZRP210.
      X10 = CM12U, 2xAM12, 1xAW10, 1 x TM13U, 1xMS13, 2xHR10, 2xSS13
      Other Hardware = ADI Ocelot + secu16, Global Cache GC100, RFXtrx433, 3 x Foscams.
      Plugings = RFXcom, ActiveBackup, Applied Digital Ocelot, BLDeviceMatrix, BLGarbage, BLLAN, Current Cost, Global Cache GC100,HSTouch Android, HSTouch Server, HSTouch Server Unlimited, NetCAM, PowerTrigger, SageWebcamXP, SqueezeBox, X10 CM11A/CM12U.
      Scripts =
      Various

      Comment


        #33
        Originally posted by enigmatheatre View Post

        This to me points to the device being updated twice by the plugin or script that is updating it and has nothing to do with node-red as you say it is fine for other devices. What is shown in the HS log when the device is triggered. Is it displayed twice in there?



        How do you know the update is for the value one time and the status another as both values in the debug are the same?
        no its not updated twice, i just did debug on the homeseer plugin and its updating 1x the same value.


        So remove the debug node, Malosa and see if one of the messages goes away. You could just delete the wire to test this is you feel you need to keep the node long term.
        no wire for debug is connected.


        well its not a big deal but can this cause instability issues?
        its happening to some of the devices i did not check them all because i enabled over 20 devcices..
        Preferred -> Jon's Plugins, Pushover, Phlocation, Easy-trigger,
        Rfxcom, Blade Plugins, Pushbullet, homekit, Malosa Scripts




        HS3Pro 4.0.8.0 on windows 10 enterprise X64 on hp quadcore laptop 8 GB.

        Comment


          #34
          Node-RED and HomeSeer versions....?? Although I don't think that could be a problem ..??

          The whole screenshot of your setup..??


          Eman.
          TinkerLand : Life's Choices,"No One Size Fits All"

          Comment


            #35
            Click image for larger version  Name:	image_94938.png Views:	3 Size:	297.2 KB ID:	1429668
            Originally posted by Eman View Post
            Node-RED and HomeSeer versions....?? Although I don't think that could be a problem ..??

            The whole screenshot of your setup..??


            Eman.
            HS4.1.5 and the last node-red.
            this is the plugin i getting info from.
            Preferred -> Jon's Plugins, Pushover, Phlocation, Easy-trigger,
            Rfxcom, Blade Plugins, Pushbullet, homekit, Malosa Scripts




            HS3Pro 4.0.8.0 on windows 10 enterprise X64 on hp quadcore laptop 8 GB.

            Comment


              #36

              Click image for larger version

Name:	image_94938.png
Views:	62
Size:	289.4 KB
ID:	1429674
              There is that Change Node "Gas Daily Total" at the bottom, although not connected to anything but I think would it would give you similar values as the one above it "Gas consumed total today" If you don't need it delete it.

              And something else, split the nodes into 2 function nodes going to HomeseerENERGY and test by first removing half of the nodes

              Eman.
              TinkerLand : Life's Choices,"No One Size Fits All"

              Comment


                #37
                Gas live day total gives me only 1 x value with the throttle node, that was the one giving double status on influxdb i solved that with the throttle node instead of RBE.

                While the rest almost all give 2x value in th windows debug screen and not node-red and in influx db.


                1.Some devices are reporting double payload because of the delay of value-string in Node-Red
                2.Some devices not reporting double payload in Node-Red but in the windows console window, while not connected to any debug line.


                I'm very sure homeseer need to fix the webhook,and delay it with 1 ms, i see when a value and status change its faster updated in node-red than homeseer self.
                i don;t think it causes stability issue's.



                here my list of some double items, u see some devices update double because 1 value did delay while update,
                but some of them not.

                The temperature sensors are MQTT
                some of them in the list below are virtual devices and plugin of plugwise.
                this is the list of only the power management and temperature from past 10 seconds

                regards

                Code:
                 ref: 5689,
                name: 'Temperature',
                location: 'Kitchen',
                location2: 'Temperature',
                value: 17,
                status: '17°C',
                last_change: '/Date(1604041893743+0100)/'
                }
                device update:
                {
                ref: 5904,
                name: 'Watts',
                location: 'Zolder',
                location2: 'Plugwise Device',
                value: 0,
                status: '0 Watts',
                last_change: '/Date(1604041896793+0100)/'
                }
                device update:
                {
                ref: 5998,
                name: 'Electricity consumed (current)',
                location: 'Zolder',
                location2: 'Plugwise Smile',
                value: 409,
                status: '409 Watts',
                last_change: '/Date(1604041899421+0100)/'
                }
                device update:
                {
                ref: 5998,
                name: 'Electricity consumed (current)',
                location: 'Zolder',
                location2: 'Plugwise Smile',
                value: 409,
                status: '409 Watts',
                last_change: '/Date(1604041899421+0100)/'
                }
                device update:
                {
                ref: 5904,
                name: 'Watts',
                location: 'Zolder',
                location2: 'Plugwise Device',
                value: 0.266559463246038,
                status: '0 Watts',
                last_change: '/Date(1604041900842+0100)/'
                }
                device update:
                {
                ref: 5998,
                name: 'Electricity consumed (current)',
                location: 'Zolder',
                location2: 'Plugwise Smile',
                value: 398,
                status: '398 Watts',
                last_change: '/Date(1604041905185+0100)/'
                }
                device update:
                {
                ref: 5998,
                name: 'Electricity consumed (current)',
                location: 'Zolder',
                location2: 'Plugwise Smile',
                value: 398,
                status: '398 Watts',
                last_change: '/Date(1604041905185+0100)/'
                }
                device update:
                {
                ref: 5904,
                name: 'Watts',
                location: 'Zolder',
                location2: 'Plugwise Device',
                value: 0,
                status: '0 Watts',
                last_change: '/Date(1604041908920+0100)/'
                }
                device update:
                {
                ref: 5992,
                name: 'Peak electricity consumed (total)',
                location: 'Zolder',
                location2: 'Plugwise Smile',
                value: 1670.436,
                status: '1670.436 kW Hours',
                last_change: '/Date(1604041916613+0100)/'
                }
                device update:
                {
                ref: 5992,
                name: 'Peak electricity consumed (total)',
                location: 'Zolder',
                location2: 'Plugwise Smile',
                value: 1670.436,
                status: '1670.436 kW Hours',
                last_change: '/Date(1604041916613+0100)/'
                }
                device update:
                {
                ref: 5998,
                name: 'Electricity consumed (current)',
                location: 'Zolder',
                location2: 'Plugwise Smile',
                value: 402,
                status: '402 Watts',
                last_change: '/Date(1604041916670+0100)/'
                }
                device update:
                {
                ref: 5998,
                name: 'Electricity consumed (current)',
                location: 'Zolder',
                location2: 'Plugwise Smile',
                value: 402,
                status: '402 Watts',
                last_change: '/Date(1604041916670+0100)/'
                }
                device update:
                {
                ref: 6001,
                name: 'Gas consumed (total)',
                location: 'Zolder',
                location2: 'Plugwise Smile',
                value: 2052,
                status: '2052 m3',
                last_change: '/Date(1604041916709+0100)/'
                }
                device update:
                {
                ref: 6001,
                name: 'Gas consumed (total)',
                location: 'Zolder',
                location2: 'Plugwise Smile',
                value: 2052,
                status: '2052 m3',
                last_change: '/Date(1604041916709+0100)/'
                }
                runEvent id=142
                device update:
                {
                ref: 3972,
                name: 'Live Gas Hour',
                location: 'Gas Total',
                location2: 'Gas Check',
                value: 0.04,
                status: '0.032',
                last_change: '/Date(1604041916741+0100)/'
                }
                device update:
                {
                ref: 3972,
                name: 'Live Gas Hour',
                location: 'Gas Total',
                location2: 'Gas Check',
                value: 0.04,
                status: '0.04',
                last_change: '/Date(1604041916751+0100)/'
                }
                device update:
                {
                ref: 3973,
                name: 'Live Gas Consumed Hour',
                location: 'Gas Total',
                location2: 'Gas Check',
                value: 0.752,
                status: '0.712',
                last_change: '/Date(1604041916769+0100)/'
                }
                device update:
                {
                ref: 3973,
                name: 'Live Gas Consumed Hour',
                location: 'Gas Total',
                location2: 'Gas Check',
                value: 0.752,
                status: '0.712',
                last_change: '/Date(1604041916769+0100)/'
                }
                device update:
                {
                ref: 3973,
                name: 'Live Gas Consumed Hour',
                location: 'Gas Total',
                location2: 'Gas Check',
                value: 0.752,
                status: '0.752',
                last_change: '/Date(1604041916771+0100)/'
                }
                device update:
                {
                ref: 3973,
                name: 'Live Gas Consumed Hour',
                location: 'Gas Total',
                location2: 'Gas Check',
                value: 0.752,
                status: '0.752',
                last_change: '/Date(1604041916771+0100)/'
                }
                device update:
                {
                ref: 3974,
                name: 'Live Gas Cost',
                location: 'Gas Total',
                location2: 'Gas Check',
                value: 0.49,
                status: '0.46 €',
                last_change: '/Date(1604041916799+0100)/'
                }
                device update:
                {
                ref: 3974,
                name: 'Live Gas Cost',
                location: 'Gas Total',
                location2: 'Gas Check',
                value: 0.49,
                status: '0.49 €',
                last_change: '/Date(1604041916801+0100)/'
                }
                device update:
                {
                ref: 5904,
                name: 'Watts',
                location: 'Zolder',
                location2: 'Plugwise Device',
                value: 0.266559463246038,
                status: '0 Watts',
                last_change: '/Date(1604041917032+0100)/'
                }
                device update:
                {
                ref: 5904,
                name: 'Watts',
                location: 'Zolder',
                location2: 'Plugwise Device',
                value: 0,
                status: '0 Watts',
                last_change: '/Date(1604041925132+0100)/'
                }
                device update:
                {
                ref: 5904,
                name: 'Watts',
                location: 'Zolder',
                location2: 'Plugwise Device',
                value: 0.266559463246038,
                status: '0 Watts',
                last_change: '/Date(1604041933403+0100)/'
                }
                device update:
                {
                ref: 5904,
                name: 'Watts',
                location: 'Zolder',
                location2: 'Plugwise Device',
                value: 0,
                status: '0 Watts',
                last_change: '/Date(1604041941559+0100)/'
                }
                device update:
                {
                ref: 5904,
                name: 'Watts',
                location: 'Zolder',
                location2: 'Plugwise Device',
                value: 0.266559463246038,
                status: '0 Watts',
                last_change: '/Date(1604041945611+0100)/'
                }
                device update:
                {
                ref: 5904,
                name: 'Watts',
                location: 'Zolder',
                location2: 'Plugwise Device',
                value: 0,
                status: '0 Watts',
                last_change: '/Date(1604041953717+0100)/'
                }
                device update:
                {
                ref: 5816,
                name: 'Humidity',
                location: 'Carlito bedroom',
                location2: 'Humidity',
                value: 52,
                status: '52%',
                last_change: '/Date(1604041955859+0100)/'
                }
                device update:
                {
                ref: 5811,
                name: 'Temperature',
                location: 'Carlito bedroom',
                location2: 'Temperature',
                value: 19,
                status: '19°C',
                last_change: '/Date(1604041955880+0100)/'
                }
                device update:
                {
                ref: 5816,
                name: 'Humidity',
                location: 'Carlito bedroom',
                location2: 'Humidity',
                value: 53,
                status: '53%',
                last_change: '/Date(1604041958352+0100)/'
                }
                device update:
                {
                ref: 5811,
                name: 'Temperature',
                location: 'Carlito bedroom',
                location2: 'Temperature',
                value: 20,
                status: '20°C',
                last_change: '/Date(1604041958369+0100)/'
                }
                device update:
                {
                ref: 5904,
                name: 'Watts',
                location: 'Zolder',
                location2: 'Plugwise Device',
                value: 0.266559463246038,
                status: '0 Watts',
                last_change: '/Date(1604041961817+0100)/'
                }
                Preferred -> Jon's Plugins, Pushover, Phlocation, Easy-trigger,
                Rfxcom, Blade Plugins, Pushbullet, homekit, Malosa Scripts




                HS3Pro 4.0.8.0 on windows 10 enterprise X64 on hp quadcore laptop 8 GB.

                Comment


                  #38
                  Now I know. There should not be any problems because the HomeSeer nodes also report status!

                  Try to add a few of them extra and check...?

                  It would sound weird but it's like they receive the data from the script and they acknowledge then they pass it on.

                  You are the first one I saw who has got your HS device nodes before the Change nodes (because you are collecting data to feed into grafana)


                  Eman
                  TinkerLand : Life's Choices,"No One Size Fits All"

                  Comment


                    #39
                    Originally posted by Eman View Post
                    Now I know. There should not be any problems because the HomeSeer nodes also report status!

                    Try to add a few of them extra and check...?

                    It would sound weird but it's like they receive the data from the script and they acknowledge then they pass it on.

                    You are the first one I saw who has got your HS device nodes before the Change nodes (because you are collecting data to feed into grafana)


                    Eman
                    maybe thats the case nobody reported that issue i have.
                    yeah i wanted full status on grafana so i can track everything.
                    I have atleast 40 devices doing that every second. but like you seen some of them report double but not in grafana.

                    for now i solved the double data in influx/grafana with that node mentioned by ksum, and it works good for me.
                    that other double data i don't care its only logging, but i will care if its get instable when i gonna add all my other devices, but we will see.

                    i'm very happy with the integration of node-red in homeseer, it solve a lot of problems so i can finally track everything

                    Preferred -> Jon's Plugins, Pushover, Phlocation, Easy-trigger,
                    Rfxcom, Blade Plugins, Pushbullet, homekit, Malosa Scripts




                    HS3Pro 4.0.8.0 on windows 10 enterprise X64 on hp quadcore laptop 8 GB.

                    Comment


                      #40
                      Malosa Sorry for jumping into this late but I think I can see the root of the problem you are having. It's in your script calls.

                      Instead of this:

                      Code:
                      Dim Ref
                      Ref = hs.GetDeviceRef("PWR-YDAY-GAS")
                      hs.SetDeviceValueByRef(Ref, data, True)
                      hs.SetDeviceString(Ref, data, True)
                      Try this:

                      Code:
                      Dim Ref
                      Ref = hs.GetDeviceRef("PWR-YDAY-GAS")
                      hs.SetDeviceString(Ref, data, False)
                      hs.SetDeviceValueByRef(Ref, data, True)
                      What your script is currently doing is triggering a "last change' twice by having the third parameter of both calls set to "True".

                      EDIT: I found something else interesting. The webhook will only report a change IF the string or value changes, even with "last change" set to "True". However, correctly, it will not report a change when "last change" is set to "False", even if the string or value changes.

                      Hope this helps,
                      Ken

                      Comment


                        #41
                        Originally posted by kenm View Post
                        Malosa Sorry for jumping into this late but I think I can see the root of the problem you are having. It's in your script calls.

                        Instead of this:

                        Code:
                        Dim Ref
                        Ref = hs.GetDeviceRef("PWR-YDAY-GAS")
                        hs.SetDeviceValueByRef(Ref, data, True)
                        hs.SetDeviceString(Ref, data, True)
                        Try this:

                        Code:
                        Dim Ref
                        Ref = hs.GetDeviceRef("PWR-YDAY-GAS")
                        hs.SetDeviceString(Ref, data, False)
                        hs.SetDeviceValueByRef(Ref, data, True)
                        What your script is currently doing is triggering a "last change' twice by having the third parameter of both calls set to "True".

                        EDIT: I found something else interesting. The webhook will only report a change IF the string or value changes, even with "last change" set to "True". However, correctly, it will not report a change when "last change" is set to "False", even if the string or value changes.

                        Hope this helps,
                        Ken
                        sorry for the late reply,
                        well i must say u right about the script issue, indeed setting one of them to false solve the issue,
                        but the one with some plugins remain, i will ask dev to change the double change.

                        many thanks for that.

                        Preferred -> Jon's Plugins, Pushover, Phlocation, Easy-trigger,
                        Rfxcom, Blade Plugins, Pushbullet, homekit, Malosa Scripts




                        HS3Pro 4.0.8.0 on windows 10 enterprise X64 on hp quadcore laptop 8 GB.

                        Comment


                          #42
                          kenm

                          well here is an update,
                          it still doesnt work.
                          only work sometimes sadly.

                          regards



                          Code:
                          1/26/2020, 10:02:28 AMnode: testoutputmsg.payload : Object
                          objectref: 6423
                          name: "Live bruto power produce"
                          location: "Malosa"
                          location2: "GROWATT"
                          value: 168.5
                          status: "168.5 "
                          last_change: "/Date(1606381363681+0100)/"
                          
                          
                          11/26/2020, 10:06:55 AMnode: 93238ca6.d6496msg : string[24]
                          "Creating handler for all"
                          
                          11/26/2020, 10:07:28 AMnode: testoutput
                          
                          
                          msg.payload : Object
                          object
                          ref: 6423
                          
                          name: "Live bruto power produce"
                          
                          location: "Malosa"
                          
                          location2: "GROWATT"
                          
                          value: 212
                          
                          status: "168.5 "
                          
                          
                          last_change: "/Date(1606381663640+0100)/"
                          Preferred -> Jon's Plugins, Pushover, Phlocation, Easy-trigger,
                          Rfxcom, Blade Plugins, Pushbullet, homekit, Malosa Scripts




                          HS3Pro 4.0.8.0 on windows 10 enterprise X64 on hp quadcore laptop 8 GB.

                          Comment

                          Working...
                          X