Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome General
 PowerHome Messageboard : PowerHome General
Subject Topic: PowerHome 2.1.5b Released Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: December 21 2014 at 00:17 | IP Logged Quote dhoward

Ken,

Checked the code and you're correct...I don't have a horizontal scrollbar on the eventlog sub window. No matter how small you make it, it will never appear. I think I did this to conserve real estate since I have the event column auto size (to a point) for the available space.

I have been able to duplicate your issue and it probably doesnt need a "fix". If I turn titles on and resize large enough, Im always able to get all the columns back to displaying so it is possible to undo the column hiding side effect. Since you're happy with the ability and its possible to go back, I think we're probably good.

Dave.
Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: December 21 2014 at 00:20 | IP Logged Quote dhoward

Steve,

There was a change in the webserver HTML returned that would cause the effect you're describing. I originally made the change to fix a problem with the Android Chrome browser but it looks like it breaks the Safari browser.

I'll either put the code back or provide a user setting so you can select the desired HTML output.

Dave.
Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
smarty
Super User
Super User
Avatar

Joined: May 21 2006
Location: United States
Online Status: Offline
Posts: 728
Posted: December 21 2014 at 12:31 | IP Logged Quote smarty

dhoward wrote:
Steve,

There was a change in the webserver HTML returned that would cause the effect you're describing. I originally made the change to fix a problem with the Android Chrome browser but it looks like it breaks the Safari browser.

I'll either put the code back or provide a user setting so you can select the desired HTML output.

Dave.


Cool - glad you were able to locate a reason.

......

I have seen the following error just a few times....still trying to figure out how to cause/replicate it...


A critical error occurred at 2014-12-21 12:25:35.878.

PowerHome Version: 2.1.5b
Critical Error Count: 1
Error Number: 15
Error Message: Error calling external function %s at line 2 in ue_trayevent event of object w_frame.
Window: w_frame
Object: w_frame
Event: ue_trayevent
Line: 2

__________________
Elk - Insteon - BlueIris - DMC1 - PowerHome - XLobby - HA_Bridge w/Dots - Brultech
Back to Top View smarty's Profile Search for other posts by smarty
 
GadgetGuy
Super User
Super User
Avatar

Joined: June 01 2008
Location: United States
Online Status: Offline
Posts: 942
Posted: December 30 2014 at 06:43 | IP Logged Quote GadgetGuy

Dave - Any forecast on 2.1.5c?

I have been checking the Forum every day, to get some idea of availability in order to plan my work efforts in the week ahead, and to get the "Links" bug fixed so I can update my installation configuration.

Hopefully you have not run into serious challenges.


PS-Happy New Year. Soon it will be 2015. My gosh, time sure flies when you are having fun!

__________________
Ken B - Live every day like it's your last. Eventually, you'll get it right!
Back to Top View GadgetGuy's Profile Search for other posts by GadgetGuy
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: December 30 2014 at 14:43 | IP Logged Quote dhoward

Ken,

Hopefully very soon. Just got the Remote CC issue that gg had fixed so moving on to the next one.

I would suspect by the weekend.

Dave.
Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
renard
Groupie
Groupie
Avatar

Joined: November 01 2009
Location: United States
Online Status: Offline
Posts: 74
Posted: December 31 2014 at 01:14 | IP Logged Quote renard

For GadgetGuy,

You can use 2.15a to maintain links as the PH database is compatible with both versions. I have been going back and forth using 2.15a to do link repairs and running with 2.15b with no issues. If you saved the old executable folder (renamed), just run pwrhome.exe from the saved directory. I have a totally generic install with no special directories, I am not sure this will work with an exotic implementation.

__________________
Terry
Back to Top View renard's Profile Search for other posts by renard
 
GadgetGuy
Super User
Super User
Avatar

Joined: June 01 2008
Location: United States
Online Status: Offline
Posts: 942
Posted: December 31 2014 at 07:20 | IP Logged Quote GadgetGuy

renard-

Thanks. Good thinkin'

I have been debating whether to do that or not. My 2.1.5a install is still complete in a renamed folder, so it would be easy to do for a quick Link repair.

I've been so tied up implementing the new PH 1-WIRE functionality, that I haven't worried too much yet about the few link operations I need to do. Since it looks like "c" should be released within the next few days, I may just wait.


__________________
Ken B - Live every day like it's your last. Eventually, you'll get it right!
Back to Top View GadgetGuy's Profile Search for other posts by GadgetGuy
 
gg102
Senior Member
Senior Member


Joined: January 29 2013
Location: United States
Online Status: Offline
Posts: 245
Posted: January 01 2015 at 10:44 | IP Logged Quote gg102

Dave,

