+1
Under review
Iridium Schedule edit/ Server-Client project
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,
Customer support service by UserEcho
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,
here with some modifications
server
client
linked:
https://support.iridiummobile.net/communities/5/topics/12357-log-of-channels-and-feedbacks-in-ui#comment-74761
https://support.iridiummobile.net/communities/5/topics/12955-sohranenie-znachenij-tegov-na-servere-iridium
server (correct formatting)
Hello!
I try test JS of you, but IR.Log is notice :
[29-10-2019 22:39:49.855] WARNING SCRIPT Script exception: RangeError: C:\Users\Admin\Documents\iRidium pro documents\Server\Documents\Schedule_edit\scripts\serverCript.js:95: error
Hi,
Thanks a lot for the support on our issue. I also test revised code. Following error appear on server log, when I try to update new values from client UI:
[29-10-2019 19:59:39.211] WARNING SCRIPT Script exception: TypeError: C:\Users\USER\Documents\iRidium pro documents\Server\Documents\Project_1396248390\scripts\Newscript.js:95: Tried to use undefined as an object
Br,
Sorry, it's old code
Server.js
moderator: please, edit message above
Hi!
the states do not saved
after server reboot. I try to save EventData tag within DB but
without success.
Can you upload project for me?
You must reboot server after 1min or press ESC key twice
https://translate.google.com/translate?sl=ru&tl=en&u=https%3A%2F%2Fsupport.iridiummobile.net%2Fcommunities%2F5%2Ftopics%2F12955-sohranenie-znachenij-tegov-na-servere-iridium%23comment-138979
https://support.iridiummobile.net/s/attachments/15553/18/11018/a7f9f2d84eec2f1982ffeba051241053.bmp
Hi!
I use iridium studio 2019 version then it's success.
Thank you!
Hi!
With Window server then it's OK
but if i use raspberry then it's not OK.
I reboot raspberry server after 2-3 minutes , it still not ok
Which version are you using on the server?
hi!
i using 1.3.10.18280 version
Schedule_edit.sirpz
Schedule_edit.irpz
see also good example
https://dev.iridi.com/List_API/en#IR.ITEM_PICKER