Closed VladimirKalachikhin closed 3 months ago
How are you setting with your app?
I didn't understand your question.
You said "if I set zones from my app", what do you mean?
Something like this:
app.handleMessage(plugin.id, {
context: "vessels.self",
updates: [
{
source: { label: "e-inkDashboard" },
timestamp: "2024-06-07T20:54:36.342Z",
meta: [
{
path: "navigation.courseOverGroundTrue",
value: {
alarmMethod: [ "sound", "visual" ],
zones : [
{
lower: 0,
upper: 5.3930673886624785,
state: "alarm",
message: "c0257677-6141-4606-9ee5-df7462968df2"
},
{
lower: 5.742133239061344,
upper: 6.283185307179586,
state: "alarm",
message: "c0257677-6141-4606-9ee5-df7462968df2"
},
{
lower: 5.3930673886624785,
upper: 5.742133239061344,
state: "normal",
message: "c0257677-6141-4606-9ee5-df7462968df2"
}
]
}
}
]
}
]
});
You need to use a PUT request.
You are using a delta, that would never get persisted.
Oh. You are in a plugin? We don't have an easy way to send a put from a plugin.
You can describe more about what you are doing. I'm struggling to see why you would do this from a plugin.
Do you care? The Data Model shows no difference between the zones set by me and those set via Data Browser -> Meta Data interface.
The difference is that meta data sent via deltas are not persisted.
You must use PUT requests, which is what the Data Browser uses.
Seriously?
Yes
If you would like help with this. You might want to start treating people with respect.
2.8.2 The zones get lost on server restart if I set zones from my app, Zones are preserved if it's set via Data Browser -> Meta Data interface.