Author Topic: Custom Alert for Aux Temp  (Read 6787 times)

gioman

  • Gentle Breeze
  • **
  • Posts: 11
    • CW8735
    • KNCHENDE18
  • Station Details: vantage Pro2
Custom Alert for Aux Temp
« on: January 24, 2014, 05:33:14 PM »
Hi,

It would be great if I was able to create a custom alert for the Aux Temp.  This unit is in my greenhouse and it would be nice to know if for some reason the heater fails and the temp drops down.....It was zero here this morning.  I usually check the live data screen but sometimes I forget..

Thanks.

elagache

  • Global Moderator
  • Storm
  • *****
  • Posts: 6494
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, Mac mini (2018), macOS 10.14.3, WeatherCat 3
Can be done in AppleScript (Re: Custom Alert for Aux Temp)
« Reply #1 on: January 24, 2014, 10:48:12 PM »
Dear gioman and WeatherCat fans,

It would be great if I was able to create a custom alert for the Aux Temp.  This unit is in my greenhouse and it would be nice to know if for some reason the heater fails and the temp drops down.....It was zero here this morning.  I usually check the live data screen but sometimes I forget..

It is a good suggestion.  FYI, the Aux Temp values are available to AppleScript, so you could cobble together a small AppleScript that could alert you to this.

Cheers, Edouard  [cheers1]

WCDev

  • WeatherCat Developer
  • Administrator
  • Storm
  • *****
  • Posts: 2911
    • CW9739
    • ISCOTLAN25
    • Trixology
  • Station Details: Main Station: Vantage Pro-2, 24hr fars, solar, soil/leaf station, extra temp stations, no U.V. WeatherLink IP.
Re: Custom Alert for Aux Temp
« Reply #2 on: January 25, 2014, 09:36:39 AM »
I agree, it should be possible to set an alert on any channel - I've added this to the todo list.

Thanks for the suggestion  [tup]

Bull Winkus

  • Storm
  • *****
  • Posts: 782
    • EW0095
    • KARHORSE2
    • WU for Horseshoe Bend, Arkansas
  • Station Details: Davis Wireless Vantage Pro 2, iMac 24"
Re: Custom Alert for Aux Temp
« Reply #3 on: January 25, 2014, 04:06:10 PM »
Would it be possible to make it have the option of an audible alert. Emails don't get the frequent attention required for monitoring temperature alarms.
Herb

elagache

  • Global Moderator
  • Storm
  • *****
  • Posts: 6494
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, Mac mini (2018), macOS 10.14.3, WeatherCat 3
AppleScript to the rescue! (Re: Custom Alert for Aux Temp)
« Reply #4 on: January 25, 2014, 10:18:32 PM »
Howdy Bull Winkus, Stu, gioman, and WeatherCat fans,

Would it be possible to make it have the option of an audible alert. Emails don't get the frequent attention required for monitoring temperature alarms.

Actually, this is perfect job of the tiniest of AppleScripts.  I've never used AppleScript to create speech before, but it couldn't be easier.  Open up the AppleScript Editor and type this in:

Code: [Select]
say "This is a test"
If you press the run button, your Mac will say: "This is a test"

If you want the system sound you can use a one word AppleScript:

Code: [Select]
beep
To play the sound of your own choice, that's a little harder.  There is an article here that describes how you can do that within AppleScript:

http://www.leancrew.com/all-this/2007/12/playing-sounds-in-applescript/

So go ahead!  Let you Mac make all the noise you want!!  [biggrin]

Cheers, Edouard  [cheers1]

Bull Winkus

  • Storm
  • *****
  • Posts: 782
    • EW0095
    • KARHORSE2
    • WU for Horseshoe Bend, Arkansas
  • Station Details: Davis Wireless Vantage Pro 2, iMac 24"
Re: Custom Alert for Aux Temp
« Reply #5 on: January 26, 2014, 06:29:40 AM »
I haven't done any, let me emphasize, ANY Applescript programming! But, I have poked around in the editor to see what it's all about, and it does look pretty easy. Someday when I'm bored and looking for a cheap thrill, I'll spend some time there and see if I can teach myself to teach this Mac a thing or two.

Thanks for the helpful advice!
Herb
Herb

WCDev

  • WeatherCat Developer
  • Administrator
  • Storm
  • *****
  • Posts: 2911
    • CW9739
    • ISCOTLAN25
    • Trixology
  • Station Details: Main Station: Vantage Pro-2, 24hr fars, solar, soil/leaf station, extra temp stations, no U.V. WeatherLink IP.
Re: Custom Alert for Aux Temp
« Reply #6 on: January 26, 2014, 11:52:42 AM »
Yep, Applescript is cool. You can monitor any variable in WeatherCat via it and create some extremely complex alerts/control stuff. Coupled with it's ability to run and stop scripts on startup and shutdown (typically a script to launch all your other scripts and another to stop them) they can be fully integrated.

Additionally, a script can be run from a custom alert, so playing a sound, flashing a light or something more complex is pretty easy.

There's a simple example in the manual which simply speaks the temperature whenever it changes (see the section 'How Do I Use AppleScript With WeatherCat'), or for something with a bit more meat, take a look at some of Edouard's excellent work.

Bull Winkus

  • Storm
  • *****
  • Posts: 782
    • EW0095
    • KARHORSE2
    • WU for Horseshoe Bend, Arkansas
  • Station Details: Davis Wireless Vantage Pro 2, iMac 24"
Re: Custom Alert for Aux Temp
« Reply #7 on: January 26, 2014, 04:25:58 PM »
Thanks Stu! Taken to heart. I do use some X-10 devices. Might be interesting to see if there is any potential for cross utilization there. One problem I'm going to have with it is that it is a separate iMac plugged into the X-10 controller. Another is, I just can't think of anything weather related that would help by turning on or off lights. House thermostat is a complicated 4x daily, 7 day setting beast on an all season heat pump. Nest product might be a serious improvement sometime in the future, but I don't think it takes commands from networked computers.