I'm sorry to report there may be an issue with the new timed events structure. While I have not lost any, I'm getting extras.

I've been chasing some unusual problems that I could not pin down. After working on it for weeks now, I think I have narrowed it down. Here's what I have found...

In "MY" log file I noticed:
(line   date     tim e           ;  descr....)
...
...
0363 12/31/2014 22:04:12 MBR Bath light NOT turned off...
0364 12/31/2014 22:04:51 MBR Bath light NOT turned off...
0365 12/31/2014 22:06:41 MBR Bath light NOT turned off...
...
...

In the event log it shows:
12/31/2014 22:06:41.022     8    ;  "Macro MBR_BATH_OFF_AUTO executed.
12/31/2014 22:06:41.014     9    ;  Timed Event MBR_BATH_OFF processed.        &n bsp; 146     Execute Timed Event     16777215    ;  #ffffff     32768  ;    #008000
12/31/2014 22:04:51.01     8      "Macro MBR_BATH_OFF_AUTO executed.
12/31/2014 22:04:50.998     9    ;  Timed Event MBR_BATH_OFF processed.        &n bsp; 69     Execute Timed Event     16777215    ;  #ffffff     32768  ;    #008000
12/31/2014 22:04:12.037     8    ;  "Macro MBR_BATH_OFF_AUTO executed.
12/31/2014 22:04:12.03     9      Timed Event MBR_BATH_OFF processed.        &n bsp; 39     Execute Timed Event     16777215    ;  #ffffff     32768  ;    #008000
12/31/2014 22:01:22.029     8    ;  "Macro MBR_BATH ON_AUTO executed.
12/31/2014 22:01:22.019     9    ;  Timed Event MBR_BATH_ON processed.        &n bsp; 900     Execute Timed Event     16777215    ;  #ffffff     32768  ;    #008000
12/31/2014 21:53:47.431     8    ;  "Macro MBR_BATH_OFF_AUTO executed.

12/31/2014 21:47:50.153     27  &nbs p;  Macro MBR LIGHT_OFF_AUTO does not exist or has no detail.          ; 123     System Message     16777215  &nb sp;  #ffffff     128  ;    #800000

12/31/2014 21:47:50.135     8    ;  "Macro MBR LIGHT_OFF_AUTO executed.


Now (IMPORTANTLY),
I only have ONE timed event for turning off the MBR Bath off Auto, yet it executed 3 times, AND you'll see "MBR LIGHT_OFF_AUTO does not exist or has no detail". But it's actually named "MBR_LIGHT_OFF_AUTO" (with the underscore character).


My Macro list is this:


What you'll notice is that the first and second MBR entries have lost the underscore character. I suspect this is confusing the macro or event processor.   

I had the exact same thing happen to another macro. I went through my entire program and changed all the missing underscore characters and THAT event doesn't do this anymore. Now that I have another one doing the same thing, it's good to advise you of this.

Somewhere in the upgrades, we lost some of the underscore characters. As long as they were in sync, it was ok. I suspect that this may no longer be the case.

I can go through my program and find/replace all the missing underscore characters. If I were you, I would NOT HOLDUP the release of "C" for this.



Back to Top View gg102's Profile Search for other posts by gg102
 
gg102
Senior Member
Senior Member


Joined: January 29 2013
Location: United States
Online Status: Offline
Posts: 245
Posted: January 08 2015 at 12:45 | IP Logged Quote gg102

Dave,

I've discovered something.

All my macros that are executing more than once, have a timed event that has a random +/- time.

So, I took a "clean" database again, and made two macros, and two timed events. One Timed event triggered exactly once per minute, the second triggered once per minute +/- random 1. I expect no more than 2 triggers per minute. One at a fixed time and one at a random time per minute.   What I am seeing is as follows:

0005 1/8/2015 11:01:01, FIXED TIME.
0006 1/8/2015 11:01:40 Random Time.
0007 1/8/2015 11:02:01, FIXED TIME.
0008 1/8/2015 11:03:01, FIXED TIME.
0009 1/8/2015 11:03:06 Random Time.
0010 1/8/2015 11:04:01, FIXED TIME.
0011 1/8/2015 11:04:12 Random Time.
0012 1/8/2015 11:05:01, FIXED TIME.
0013 1/8/2015 11:05:53 Random Time.
0014 1/8/2015 11:06:01, FIXED TIME.
0015 1/8/2015 11:06:46 Random Time.
0016 1/8/2015 11:07:01, FIXED TIME.
0017 1/8/2015 11:07:24 Random Time.
0018 1/8/2015 11:08:01, FIXED TIME.
0019 1/8/2015 11:08:49 Random Time.
0020 1/8/2015 11:08:53 Random Time.
0021 1/8/2015 11:09:01, FIXED TIME.
0022 1/8/2015 11:10:01, FIXED TIME.
0023 1/8/2015 11:10:42 Random Time.
0024 1/8/2015 11:11:01, FIXED TIME.
0025 1/8/2015 11:11:57 Random Time.
0026 1/8/2015 11:12:01, FIXED TIME.
0027 1/8/2015 11:12:17 Random Time.
0028 1/8/2015 11:12:22 Random Time.
0029 1/8/2015 11:12:38 Random Time.
0030 1/8/2015 11:13:01, FIXED TIME.
0031 1/8/2015 11:13:05 Random Time.
0032 1/8/2015 11:14:01, FIXED TIME.
0033 1/8/2015 11:15:01, FIXED TIME.
0034 1/8/2015 11:15:02 Random Time.
0035 1/8/2015 11:15:10 Random Time.
0036 1/8/2015 11:16:01, FIXED TIME.
0037 1/8/2015 11:16:11 Random Time.
0038 1/8/2015 11:16:36 Random Time.
0039 1/8/2015 11:17:01, FIXED TIME.
0040 1/8/2015 11:17:11 Random Time.
0041 1/8/2015 11:17:27 Random Time.
0042 1/8/2015 11:17:33 Random Time.
0043 1/8/2015 11:18:01, FIXED TIME.
0044 1/8/2015 11:19:01, FIXED TIME.
0045 1/8/2015 11:19:42 Random Time.
0046 1/8/2015 11:20:01, FIXED TIME.
0047 1/8/2015 11:20:03 Random Time.
0048 1/8/2015 11:21:01, FIXED TIME.
0049 1/8/2015 11:21:38 Random Time.
0050 1/8/2015 11:22:01, FIXED TIME.
0051 1/8/2015 11:22:17 Random Time.

Is it possible that when the timed event gets recreated for the future or past (random+/- 1) it might be "fixed" by the new routine to make sure that no timed event gets created in the past?

I just was not expecting this result.

EDIT:
ok, this may be confusing because some of the TEs are + and some are -. So, try this just to see the problem: Copy the list into notepad. Cut line 19 and paste it to after line 7. Cut line 27 and paste it after line 21. Repeat until you have:
...
Fixed
Random
Fixed
Random
Fixed
Random
...

Ignoring the times for now, what you'll find is that you have three extra Random lines. There should be the same number of fixed and random lines.

That should help understand what I'm seeing.....



Edited by gg102 - January 08 2015 at 15:28
Back to Top View gg102's Profile Search for other posts by gg102
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: January 08 2015 at 15:48 | IP Logged Quote dhoward

gg,

Took a look at your data and something is definitely out of whack.

The way it "should" be working is that if you have a timed event executed once per minute, the start time should be calculated from the reference time and the reference time is updated based upon the frequency.

So, a timed event with an initial reference time of 11:01:00 should fire once a minute with the reference time updating with every firing by 1 minute. So the reference times should always look like 11:01:00, 11:02:00, 11:03:00...ad infinitum.

The reference time solely changes based upon frequency. Now you've got a random +/- offset of 1 minute added to the equation. After the reference time is updated according to the frequency, the random offset is calculated. Say the new ref time is 11:02:00, a random value is calculated to be between - 60 and + 60 seconds. This is added to the ref time and becomes the start time. Say the random value was -30 seconds. With a ref time of 11:02:00, the start time would be 11:01:30. When this event runs at 11:01:30, the reference time will be updated to 11:03:00 and a new random value calculated.

Now say the ref time 11:02:00 and we calculate a random value of +45 which sets the start time to 11:02:45. The timed event will fire at 11:02:45, the ref time will update to 11:03:00 and a new random value will be calculated. If this new random value is -30, the starttime would be 11:02:30 which is in the past. The formula should then retry the random value until a value comes up that is in the future. Say the new value is recalculated and we get -10 which gives us a start time of 11:02:50. This is in the future so is acceptable however you will be getting this single timed event firing twice within a single minute (11:02:45 and 11:02:50).

Not sure if this is how you were expecting it to work but this is the way it "should" be working. Looking at your data, it doesnt appear to be working as designed. I took your data and can see the FIXED TIME timed event running from 11:01:01 to 11:22:01 so it executed 22 times. I copy/pasted the data, removed all the FIXED TIME rows and then numbered the Random time rows starting with 1. I ended with number 25 which is clearly incorrect. I also compared the row number (which should correspond to the minute for the reference time) and there were discrepencies in the start timed difference from the ref time. Its clear that something is not right and the timed events are executing more often than they should so I will be digging further into the code.

Also, if the goal is to have a timed event that fires randomly once a minute, then I would change from Random +/- to just Random + and this should give the desired result.

I'll let you know what I find out in the code.

Dave.
Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
gg102
Senior Member
Senior Member


Joined: January 29 2013
Location: United States
Online Status: Offline
Posts: 245
Posted: January 08 2015 at 15:59 | IP Logged Quote gg102

Dave,
Right.   This was a test case to demonstrate the issue as cleanly as I could reduce it to. I understand what you're saying.

Back to Top View gg102's Profile Search for other posts by gg102
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: January 09 2015 at 00:03 | IP Logged Quote dhoward

gg,

Worked through the code and found the issue. Basically a check is made when updating the timed event for the next runtime to see if the reftime is earlier than the current time. If it is, it just calculates a new time based upon the offset parms. This will cause a problem if you have a random - offset or a random +/- offset and the offset happens to negative. In this case, the timed event has executed and a new runtime is calculated. Since the offset was negative, the starttime is less than the reftime and the current time (essentially the same as starttime while running) is less than the reftime, a new reftime isnt calculated and only a new starttime is calculated potentially resulting in the timed event running twice for a particular reference time.

Anyways, Ive added code to handle this situation so it should be fixed. However, while working with the code and trying to anticipate every possible outcome, I have discovered a potential problem that deviates from my planned method of working.

If you have an offset of random +/- where the offset amount is half as large or larger than the frequency, you can get a situation where the next reftime will actually "skip". For example, taking your sample code above with a timed event having a frequency of 1 and a random +/- offset of 1. If you have an instance where the random offset put starttime ahead of the reftime by 50 seconds (reftime 10:00:00, starttime 10:00:50), the timed event will execute at 10:00:50 and the next reftime will be calculated (which will be 10:01:00). If the random offset calculated for this reftime is negative 30 (which would put the starttime at 10:00:30), this is in the past so the reftime will be bumped up to 10:02:00 and then another random offset starttime calculated. No real good way to handle this situation other than being aware of it when using random +/- offsets close to the frequency.

The other thing to be aware of is potential negative offsets that are larger than the frequency. These will always cause skips in the reftime since you cant calculate a new timed event that occurs in the past.

Anyways, besides those two caveats, we should be working so I'll send you some code to test tomorrow.

Dave.
Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
gg102
Senior Member
Senior Member


Joined: January 29 2013
Location: United States
Online Status: Offline
Posts: 245
Posted: January 09 2015 at 10:27 | IP Logged Quote gg102

Dave,

Thank you very much.

You're right about the frequency issues. I would expect that behavior. In the "real world" I doubt anyone would have an offset greater than the frequency. Maybe you should consider this an error condition??? That case just has nasty all over it.

This "test" situation was only to narrow down and demonstrate the actual problem and to give you a case to debug. Going back to the actual problem, I'm seeing that a TE is happening 3 times per day when it was supposed to happen once per day with a +/- offset of maybe 5 minutes. I'm thinking that you need to include the date or maybe just the day in the decision process. But then again, there's the Jan 1 issue.

In my previous post you'll see that the MBR_Bath_light was turned off three times within roughly 3 minutes. It should only be turned off once ( ...exact, DAILY, random +/- 5... ) In this case, the offset is way less than the frequency, so no nasty.

I'll be awake all day if you want me to test something.


Back to Top View gg102's Profile Search for other posts by gg102
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: January 09 2015 at 16:20 | IP Logged Quote dhoward

gg,

Sent you new executables to test. Should fix the timed events issue.

I thought long and hard about making it an error condition if the offset exceeded the frequency but ultimately decided that for some unknown reason or another someone may want that particular behaviour. I'll have to see if I can make a warning message at least pop up though. Even if I made it a hard error, they could still encounter "issues" with the random +/- unless I restricted that option to no more than half the frequency.

Hopefully this fix will get things running more reliably.

Dave.
Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
gg102
Senior Member
Senior Member


Joined: January 29 2013
Location: United States
Online Status: Offline
Posts: 245
Posted: January 09 2015 at 18:02 | IP Logged Quote gg102

Thank you Dave,

I'll run it immediately and let you know.
Back to Top View gg102's Profile Search for other posts by gg102
 
gg102
Senior Member
Senior Member


Joined: January 29 2013
Location: United States
Online Status: Offline
Posts: 245
Posted: January 11 2015 at 10:25 | IP Logged Quote gg102

Dave,

I ran the update and all is well. The new code has been running now for two days and I have had no extra timed events.


Thank you for all your work.


Back to Top View gg102's Profile Search for other posts by gg102
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

<< Prev Page of 3
  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum