Please login or register.

Login with username, password and session length
Pages: 1 2 3 [4] 5 6

Author Topic: PC Companion Weather Issue  (Read 85589 times)

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 283
  • Posts: 10509
  • I don't work for X10, I use it successfuly!
Re: PC Companion Weather Issue
« Reply #45 on: March 09, 2010, 07:36:56 PM »

Thanks jjsalobird for reporting this! #:)
I'll dig into this, to morrow when my eyes are fresh.
It may just be a typo  ::) :'
After the first  8  lines of conditions they start to blur  rofl
 >!
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

jjsalobird

  • Full Member
  • ***
  • Helpful Post Rating: 0
  • Posts: 51
Re: PC Companion Weather Issue
« Reply #46 on: March 10, 2010, 07:13:46 AM »

Well Tuicemen,

It may just be me too, trying to do something it was not designed to do.  Here is what I am trying to do. Need to turn have my garage close automatically when the temperature is below a certain point, or when it is snowing or raining.  No one can seem to remember to push the button when they come home! Anyway, I need to check 3 or 4 conditions.  I used a macro that set a flag which I then used to tell the garage what to do, in this case it was flag 1.  In the macro, I first cleared the flag in WWL everytime it checked conditions, I did this by checking if the month was less than 13, which it always is (there may be better ways, but bear me out!).  Then it evaluated each condition, if the first one was true it set the flag if it was off (which it always was because of the month condition), all subsequent conditions were then checked as well, but the macro's condition was if the flag was already set, do nothing.  This way, the flag was always set on the first true condition, and then was never cleared if subsequent conditions were false.  If I recall there was not an "else" option in earlier versions.  Originally, in the last version, it seemed to work fine.  In this version I set up a test using 1 condition and then more than one condition.  I would hit reset and see what AHP would send.  Here is what seems to be happening.  If I want D4 On to fire when the temp is below 60, it sends my D4 OFF (which is actually my month condition, which is first, which is alway true), then the D4 ON (the temp condition), the first time I hit the reset timer button.  This is expected. After that, when it checks, if the temp is still below 60 it sends nothing on all subsequent checks. Does not fire the D4 OFF for the month condition, nor the D4 ON for the temp condition, just does nothing. (I removed all conditions in my macro for the test, and I used no else statement in WWL).  If the temp then goes above 60, it will send the D4 OFF (the month check condition which is first, and ignore the D4 ON for the temperature condition, since it is not met), as expected. I could also swear, but not certain that the next time it checked it would send the D4 ON when it was not supposed to, then the next time it would not, then it would alternate between just D4 OFF (which it should do-month check) and D4 OFF and D4 ON (which should not fire, temp check).  Thus on every check, my flag would switch between on and off.  I'll check this more thoroughly later today.

When you add more than one condition, it seems to do go nuts, now for sure alternating between (in my case D4 ON and OFF, turning my flag on, then off, on then off, regardless of the condition being met or not), as well as other strange behavior that I have not pinpointed as of yet.  I have not checked the docs lately, but does it evaluate each condition in order?  And is it supposed to fire the "else" if the condition is not met?  What if  I do not use an "else" and leave it blank?  Anyway, have at it, I'll try again later today.

jjsalobird
Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 283
  • Posts: 10509
  • I don't work for X10, I use it successfuly!
Re: PC Companion Weather Issue
« Reply #47 on: March 10, 2010, 04:06:23 PM »

I suspect it is your macros as I don't see anything in the code here. ???
I also think your trying to do something X10WeatherWatch wasn't designed to do. ???
In any case can you email me your WS_Settings file so I can test it here?

The else options were added to stop repeated x10 sends (flooding)
As well as to add a x10 send for when the conditions weren't met without having to use another paramiter.
Each will only fire once before the other leaving the else blank will not have any effect.

X10WeatherWatch has no x10 receive built into it it only sends.

I'll look into possibly adding a X10 trigger option for next release.
« Last Edit: March 10, 2010, 04:08:04 PM by Tuicemen »
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

jjsalobird

  • Full Member
  • ***
  • Helpful Post Rating: 0
  • Posts: 51
Re: PC Companion Weather Issue
« Reply #48 on: March 10, 2010, 04:25:28 PM »

Tuicemen,

I ran through it all again and have duplicated this on numerous times.   -:) I think I pinpointed the issue.  My triggers are if temp is below 60 or if wind speed is above 20, or if current condition is rain, sleet, etc, then turn D4 ON.  everything works, except the wind speed.  As long as I set the value for windspeed as a single digit number, it works correctly, but as soon as I make it 10 or above, the greater than and less than signs work backwards.

For example, Right now it is 73 degrees and the wind is 7 MPH.  So if I set up, if temp is less than 60, D4 ON or if wind speed is less than 9, D4 ON.  In this scenario, all works as expected, D4 ON is triggered based on wind speed.  If I change the wind speed to greater than 9, then no D4 ON is triggered at all.  But if I change the wind speed to greater than 10 or any other 2 digit number, it triggers a D4 ON, which should not happen since actual wind speed is 7.  If I reverse the sign to less than 10, or any other 2 digit number, it does not trigger the D4 ON even though it should since the actual wind speed is 7.  This appears to be reversed for double digit numbers.  Hope this helps, I ran through about 7 or 8 random double digit numbers as high as 50 to test this theory.

PuebloPete -:)
Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 283
  • Posts: 10509
  • I don't work for X10, I use it successfuly!
Re: PC Companion Weather Issue
« Reply #49 on: March 10, 2010, 05:41:00 PM »

Ok I can recreate the problem here ???
 B:( Code looks good . Guess I got some digging to do! ::) :'
I suspect the same may hold true for some other Paramiters
Man I'm going to see "< > ="  in my sleep! rofl
 >!
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

jjsalobird

  • Full Member
  • ***
  • Helpful Post Rating: 0
  • Posts: 51
Re: PC Companion Weather Issue
« Reply #50 on: March 11, 2010, 06:57:23 AM »

Tuicemen,

Just noticed some other odd behavior.  Last night I left it running all night (usually do!) with only the month check and the temp check set, anyway the temp dropped below the trigger level and a D4 ON should have fired.  Checked log and not once all night did anything fire.  Had it set for every 5 minutes which should have fired a D4 OFF everytime, since that is checking whether the month is less than 13. Then when temp dropped below trigger it should have fired a D4 ON, everytime as well, but nothing.

Also noted 2 other things.  I purposely changed the trigger value of my temp, to a value greater than the actual temp when I went to bed to see if my trigger would fire at all, since I suspected this. Temp at bed time was 56 and I set my trigger to fire at below 60. In the morning the window, inside WWL with all the data never refreshed all night, as all values were exactly the same as I left them.  Only when I manually hit the reset timer button did the values change, temp went immediately to  50 degrees.  Second, now everytime I hit the reset timer button I am getting alternating D4 OFF and D4 ON.  It should be firing off both each time, leaving D4 ON, but it is not.  One time it leaves it OFF, the next time I manually hit reset it turns if D4 ON.  Not sure what is happening.  As I said, my macros are doing nothing but setting a flag, no conditions any more. Sorry  :'(
Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 283
  • Posts: 10509
  • I don't work for X10, I use it successfuly!
Re: PC Companion Weather Issue
« Reply #51 on: March 11, 2010, 08:30:55 AM »

No Problem,
The program is set so once a paramiter and the conditions for it are set,  It will fire the X10 trigger  as soon as condition is met either with the reset, first startup or with actual condition. and not fire again until condition stops being met.
So if you have a temperature condition to fire off D3 on when it is <-3 it will fire off D# once and never fire it off again until temperature goes above -3. if it goes above-3 then drops back down it will fire.
It doesn't fire the D3 every cycle that it is -3.
I think I've found the issue with the < >
I've looked at the timer as the screen should have refreshed
:-[  Found the issue there too, seems I had commented out a key piece of code while testing  and never undid it :-[
I should have a fix out this morring.
 >!
« Last Edit: March 11, 2010, 07:07:28 PM by Tuicemen »
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

jjsalobird

  • Full Member
  • ***
  • Helpful Post Rating: 0
  • Posts: 51
Re: PC Companion Weather Issue
« Reply #52 on: March 11, 2010, 06:00:27 PM »

OK Thanks  Nice work :)%
Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 283
  • Posts: 10509
  • I don't work for X10, I use it successfuly!
Re: PC Companion Weather Issue
« Reply #53 on: March 11, 2010, 08:56:14 PM »

Thanks, I only hope I didn't leave in any debug stuff this time arround! :-[ ::) :'
 >!
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

jjsalobird

  • Full Member
  • ***
  • Helpful Post Rating: 0
  • Posts: 51
Re: PC Companion Weather Issue
« Reply #54 on: March 12, 2010, 06:46:30 AM »

Tuicemen,

 :'( The plug in pack I downloaded last night still appears not to be working correctly, specifically the timer.  Left it up all night and when I opened it the screen had not refreshed.  Had to hit the reset timer button to get the window to refresh.  Temp was 55 when I went to bed, showed 55 in AM until I hit reset, then changed to 44. None of the triggers fired overnight.  Also, seems I have to hit reset twice before it actually fires the trigger.  Cannot tell if the other things are fixed or not, since it did not trigger any macros. :'(

PuebloPete
Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 283
  • Posts: 10509
  • I don't work for X10, I use it successfuly!
Re: PC Companion Weather Issue
« Reply #55 on: March 12, 2010, 08:28:09 AM »

Email me your WS_Settings file so I can test it here!
What version of X10WeatherWatch got installed? it should be 1.0.0.4.
What is generating the CSV file?
Does your PC hibernate/go to sleep or is it always running?
Are you minimizing X10WeatherWatch?
Sorry for the questions but I'm trying to duplicate here and can't.
I will make some minor changes today so if you can get your settings file to me I can test it here with any new adds I make.
 >!
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

jjsalobird

  • Full Member
  • ***
  • Helpful Post Rating: 0
  • Posts: 51
Re: PC Companion Weather Issue
« Reply #56 on: March 12, 2010, 11:03:18 AM »

Can get them to you sometime around 3:30 PM eastern.  I was using the version that had the time condition built into it and my PC is always on, no sleep, and I am using the csv file generated from the free weather exchange program.  Temp is field 13 and it is set to less than 60 fire trigger.  Will give more details when I get home.

PuebloPete
Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 283
  • Posts: 10509
  • I don't work for X10, I use it successfuly!
Re: PC Companion Weather Issue
« Reply #57 on: March 12, 2010, 11:11:47 AM »

Cool.
I've made some minor changes to the way time triggers work as well as to the option selections, added a blank selection.
I just want to test your settings here in case I missed something.
 >!
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

jjsalobird

  • Full Member
  • ***
  • Helpful Post Rating: 0
  • Posts: 51
Re: PC Companion Weather Issue
« Reply #58 on: March 12, 2010, 04:07:19 PM »

Tuicemen,

The CSV file I am using as well as the xml file are attached.  Just rename the data.txt to data.csv an the other one to WS_Settings.xml.  The basic idea is this.  All triggered x10 commands fire off macros, all the macros do are set and clear flags.  Since your program checks the triggers in order, I do not use your built in temperature trigger, instead I start with the month if it is less than 13 (it always is), then I trigger a D4 OFF which clears all flags - I need to make sure the first test is always true so that I can get all my flags turned off. This way at each check, I start fresh with flags off.  Next I check the temp, if it is below 55, I fire a D4 ON which is a simple macro that sets flag 1.  All the subsequent triggers then check  and if the condition is met, fire the D4 ON which sets the flag.  I use no else line.  This way, if any one of my conditions is true, my flag is turned on, no matter where it is in the checking order.  If none of them are true, then I assume the flag stays off, since D4 ON never fires.  My logic is that each time it checks, every 10 minutes of whatever, it will always turn off the flag, because of the month condition, then it will check each of the other to see if they are true.  If any are, it turns my flag on.  Hope this makes sense.

PuebloPete
Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 283
  • Posts: 10509
  • I don't work for X10, I use it successfuly!
Re: PC Companion Weather Issue
« Reply #59 on: March 12, 2010, 06:36:24 PM »

OK I see what your trying to do!
When I throw your setting into the mix it all screws up.
part of the issue is you have two  paramiters for temperature and two for weather. That's messing with the logic in the program.
Also if you wish the month condition to fire first then it needs to be opposite the Programs Temperature Condition. And even then I'm not sure that that will be enough. I'm testing out a build that should force the timer to stay running.
I'll email you a copy so you can test on your end with the changes I've stated.
If the timer stops it should give me an idea where to look.
>!
Logged
Please Read Topic:
General Forum Etiquette
Before you post!
Pages: 1 2 3 [4] 5 6
 

X10.com | About X10 | X10 Security Systems | Cameras| Package Deals
© Copyright 2014-2016 X10.com All rights reserved.