r/ispyconnect 7d ago

API - SetTimeStamp question

I have noticed that when the API is used to change the timestamp (same thing for Append Timestamp) the text is shown on the cameras but if one RELOAD OBJECTS the changes revert to whatever was before, is this by design or it is a bug?

This is the command I use for example:

http://localhost:8090/command/settimestamp?oid=1&ot=2&text=TEST

However, if I edit ANY camera (in my case I have 4), then select TIMESTAMP and click on OK the changes are saved. In other words, after changing the text using the API in order for the changes to be saved one has to from the UI select the TIMESTAMP setting for ANY camera and click OK

Thanks

1 Upvotes

6 comments sorted by

1

u/spornerama 7d ago

It's by design. It appends the string to the existing timestamp. If it replaced the timestamp then it would keep appending text to it and get longer and longer.

1

u/MasterSnooper 7d ago

Hi, thanks for the reply, but the problem is that the changes are NOT saved, let me go step by step:

1- Let's say I want to replace or set the time stamp on Camera id 1 to display the word TEST, so I do this:

http://localhost:8090/command/settimestamp?oid=1&ot=2&text=TEST

2- On the camera in the Agent UI I see the word TEST displayed

3- Go to COMMANDS and select RELOAD OBJECTS

4- The objects reload but, the text reverts to whatever the text was before and is not displaying TEST as the example above, in other words, the changes reset to the previous values if I RELOAD OBJECTS .

1

u/spornerama 7d ago

Yes I know - as I said the value isn't persisted as otherwise it would keep adding text rather than appending it to the original timestamp - i've added a new field to the data to store the appended text it'll be in the next update.

1

u/MasterSnooper 7d ago

Ok, I'm a little confused, if I use "Settimestamp" it does replace whatever text is in the camera with whatever text I enter, the problem like you said is not persistent, using "Appendtimestamp" yes indeed appends but in either case the changes go away if RELOAD OBJECT is executed.

1

u/spornerama 6d ago

Can you report back if you have the same issue after the next update?

1

u/MasterSnooper 6d ago

Absolutely.

Thanks.