+1
Under review

Iridium Schedule edit/ Server-Client project

niky94547 2 weeks ago in Other updated 1 week ago 10

Hi,

   We implement iridium server-client platform to one of our

projects. Already try your sample code for schedules within the

project (see attachment). All operate as expected we could manage

schedule time/date and enable/disable, but the states do not saved

after server reboot. We try to save EventData tag within DB but

without success. Could you please advice/provide some hints

guidelines so we could solve it.


Thanks a lot for kind support,

Schedule_edit.zip

Under review

Hello.

You need to specify saving in the database in the feedback settings, in your case this is a string:


Then the values in the database will be saved:

Hello Vladimir,

Thanks for your reply. I had tested as described. Following error appear on log when saving schedule or on server start:

Tag EventData_from_server string is to big to Web socket. Limit is about 900 bytes for name_len and value_len.

 I had check db string records are made, but on restart same behavior not load edited values.


Thanks again,

Br,

Hello.

This error only indicates that the web server in the web browser cannot display more than 900 bytes for feedback. This restriction is intended to ensure that large values in feedbacks do not cause the browser to crash. The size of the feedback in iRidium server is limited only by the available memory. If the database recorded the entire line, then everything works correctly. GetFeedback() method can get the entire string.

Hello,

  Thanks so it's not the case. I made more tests with your sample (only enabling/disabling schedules). Here is db records. Records on UI update changes are ok, but after restart string with defaults values are written. Most probably something within js code?

Br,

Hello.

Please specify what kind of restart it? Server restart? Or a client? What is the default value?

Hello,

  Only server restart cause issue. When restart/release client there is no issue, correct values were loaded exactly as it was set in the string. But when server restart correct values are not loaded (last values set in the string), but "defaults" which i think comes from initial creation of schedule within studio.

Br,  

In the server project, set the parameter "Load On Start = False".

I set "Load On Start = False" , for "EventData_from_server" tag.  No result, same behavior.


Studio.png


Br,

Hello.

In the project everything is correct, it does not handle the restart of the server. Therefore, at the start, the value from the Schedule will always be taken.

In your case, for the tag "EventData_from_server" you need to enable saving to the database and "Load On Start". Then in the listener with EVENT_START to take value of a feedback "EventData_from_server" and to execute EventChanger.

Hi Vladimir,

  Thanks for your support. As i understood sample project is not intended to save schedule values when server restart, even if tag "EventData_from_server" is saved in db and load on start. So js modification should be made. Could you assist with modification of js as I'm beginner and no into scripting. It's not an urgent matter, but would like to implement functionality withing final visualization and project fulfillment.

Thanks a lot,

Br,