Please login or register.

Login with username, password and session length
Pages: [1] 2

Author Topic: Controlling a module based on Weather  (Read 2983 times)

LostDog88

  • Hero Member
  • *****
  • Helpful Post Rating: 2
  • Posts: 171
Controlling a module based on Weather
« on: March 22, 2019, 12:53:43 PM »

I have a heat lamp for my barn cats. Sometimes it gets cold at night. I want to be able to control this based on the weather underground module. I have a key and get weather updates to HG (RPI).

I want to make that light come on when the temp gets low and go off when the temp is warm. Night or day.

Is there a way to do this?
Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 282
  • Posts: 10497
  • I don't work for X10, I use it successfuly!
Re: Controlling a module based on Weather
« Reply #1 on: March 22, 2019, 01:57:43 PM »

Yes! however with weather underground now not handing out free api keys Gene removed weather underground from HG so newer versions will not have WU.
I created a HG app (program/script) using info from open weather which Gene now includes, or you can get it from the package manager
You can create a wizard script or use the wizard script I posted I believe it was for temperature but you can change the values.
The script and directions for setup can be found in the User created HG Scripts (programs) section
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

LostDog88

  • Hero Member
  • *****
  • Helpful Post Rating: 2
  • Posts: 171
Re: Controlling a module based on Weather
« Reply #2 on: March 22, 2019, 05:24:26 PM »

Thanks a zillion.

I will work on this over the weekend! I'm excited and my cats will be happy and warm!

Cheers!

 >! >!
Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 282
  • Posts: 10497
  • I don't work for X10, I use it successfuly!
Re: Controlling a module based on Weather
« Reply #3 on: March 22, 2019, 05:49:06 PM »

I use simular scripts to keep my Koi pond open during freezing temperatures, as well I lock my solar tracker during windy times to prevent damage. ;)
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

LostDog88

  • Hero Member
  • *****
  • Helpful Post Rating: 2
  • Posts: 171
Re: Controlling a module based on Weather
« Reply #4 on: March 23, 2019, 07:17:40 PM »

I got it to update the OW module.

There are so many choices for the trigger. I just want a simple if/then:

If temp is under XX turn on light.
If temp is over XX turn off light.

I don't seem to be able to make this happen. The light is off and should be turning on at each update of OW? Right?
Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 282
  • Posts: 10497
  • I don't work for X10, I use it successfuly!
Re: Controlling a module based on Weather
« Reply #5 on: March 23, 2019, 08:22:37 PM »

Did you download the weather triggers and install them from http://forums.x10.com/index.php?topic=30857.0
They are set to turn a x10 device On and a specified temp and the other turns it Off when the value is greater then a specified temperature
you merly need to change the module and temperature values in each program
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

LostDog88

  • Hero Member
  • *****
  • Helpful Post Rating: 2
  • Posts: 171
Re: Controlling a module based on Weather
« Reply #6 on: March 24, 2019, 10:40:44 AM »

I did now! LOL.

Sorry didn't see those I tried to write my own.

I also noticed that they are in Celcius. Is there a way to change the values in your script to Imperial?
Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 282
  • Posts: 10497
  • I don't work for X10, I use it successfuly!
Re: Controlling a module based on Weather
« Reply #7 on: March 24, 2019, 10:45:37 AM »

I believe so it has been a while since creating them you just need to play with the options
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

LostDog88

  • Hero Member
  • *****
  • Helpful Post Rating: 2
  • Posts: 171
Re: Controlling a module based on Weather
« Reply #8 on: March 24, 2019, 10:57:14 AM »

I didn't see any options in your script. I imported them and set them to Imperial temps.

As soon as I enabled them the light came on as OW was reporting less than 65 degrees.

We shall see if it goes off later this afternoon as we are expecting warmer temps.

Now to go fix that carb on my boat so we can get out crab fishing this summer!
Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 282
  • Posts: 10497
  • I don't work for X10, I use it successfuly!
Re: Controlling a module based on Weather
« Reply #9 on: March 24, 2019, 12:54:24 PM »

I didn't see any options in your script. I imported them and set them to Imperial temps.

As soon as I enabled them the light came on as OW was reporting less than 65 degrees.

We shall see if it goes off later this afternoon as we are expecting warmer temps.

Now to go fix that carb on my boat so we can get out crab fishing this summer!
The weather trigger programs don't have options as they were wizard scripts so they must be manually edited to change values.
I may at some point create a universal program that adds the options directly to the modules like the HG Smart E-mailer does.
However I'm waiting for the new OW program Gene has included in the new HG builds to get more reliable.
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

LostDog88

  • Hero Member
  • *****
  • Helpful Post Rating: 2
  • Posts: 171
Re: Controlling a module based on Weather
« Reply #10 on: March 25, 2019, 04:04:23 PM »

Sorry man. I am still struggling with this.

I have imported your less than temp script. I set the temp to 55 degrees to turn on C10.

when I enable the program it goes to idle (yellow button).

Yet it never activates when the temp goes below the agreed upon degrees. :-(
Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 282
  • Posts: 10497
  • I don't work for X10, I use it successfuly!
Re: Controlling a module based on Weather
« Reply #11 on: March 25, 2019, 04:16:19 PM »

If you add it to the layout where the C10 module is, then click on it does it activate C10? ???
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

LostDog88

  • Hero Member
  • *****
  • Helpful Post Rating: 2
  • Posts: 171
Re: Controlling a module based on Weather
« Reply #12 on: March 25, 2019, 05:02:25 PM »

If you add it to the layout where the C10 module is, then click on it does it activate C10? ???

Do you mean add it like a module on the home page?
Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 282
  • Posts: 10497
  • I don't work for X10, I use it successfuly!
Re: Controlling a module based on Weather
« Reply #13 on: March 25, 2019, 05:38:32 PM »

If you add it to the layout where the C10 module is, then click on it does it activate C10? ???

Do you mean add it like a module on the home page?
Yes if that is the same page you have the c10 module configured so you can see if clicking the temperature app triggers the C10 module
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

LostDog88

  • Hero Member
  • *****
  • Helpful Post Rating: 2
  • Posts: 171
Re: Controlling a module based on Weather
« Reply #14 on: March 25, 2019, 06:27:00 PM »

If you add it to the layout where the C10 module is, then click on it does it activate C10? ???

Do you mean add it like a module on the home page?
Yes if that is the same page you have the c10 module configured so you can see if clicking the temperature app triggers the C10 module

Okay. Added it to the home page. It has a yellow button showing it is idle.
When I clicked the box the button stayed yellow and the barn cats light came on! To answer your question. Yes. Now to just trigger it based on temp.
Logged
Pages: [1] 2
 

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