Right now, I'd just like to be able to set up audible heads up alerts to certain events, like:

"Hey Bubba, your home humidity just dropped below 30%. I'll bet the humidifier has run out of water."
or
"HEY! The garage temperature is at 32? F! Did you leave the door open?"
or
"Why is it so hot in here? It's 80? F! Did the propane heater forget to turn off at 73?"

Then I can get off my one and onto my two and get things right when it happens, instead of hours later when I accidentally discover it.  [banghead]

Best!
Herb
Herb

PrivatePilot

  • Gentle Breeze
  • **
  • Posts: 72
    • IONTARIO404
  • Station Details: WMR200 with pool sensor.
Re: Custom Alert for Aux Temp
« Reply #8 on: March 23, 2014, 10:31:45 PM »
I was just going to hit the forum to suggest exactly this, and low and behold, here it is.    Yes, I too would like to be able to use aux sensors with custom alerts.     I'm currently using a remote pool/spa feeding data to my WMR200 for my spa temperature and I want to be able to program a trigger to use that data to power on/off the tub via a Belkin Wemo.

Likewise, come this summer I want to be able to control a pump (again via a Wemo) for my pools solar system based on my UV sensor data.

I'm going to look into the applescript solution as a possible solution in the meantime.

elagache

  • Global Moderator
  • Storm
  • *****
  • Posts: 6494
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, Mac mini (2018), macOS 10.14.3, WeatherCat 3
AppleScript is your friend. (Re: Custom Alert for Aux Temp)
« Reply #9 on: March 24, 2014, 08:18:49 PM »
Dear PrivatePilot and WeatherCat scripters,

I was just going to hit the forum to suggest exactly this, and low and behold, here it is.    Yes, I too would like to be able to use aux sensors with custom alerts.     I'm currently using a remote pool/spa feeding data to my WMR200 for my spa temperature and I want to be able to program a trigger to use that data to power on/off the tub via a Belkin Wemo.

Likewise, come this summer I want to be able to control a pump (again via a Wemo) for my pools solar system based on my UV sensor data.

I'm going to look into the applescript solution as a possible solution in the meantime.

I just refreshed my memory and you have access to your auxiliary temperature sensors and UV data via AppleScript.  Probably the easiest way to do this is something similar to the way my AppleScripts work: running as dedicated programs that query WeatherCat once a minute and doing what is appropriate.  Feel free to download then and see how they "tick!"  [computer]

Cheers, Edouard  [cheers1]

PrivatePilot

  • Gentle Breeze
  • **
  • Posts: 72
    • IONTARIO404
  • Station Details: WMR200 with pool sensor.
Re: Custom Alert for Aux Temp
« Reply #10 on: April 18, 2014, 02:58:05 PM »
Stu, do you have any insight on when the abillty to control custom alerts with external sensors might become a reality?

I'm at a crossroads right now with a project I'm putting into place in a few weeks and need to decide which path I go down here.   I have a solar system on my pool which I controlled manually last year via a Wemo remote system (a WiFi switch controllable via my iPhone, for those who don't know what they are - Check them out on Google) and some internet accessible security cameras.  Basically, I'd keep an eye on the sun conditions on the cameras (I work some distance from home), and when I saw sun I'd flip on the pool pump via my iPhone through the WeMo controls.

It did the job, but it wasn't perfect.  It worked, but it left me constantly having to stop and pull up my cameras and manually control the pump..and if it suddenly got cloudy or started to rain I would sometimes find my solar panels had started to work in reverse and actually *cool* the pool.

I'd hoped this summer to automate things.  Two options - a $500 "solar pool controller" system with temperature sensors and such that would control the pump....  Or a $50 solution - I planned to buy a UV sensor for my WMR200 and allow WeatherCat to control the pool pump based on UV data - basically, if "UV rises above xx send a command to the WeMo pool pump switch to turn on" ... AKA, the sun came out and is shining on the solar panels so turn on the pump and utilize it!   On the flipside, if "UV drops below xx, turn the pump off".

I use my WeMo system through IFTTT so I have plenty of methods to actually cause the trigger - an email, a private tweet with a keyword, etc etc...I'm sure I could get it working with little fanfare IF WC allowed interaction with external sensors for custom alerts, which of course it doesn't right now.

I tinkered with some AppleScript options but just don't have the technical knowhow to make them work...so like I said, I'm at a crossroads.  If WC isn't going to support customer alerts for aux sensors in the next few weeks it looks like I'm buying the $500 solar control unfortunately.  ;)

WCDev

  • WeatherCat Developer
  • Administrator
  • Storm
  • *****
  • Posts: 2911
    • CW9739
    • ISCOTLAN25
    • Trixology
  • Station Details: Main Station: Vantage Pro-2, 24hr fars, solar, soil/leaf station, extra temp stations, no U.V. WeatherLink IP.
Re: Custom Alert for Aux Temp
« Reply #11 on: April 18, 2014, 06:11:36 PM »
I expect WeatherCat2 to be in public beta within a few weeks; it might be worth waiting to see if there's anything there that'll help you.


PrivatePilot

  • Gentle Breeze
  • **
  • Posts: 72
    • IONTARIO404
  • Station Details: WMR200 with pool sensor.
Re: Custom Alert for Aux Temp
« Reply #12 on: April 18, 2014, 07:03:45 PM »
Hmm.  I have to make a decision one way or the other by next Wednesday unfortunately as that's the required timeline to get either the UV sensor of the solar controller in time for my scheduled pool opening...and one or the other needs to be in place by then.

Hmmmmm.