Skip to content

Conversation

@noursaidi
Copy link
Collaborator

No description provided.

@noursaidi noursaidi changed the title Add stagnant limit to metadata for points Add stale_threshold_sec and named_policies limit to metadata Oct 30, 2025
@noursaidi noursaidi requested a review from grafnu October 30, 2025 15:54
Copy link
Collaborator

@grafnu grafnu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also still pending trying to understand why the tests are failing!

"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"properties": {
"named_policies": {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_policies seems redundant and named is too short -- how about rule_sets?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, It was purposefully redundant to allow future flexibility because this is a free entry, and maybe there is something more structured - e.g. your point about there being different types of policies or an evolution of it.

rule_sets could work - my current terminology is that there are rules (e.g. device is not sending excessive data), and policies is a combination of rules. The present rules are likely (ip - basically device online/offline , mqtt basic connectivities e.g. device is connected, sending messages, not excessive data, and telemetry which is that pointset events pass udmi validation, point values are within error bounds and stale threshold) - and maybe one around gateways.

"type": "number",
"examples": [100]
},
"stale_threshold_sec": {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just to double check -- is this really a point property or should it be on the entire pointset? Is there actually a use-case for different points having different stale thresholds? I would expect that either the device can be accessed so all points would update or none of them would... ?!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say it's on a point, the scenarios would be that the sensor connected to the device is faulty, or a point is misconfigured, or there is some other error of sorts.

There are scenarios where it would differ for valid reasons, for examplle an energy meter fr a lift might not see any usage over the weekend, and it's valid for it to be "stale" for a few days. The main energy meter on the incoming power to a building should probably never be stale.

@pisuke might have thoughts. I think we're setting this on a key points rather than all points on a device.

@grafnu
Copy link
Collaborator

grafnu commented Oct 30, 2025 via email

@noursaidi noursaidi changed the title Add stale_threshold_sec and named_policies limit to metadata Add unchanged_limit_sec and rulesets to metadata Nov 5, 2025
@noursaidi noursaidi requested a review from grafnu November 5, 2025 22:26
@noursaidi
Copy link
Collaborator Author

Comments incorporated - although should it be rule_sets or rulesets A question recently came up on pointset, so I'm not sure if it;s inconsistent with that set or if it matters at all

@grafnu
Copy link
Collaborator

grafnu commented Nov 7, 2025 via email

Copy link
Collaborator

@grafnu grafnu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one nitty thing about the name to be singular!

}
}
},
"policies": {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, time to be a pedant -- this should just be policy -- the plural form generally indicates that the thing is a { set, list, map } -- a collection of some sort. This level is just a container object, so it's singular.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants