Forum Home › Forums › Understanding the Software › Only Archive on “Status change”
- This topic has 32 replies, 2 voices, and was last updated 4 days, 13 hours ago by
Mikhail.
-
AuthorPosts
-
January 13, 2026 at 10:12 pm #17547
TroyV23
ParticipantIm attempting a different path, so I’ve created this feed using the API:
https://i.postimg.cc/sxZ2X3B3/tmp-1de38a8b-3926-45a1-9bc3-bfc23f60969d.png
I am not able to display the channel number it always displays as undefined.
mainApi.getHistData(ARCHIVE_BIT, timeRange, “55500-55508”, function (dto) {
let outElem = $(“#divData2”);if (dto.ok) {
outElem.html(“”);
let timestamps = dto.data.timestamps;if (timestamps.length > 0) {
let trend = dto.data.trends[0];
let table = $(“<table></table>”);
table.append(“<tr><th>Date</th><th>Time</th><th>Channel</th><th>State</th></tr>”);for (let i = 0; i < timestamps.length; i++) {
let timestamp = timestamps[i];
let record = trend[i];
let state = record.df.dispVal;
let channel = record.cnlNum;// Only show On/Off
if (state !== “On” && state !== “Off”) continue;let dt = new Date(timestamp.lt);
let day = String(dt.getDate()).padStart(2, “0”);
let month = dt.toLocaleString(“en-US”, { month: “short” });
let year = dt.getFullYear();let hours = String(dt.getHours()).padStart(2, “0”);
let minutes = String(dt.getMinutes()).padStart(2, “0”);let dateStr =
${day}-${month}-${year};
let timeStr =${hours}:${minutes};// Pick CSS class
let stateClass = state === “On” ? “state-on” : “state-off”;table.append(
`<tr>
<td>${dateStr}</td>
<td>${timeStr}</td>
<td>${channel}</td>
<td class=”${stateClass}”>${state}</td>
</tr>`
);January 14, 2026 at 1:47 pm #17554
MikhailModeratorThe existing API does not return a channel name. However, you could implement your own API to do that.
About the 2nd question:
Performconsole.log(dto)to check the object contents.June 10, 2026 at 4:27 pm #18031TroyV23
ParticipantI’ve made my own custom html using the API and a imported CSV to fill channel names which is working really well now.
The problem I’m still having is the polling timing, even though I have it configured to write on change, you said it should be checking status approx. 10 times a second.
My data shows it is only checking approx. every 102 to 105 seconds for changes, and then it posts a whole bunch of “changes” with identical time stamps, when in reality those events all took places many seconds apart.
Any idea what can cause this delay for checking on change status?
June 11, 2026 at 11:09 am #18033
MikhailModeratorHello,
What is the architecture of your solution?June 11, 2026 at 2:08 pm #18036TroyV23
ParticipantThis is how it is set up right now:

Running Windows Server 2019 (x64) on Web server, and 2022 (x64) on the Application Server.
June 11, 2026 at 3:06 pm #18037TroyV23
ParticipantIs this possibly an issue?
https://iili.io/CCFzeCg.md.png
-
This reply was modified 2 months, 1 week ago by
Mikhail.
June 15, 2026 at 2:32 pm #18040
MikhailModeratorThe architecture is OK.
The last image cannot be open.June 16, 2026 at 4:15 pm #18046TroyV23
Participant[img]https://i.imghippo.com/files/U9965lM.png[/img]
Is this ok?
-
This reply was modified 2 months, 1 week ago by
TroyV23.
June 16, 2026 at 4:24 pm #18048TroyV23
Participant
June 17, 2026 at 2:17 pm #18055
MikhailModeratorThe highlighted value is too big. Use a value from 0 to 1000.
August 7, 2026 at 4:29 pm #18247TroyV23
ParticipantI have a custom Historical archive configured to write on change, and periodic is not checked. IT is working most of the time, but sometimes I see some glitches.
The communication line I’m polling has about 10 devices, each with about 100 digital inputs. I made a custom historical archive so that only status changes OFF-ON or ON-OFF will generate a database entry. For some reason I still get certain inputs with multiple ON status in a row. What can cause this?
August 8, 2026 at 7:38 am #18249
MikhailModeratorHello,
Please provide the corresponding screenshots.August 12, 2026 at 8:35 pm #18256TroyV23
ParticipantHere is the current archive config:
https://i.postimg.cc/rKg71cVM/Screenshot-2026-08-12-161747.png
configHere is a sample output using the API:
https://i.postimg.cc/svKbYyj3/Screenshot-2026-08-12-162904.png
outputThere are repeated entries here all in OFF state which should not trigger more than once. I have another data logger running and confirmed the status has not changed in this time.
I am wondering if another channel changes value, are all others re-checked even if they did not change?
-
This reply was modified 1 week, 5 days ago by
Mikhail.
August 13, 2026 at 12:11 pm #18262
MikhailModeratorUnable to open the above links, unfortunately.
August 13, 2026 at 12:44 pm #18266TroyV23
Participant -
This reply was modified 2 months, 1 week ago by
-
AuthorPosts
- You must be logged in to reply to this topic.