Announcement

Collapse
No announcement yet.

YAQ

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

  • YAQ

    Yup, yet another question

    I have a Non-PI HS3 device that's attached to a Publish Topic (no Sub). It's marked as Send on Value Change, but it's being sent every minute. I read in the docs that a PI-based device can send on Value change, but it doesn't actually say anything about the Non-PI devices. Are Non-PI devices on a schedule then?

    Thanks,
    Z

  • #2
    Both PI and non-PI devices will publish on a value change. The implementation mechanism is different, but same result. A PI device gets a call from HS via CAPI control. mcsMQTT is notified of a non-PI device change via the HS Event callback. If you are getting something published every minute then it is likely that the owner of that device is updating it every second. The debug log should contain lines with "HSEvent".

    Comment


    • #3
      Originally posted by Michael McSharry View Post
      Both PI and non-PI devices will publish on a value change. The implementation mechanism is different, but same result. A PI device gets a call from HS via CAPI control. mcsMQTT is notified of a non-PI device change via the HS Event callback. If you are getting something published every minute then it is likely that the owner of that device is updating it every second. The debug log should contain lines with "HSEvent".
      That's what I thought. The values are not changing, I've confirmed that, one is actually zero. They are being updated (at different rates since they come from 3 other PI's), but with the same value. I suspect HSevent is triggered for any change or update which is why HS provides parm(2) [new value] and parm(3) [old value] to compare??

      Z

      Comment


      • #4
        You also have the option to publish on a log update. This was added for the opposite reason your are asking. That user wanted to have messages published every time the device was updated even though the value may not change. If you are not seeing anomolies in the HS log then this detection/trigger method may work better for you.

        The definition of a value change event is an actual change in DeviceValue. Could it be that the other plugin(s) store a "default" value and then update it to the desired value if their criteria is satisfied. This would show up as an Device Value Change event even though the end result is the same value.

        Comment


        • #5
          Curiously I'm watching HSevent fires with TenHsEvents and monitoring with MQTTspy and I'm still seeing the MQTT pubs going out without a matching HSevent occurrence.
          MQTTspy 7:40:40 - SHELTERMONITOR2/system/water/useage/daily 590
          MQTTspy 7:39:40 - SHELTERMONITOR2/system/water/useage/daily 590
          Last HSevent - 7:29:52 - Water Useage Daily 589 (old) 590 (new)

          One "problem" is some of the HS values have two decimal points so even zero is not zero at times (ie 0.03, etc). Of course there's no deadband to configure in HS.

          You're correct, I do NOT see an HSevent fire without either a value or string change, so not sure what's occurring. Wonder if the Broker is resending?

          Z

          Comment


          • #6
            I use Wireshark to look at low level communications.
            For mcsMQTT there is also the statistics tab that is updated with the last published message.

            Comment


            • #7
              Finally found it....
              Publish Periodic Status...

              Zero fixes the problem.

              Z

              Comment


              • #8
                I had totally forgotten about that option.

                Comment


                • #9
                  I won't for awhile now..

                  I'm assuming as a backup for QOS0 most likely.

                  Z

                  Comment


                  • #10
                    I'm guessing it is a carryover from mcsXap and before I had a working understanding of QOS.

                    Comment

                    Working...
                    X