Loosing schedules in calendar after restart of homegenie

Hi,
after a long while on r519 I spent a weekend to update to r525 (more or less a new installation on a Pi 3B). I had to convert a lot of own programs to the new release.

Now there is one problem left --> I’m loosing my schedules in the calendar after a restart of homegenie. The settings for Summer/Wintertime, Weekend, … are there after restart but the time settings are gone. Any thoughts on that?
Would be great to get some help as I have to restart the Pi in the night to get it stable (seems there is a memory leak as the memory consumption is increasing over the day).

I really appreciate your effort in bringing homegenie further after Gene stepped back!!!

PS: I’m currently on your 526 Release, but still get the mentioned problems.

br. Christian

Hi, Christian.

Are you using new Scheduler page (/hg/html/index.html#page_configure_schedulerservice) or old one Calendar prorgam?

there is an XML file where the schedules should be stored… I’m assuming this isnt getting updated?

Any errors in the log?

I have had the same problem while I was using Timetable module.

After moving to the new Scheduler (http://genielabs.github.io/HomeGenie/#/docs/scheduling) - everything works fine.

Hi,
no Error in the log, can you tell me which file it is?

thanks Christian

schedules.xml or homegenie.log?

Hi, Christian.

schedules.xml file is located in HG’s installation folder, Error.log file - inside log folder of HG’s installation directory.

Anyway, there was no logging of errors during write operations to XML files. I have added some logging, so you can try to replace your HomeGenie.exe with this one [HomeGenie.exe (290.5 KB)], try to restart HG and look into logs (look for text UpdateXmlDatabase). As always don’t forget to make a backup.

Also, I have to note that saving of schedules occurs only on a shutdown of HomeGenie, so if you are hard-killing HG process then your changes will not be saved.

Ouch… maybe worth adding a API call that facilitates the flushing to disk of the schedules?

I agree, but it’s better to this globally when updating
modules/programs/schedules/etc. Now everything is saved during shutdown
process.

Thanks for the homegenie file!
You are rigjt, there is an Error on Timetable set


2017-06-20 15:23:19.0846 Info WebServiceGateway 192.168.1.1 HTTP POST 200 /api/HomeAutomation.HomeGenie/Timetable/Timetable.Set [OPEN]

System.FormatException: Input string was not in a correct format.
at System.Number.StringToNumber (System.String str, System.Globalization.NumberStyles options, System.Number+NumberBuffer& number, System.Globalization.NumberFormatInfo info, System.Boolean parseDecimal) [0x00057] in <9bc402929dff445999ba28b84751d284>:0
at System.Number.ParseInt32 (System.String s, System.Globalization.NumberStyles style, System.Globalization.NumberFormatInfo info) [0x00015] in <9bc402929dff445999ba28b84751d284>:0
at System.Int32.Parse (System.String s) [0x00007] in <9bc402929dff445999ba28b84751d284>:0
at HomeGenie.Automation.Scripting.ScriptingInstance+c__AnonStorey0.<>m__A (System.Object args) [0x002b5] in <2d0c08e5f058423d8eb3617a5af3809e>:0
at HomeGenie.ProgramDynamicApi.TryApiCall (MIG.MigInterfaceCommand command) [0x000bc] in :0
at HomeGenie.Service.HomeGenieService.migService_ServiceRequestPostProcess (System.Object sender, MIG.ProcessRequestEventArgs args) [0x0007c] in :0
at MIG.MigService.OnPostProcessRequest (System.Object sender, MIG.MigClientRequest request) [0x00019] in <23027418f9174dd68010f21fc4a3aea3>:0
at MIG.MigService.Gateway_PostProcessRequest (System.Object sender, MIG.ProcessRequestEventArgs args) [0x00008] in <23027418f9174dd68010f21fc4a3aea3>:0
at MIG.Gateways.WebServiceGateway.OnPostProcessRequest (MIG.MigClientRequest request) [0x0001f] in <23027418f9174dd68010f21fc4a3aea3>:0
at MIG.Gateways.WebServiceGateway.Worker (System.Object state) [0x00e25] in <23027418f9174dd68010f21fc4a3aea3>:0


sorry, not skilled enough to find the real reason behind “System.FormatException: Input string was not in a correct format.”!

Sorry have to change the previous post!!!

I Changed only one entry in the table and stored it- --> no error. Entry is there.
Restarted the service from management page of homegenie --> Entry gone, no error

Don’t know whats going on???:rage:

br. Christian

Yes, I think it’s because you are using Timetable program that has been deprecated in v1.1-beta.523 (20/06/2016).
This is the same situation I had some time ago when decided to upgrade my HomeGenie installation. I wrote about it earlier.
Finally, I moved from the old Timetable to the new Scheduler and everything started to work again. But sadly conversion was not streamlined.