Cynical Weather

Posted on
Mon Sep 18, 2017 10:06 pm
agame offline
Posts: 197
Joined: Jul 13, 2017
Location: Melbourne, Australia

Re: Cynical Weather

A really useful plugin. Helps tremendously with automating window shades and some automated ventilation windows.

Its been a while since the last post...but will throw in another use case for having precipitation accessible more easily:

'if rain is probable, close (or don't open) the ventilation window'. [which will cool the house, but let in water if it rains]

Appreciate the best solution is probably I add a local rain sensor. I assume a rain gauge (thats for measuring total rainfall) isn't going to be quick enough to register the commencement of a shower before I get half a mm of rain in the window [??].... I see sensors like those on car windscreens are around...I'm casting around for something less costly than the Fakro sensor.

Posted on
Thu Sep 21, 2017 8:58 am
Perry The Cynic offline
Posts: 753
Joined: Apr 07, 2008

Re: Cynical Weather

agame wrote:
A really useful plugin. Helps tremendously with automating window shades and some automated ventilation windows.

Its been a while since the last post...but will throw in another use case for having precipitation accessible more easily:

'if rain is probable, close (or don't open) the ventilation window'. [which will cool the house, but let in water if it rains]

Appreciate the best solution is probably I add a local rain sensor. I assume a rain gauge (thats for measuring total rainfall) isn't going to be quick enough to register the commencement of a shower before I get half a mm of rain in the window [??].... I see sensors like those on car windscreens are around...I'm casting around for something less costly than the Fakro sensor.

This has been on my list for years. There are two main reasons why I haven't done it yet:
  • The way rain probabilities are represented in the forecasts makes it tricky to calculate an actual cumulative probability. The rain-probability numbers are by necessity "loose" enough that just alerting on anything >0 would be annoying overkill.
  • I live in an area where rain basically happens about 2-3 weeks per year, and when it does everyone makes a big deal out of it. :-)
I have a weather station, and yes, its rain sensor is sensitive but somewhat laggy - it's designed to be accurate, not fast.

You may want to check whether your window actuator comes with an optional rain sensor. Those are designed to close at the first sniff of water, which is what you want.

Cheers
-- perry

Posted on
Thu Sep 21, 2017 5:52 pm
agame offline
Posts: 197
Joined: Jul 13, 2017
Location: Melbourne, Australia

Re: Cynical Weather

makes sense.

I live in a city renowned for having '4 seasons in one day'. Google tells me 139 rain days a year, so its more of a consideration for me!

I've got a Netatmo weather station, so I think I'll add the rain gauge a try and see just how bad the lag is.

Wind is the other factor, of course, in determining how much water comes inside. I might play with wind direction/strength in my window-opening decision tree.

Posted on
Sun Jul 08, 2018 11:00 am
Berts offline
Posts: 4
Joined: May 20, 2013

Re: Cynical Weather

I have a question on a slightly different topic of Cynical Weather.

Instead of updating the states by using the device to auto-update, I would like to write in my python script a couple of statements that that's care of retrieving the data before processing it.

I can't make that work yet.

Could someone who made this work already tell what python script execute plugin-defined actions he used?

For sure it includes executeAction(actionId, deviceId, props) and the action is I guess “Update Data”, but now the details around it to make it work.

Thanks in advance.

Posted on
Sun Jul 08, 2018 2:10 pm
Perry The Cynic offline
Posts: 753
Joined: Apr 07, 2008

Re: Cynical Weather

First off, my recommendation for this particular case is not to do explicit updates. The default behavior of a Cynical Weather device is to auto-update every 5 minutes. The weather doesn't change that fast. Also, the plugin has a hard limiter that ignores update requests less than 5 minutes after the last update. So unless you're intentionally slowing down or turning off automatic updates, this isn't going to help. (There's also a limit to how many requests Dark Sky honors each day.)

Having said all that, let me walk you through the process. First off, you need to know what action you want to call. Look it up in the plugin's documentation (click on one of those question-mark buttons in the plugin's UI). That'll tell you that there is, indeed, an action called Update Data that does what you want. Now you have the option to do this the Indigo way: create an action group that first invokes the Update Data action and then calls a Python script action containing your code. That requires no fancy Python tap-dancing, and I generally recommend that.

If you really want to call the action from Python code, here's the rough outline of how to go about it. You need to open up the plugin's bundle and rummage through its xml files. You need the internal name of the plugin (found in its Info.plist, in this case org.cynic.indigo.weather), and the internal name of the action (found in the Actions.xml file, in this case poll). Here you will also find a description of the action's arguments, but this one has none.

Now you can put it all together:

Code: Select all
plugin = indigo.server.getPlugin("org.cynic.indigo.weather")
deviceid = (the id for the weather device, from Indigo's device list)
arguments = {}     # arguments to the action -- this one has none
plugin.executeAction("poll", deviceid, arguments)
And there you are. :-)

Cheers
-- perry

Posted on
Mon Jul 09, 2018 1:11 pm
Berts offline
Posts: 4
Joined: May 20, 2013

Re: Cynical Weather

Thx Perry !!

Works perfect and I can fetch it now ad hoc.

Who is online

Users browsing this forum: No registered users and 1 guest