Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Heartbeat publishing wrong values at wrong time #2313

Closed
kappa-lhirsch opened this issue Aug 1, 2024 · 2 comments
Closed

Heartbeat publishing wrong values at wrong time #2313

kappa-lhirsch opened this issue Aug 1, 2024 · 2 comments
Labels
bug Something isn't working
Milestone

Comments

@kappa-lhirsch
Copy link

kappa-lhirsch commented Aug 1, 2024

Describe the bug
Using WebApi V2.9.10 and Publisher-Module V2.9.10
When using a heartbeat interval on a node, to publish values even when no new values are available, I get a weired behavior.
I'm using PeriodicLKG HeartbeatBehavior.

Case 1

Setup:

  • Node1, PublishingInterval, SampleInterval and HeartbeatInterval all set to 30 seconds, Value never updated
  • Node2, PublishingInterval, SampleInterval set to 30 seconds, no HeartbeatInterval, Value is updated every second

image

When the Heartbeat of Node1 happens at the same time as Node2 get published, the value of Node2 becomes automatically 1. Afterwards the Heartbeat of Node1 doesn't happen at the same time as the others get published and the behavior is as expected.

Case 2

Setup:

  • Node1, PublishingInterval, SampleInterval and HeartbeatInterval all set to 30 seconds, Value never updated
  • Node2, PublishingInterval, SampleInterval and HeartbeatInterval all set to 30 seconds, Value is updated every second

image

Now that Node2 also has a HeartbeatInterval set, every HeartbeatInterval an additional value, again 1, from Node2 is published.

Case 3

Setup:

  • Node1, PublishingInterval, SampleInterval set to 30 seconds, no HeartbeatInterval, Value never updated
  • Node2, PublishingInterval, SampleInterval and HeartbeatInterval all set to 30 seconds, Value is updated every second

image

Now the Heartbeat-Value isn't 1 anymore and it is the last published value, which is correct. But why do I even get a Heartbeat when the last published value was only 20 seconds ago and the HeartbeatInterval is set to 30 seconds.

This whole Heartbeat thing is acting completely unreliable. Why does one value influence the other value to become 1 and why do I even get Heartbeats from the other value.

To Reproduce
Steps to reproduce the behavior:

  1. See above

Expected behavior
Heartbeats are only published when no new value is available. Nodes don't influence other nodes.

@marcschier marcschier added the need more information Needs more information label Aug 2, 2024
@marcschier
Copy link
Collaborator

Can you provide sample configuration Json for case1,2,3? Also, can you provide info what you are expecting? Especially about PeriodicLKG behavior?

@marcschier marcschier added bug Something isn't working and removed need more information Needs more information labels Aug 7, 2024
@marcschier marcschier added this to the 2.9.11 milestone Aug 7, 2024
marcschier added a commit that referenced this issue Aug 7, 2024
* Initial functionality for file transfer API
* Update dependencies
* Fix IoT edge installation script
* Run watchdog action when subscription is timed out or ka are missed. 
* Update docker deployment to better test publishing scenarios.
* Add default heartbeat setting option into entry to scale test heartbeat handling.  
* Additional diagnostics to capture running heartbeat and condition timers/items
* Fix heartbeat timer firing constantly 
* #2301 
* #2313
@marcschier
Copy link
Collaborator

@kappa-lhirsch , could you try with mcr.microsoft.com/iotedge/opc-publisher:2.9.11-preview1 and let me know if this is resolved for you?` If not, please see my previous comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants