HomeGenie Forum

General Category => Troubleshooting and Support => Topic started by: raptorjr on February 01, 2017, 05:00:04 PM

Title: Widgets turns undefined
Post by: raptorjr on February 01, 2017, 05:00:04 PM
I have a problem. After only a few days widgets that were working turns to undefined. It always start with the Energy widget, and after that the Thermostat widget. If I do a factory reset everything turns back to normal. But I don't want to do that a couple of times every week.

Any suggestions on what I could try?
Title: Re: Widgets turns undefined
Post by: Bounz on February 01, 2017, 08:06:38 PM
Widgets become undefined when corresponding program fails to start or stop unexpectedly. Instead of performing factory reset go to Programs page and start failed program.
Title: Re: Widgets turns undefined
Post by: raptorjr on February 01, 2017, 11:23:03 PM
Thank you. Now I need to figure out why it stops after a few days =)
Title: Re: Widgets turns undefined
Post by: raptorjr on February 06, 2017, 12:16:06 AM
After above help from Bounz I can restart the Energy program when that widget gets undefined.
But which program controls the Basic Thermostat widget?

HG has been running for about 4 days. When I got back home now the Energy and Thermostat widget was undefined. Restarted the Energy program and that widget turned to life again. But what about the Thermostat widget? How can I get that working again without having to reset everything?
Title: Re: Widgets turns undefined
Post by: Bounz on February 06, 2017, 06:19:26 AM
Basic Thermostat Widget is controlled by Basic Thermostat Program (PID: 78). In my setup this program is located inside "Weather and Environment" group.
Title: Re: Widgets turns undefined
Post by: raptorjr on February 06, 2017, 09:38:06 AM
You are gold to this forum Bounz! (or me atleast) I think you know everything about HG =)

There should be a automatic restart option for programs that stop. And maybe a notifiction in some log. But not good that you have to restart them manually all the time. Although I guess they shouldn't crash at all:P
Title: Re: Widgets turns undefined
Post by: Bounz on February 06, 2017, 09:47:05 AM
Yes, this is strange, that programs in your setup suddenly stop. I have HG running for months without any problems.
I'll try to check sources and implement the auto-restart feature.
Title: Re: Widgets turns undefined
Post by: Bounz on February 12, 2017, 02:21:06 PM
Hi, raptorjr.
I have made an auto-restart feature (and also merged your new Add Module dialog). Check the download link for testing build here: http://www.homegenie.it/forum/index.php?topic=129.msg11843#msg11843. (http://www.homegenie.it/forum/index.php?topic=129.msg11843#msg11843.)
Title: Re: Widgets turns undefined
Post by: raptorjr on February 12, 2017, 09:01:21 PM
Nice, will try it as soon as I can.

Could you make a pull request or something? Would be nice to have this in my local dev branch.
Title: Re: Widgets turns undefined
Post by: Bounz on February 12, 2017, 09:58:12 PM
No problem: https://github.com/raptorjr/HomeGenie/pull/2
You can easily do such pull requests into your own repo by yourself also.
Title: Re: Widgets turns undefined
Post by: raptorjr on February 12, 2017, 10:25:42 PM
Thank you. Everything is new to me. JavaScript, HTML, Web development and GitHub. But I'm slowly learning.
Title: Re: Widgets turns undefined
Post by: Bounz on February 14, 2017, 06:25:28 AM
I was found this git tutorial very helpful when started to use git as a main version control system. Maybe it will help you too.
http://learngitbranching.js.org/ (http://learngitbranching.js.org/)