Please login or register.

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

Author Topic: 🌪️Weather Alerter for HG  (Read 5857 times)

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 282
  • Posts: 10497
  • I don't work for X10, I use it successfuly!
🌪️Weather Alerter for HG
« on: March 27, 2019, 09:49:51 AM »

*** Currently  Weather Alerter is still functioning in HG beta 15 32 bit however the custom wiget is not. You need to change this to used the HG status update widget net core version seems to need extra work. Reply #20 has a working weatherAlerter compatible with the netcore build 1.4.0-beta.15 ***
I use wind and temperature triggers a lot! (both greater then and less then values)
I know many have or would like rain or lack of triggered events scheduled too.
These options are now available for each module in HG for less then and greater then values for wind, rain and temperature, using the newly added OpenWeatherMap program Gene added to HG.
However I'm wondering if other weather events should also be included, like presure and humidity ???
I'm thinking turning the module on when greater or less then value is reached and back off when the value nolonger applies or maybe off after selected time in seconds.
Currently users can do this with a script but this will simplify things if do able and not over taxing the RPi CPU.
I'll post the HG app/program here once I have something usable. ;)
However I would like to read users ideas  on this.

To install:
Remove the txt extention from the WeatherAlerter file and install in the weather and environment programs section
remove the txt extention from the tuicemen_tools_info file then install in the widget section (don't unzip prior)
 >!
« Last Edit: January 17, 2023, 06:59:06 PM by Tuicemen »
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

LostDog88

  • Hero Member
  • *****
  • Helpful Post Rating: 2
  • Posts: 171
Re: 🌪️Weather Alerter for HG
« Reply #1 on: March 27, 2019, 10:50:53 AM »

Triggers for humidity would rock.

Fans under my house to keep it dry during humid months? Yes! Sign me up! LOL.

Air Dryers in my RV's that pop on when it is raining? Oh yah!

Home Automation. Love it! More than just turning off lights with a remote! LOL
« Last Edit: March 31, 2019, 11:35:44 PM by Tuicemen »
Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 282
  • Posts: 10497
  • I don't work for X10, I use it successfuly!
🌪️Weather Alerter for HG
« Reply #2 on: March 27, 2019, 11:11:25 AM »

I had thought there was a humidity value in the OPenWeatherMap but currently that is lacking.
I've requested that enhancement which would allow me to add humidity.
I think I can create a sever weather warning based off rapid pressure changes too so once I have the basics down I'll look into playing with that.
 >!
« Last Edit: March 31, 2019, 11:33:14 PM by Tuicemen »
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

bkenobi

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 24
  • Posts: 2081
RE:🌪️Weather Alerter for HG
« Reply #3 on: March 27, 2019, 04:43:42 PM »

Remember to include a hysteresis in your code.  If you don't you will create a constantly toggling module when the temp (or whatever) hovers at the trigger point.
« Last Edit: March 31, 2019, 11:35:26 PM by Tuicemen »
Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 282
  • Posts: 10497
  • I don't work for X10, I use it successfuly!
🌪️Weather Alerter for HG
« Reply #4 on: March 28, 2019, 04:04:32 PM »

Ya I had thought of that but no where near coding triggering yet.
Thanks for the tip!

I decided I wanted a widget to display Alert info for this.
Exactly what info it will finally display remains to be seen. I wasn't exactly sure if creating the display would stop options from being selectible in other widget devices but I discovered it doesn't. :)%
I also managed to add code to the OpenWeatherMap program to fetch the Humidity. Since OpenWeatherMap currently Doesn't display Humidity or a Barometer I tested these in the Weather Alert widget with success! :)%
« Last Edit: April 13, 2019, 03:55:11 PM by Tuicemen »
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 282
  • Posts: 10497
  • I don't work for X10, I use it successfuly!
🌪️Weather Alerter for HG
« Reply #5 on: March 31, 2019, 08:26:34 AM »

I've got the widget scrolling through Wind, Rain, Humidity, Temperature and Barometer values  and updating the correct values as well as displaying a Icon and info. I setup the Barometer to display what the values indicate Dry, Very Dry, Rain, Stormy and Changing as well as the trend but that may take some time to debug. :(
I'll start coding module triggering in a day or two. ;)

Barometer trend I do have working though not as well as I would like so I may remove that part.
It does display updated status of all weather sensors available with the OpenWeatherMap if it is active.
Note: snow/rain conditions only display if conditions are right for it (temperature)
I started  coding for the condition module triggering and do have code added and working for temperature and wind values :)%
Humidity is next on my list followed by rain and snow.


« Last Edit: April 13, 2019, 03:56:11 PM by Tuicemen »
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 282
  • Posts: 10497
  • I don't work for X10, I use it successfuly!
🌪️Weather Alerter for HG
« Reply #6 on: March 31, 2019, 10:34:56 PM »

UpDate: code is 90-95% done (is it ever realy done) ::) :' So I'm ready to get some user input with some ideas for extra options.
Currently any Sensor,Switch,Light,Dimmer,Siren can be triggered  ON or OFF by Temperature,Wind,Rain,Snow,Presure, or Humidity values that are >or< the set value. These options show up in the module settings under "Weather Alerter"
The widget displays Temperature, Wind, Rain, Snow, Presure, Conditions, & Humidity values & alerts. Of coarse you don't need to display the widget to use the weather triggers but it must be activated.

The OpenWeatherMap Program is required to pull the values, this was included in HG 1.2-stable.39 but required a patch  to display correctly. ver1.3-beta.2 fixed those issues. However humidity and imperial values are not yet included in the OpenWeatherMap HG program included in HG. I do have a patched OpenweatherMap program to allow humidity and fixes the display issues in version1.2-stable.39
For the 3 users that think they can use this, and if you wish to test run it, please PM or email me and I'll get you setup. >!
« Last Edit: April 15, 2019, 09:50:07 AM by Tuicemen »
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 282
  • Posts: 10497
  • I don't work for X10, I use it successfuly!
Re: 🌪️Weather Alerter for HG
« Reply #7 on: April 02, 2019, 07:02:15 PM »

With the increase in sever storm events and that season already upon us I would have thought there would have been a bit more interest in an app like this. ::) :' True your relying on the cloud using this widget but it can be easily converted to work with a weather station. I would have done or included it this way only my weather station bit the dust. :(
The OpenWeatherMap App pull interval is set at a default of every 30 mins  :o this is ridiculously long to be of any real value as a warning system. However with a little modification you can have this check every min. Much better but OpenWeatherMap.org only updates the data about every 5 mins :(   
Still a five min warning may be enough and is certainly better then nothing.

Testing all the possible weather conditions and triggers can take a long time for one person and since my location is relatively calm right now it will be a month or more before I'll feel comfortable posting the app. :(
 I added a wind direction indicator to the display today while playing with update intervals as this is now more a program then a simple script. ::) :'
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

LostDog88

  • Hero Member
  • *****
  • Helpful Post Rating: 2
  • Posts: 171
Re: 🌪️Weather Alerter for HG
« Reply #8 on: April 03, 2019, 09:21:51 AM »

I have been watching this thread (I am usually a lurker anyways unless I can't figure it out myself). Sadly I have not had the time to test any of your upgrades. Maybe this weekend?

Had to rebuild chicken coops, boat carbs, garage door broke, camera installs, work life. Etc.

Thanks for what you do though, it is appreciated.
Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 282
  • Posts: 10497
  • I don't work for X10, I use it successfuly!
Re: 🌪️Weather Alerter for HG
« Reply #9 on: April 12, 2019, 10:04:17 PM »

I decided it would be better if all info is displayed at once instead of cycling threw the info.
this meant I needed to try my hand at creating a new widget.
I had started to do this for the HG tools and figured a simular widget could be created for the Weather Alerter.
here's what I got so far:
« Last Edit: April 13, 2019, 03:09:54 PM by Tuicemen »
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 282
  • Posts: 10497
  • I don't work for X10, I use it successfuly!
🌪️Sever Weather Alerts
« Reply #10 on: April 13, 2019, 06:01:53 PM »

I've started to play with adding a Custom Sever Weather Alert. This will be triggered if both Wind speed rises above users inputted value as well as the Barometer falling below the users inputted value.
This will be independent of triggering devices.
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

bkenobi

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 24
  • Posts: 2081
Re: 🌪️Weather Alerter for HG
« Reply #11 on: April 15, 2019, 12:31:07 AM »

It's fun creating your own code, but I'm curious if it wouldn't be easier to just add humidity etc to the existing weather apps/widgets?  You can create another app for the severe weather triggers, but since the source of your data appears to be the same as the default widgets expanding existing code makes sense.

Another thing to keep in mind I'd localization of the data.  If you are trying to use a weather app that isn't local enough, you may trigger or miss triggers.  I have been planning on similar types of triggers for years, but mine will be based on my PWS sensors rather than open source.  I want to make sure that I am looking at the exact data rather than what someone else (another user's PWS) is providing without knowing how they came up with it.

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 282
  • Posts: 10497
  • I don't work for X10, I use it successfuly!
Re: 🌪️Weather Alerter for HG
« Reply #12 on: April 15, 2019, 02:23:17 AM »

This could have been made to read a csv file which is what many PWS softwares create and what my weather watch program used. Heck it still could if one wished to modify it.
Modifiying a program which is included in HG (hard coded) usually gets overwritten on an Update that's why I only added things like humidity to OpenWeatherMap. HG is designed to use it, so it is conceivable the next update will include the missing values.
This little project was/is designed for users with out a PWS and uses information HG gathers from OpenWeatherMap which replaces Weather Underground.
OpenWeaterMap can be used with a PSW so it may be possible to link your PSW that way, I've not looked into that option. However using ones PSW info directly instead would be a much faster and more reliable way of getting readings.
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

bkenobi

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 24
  • Posts: 2081
Re: 🌪️Weather Alerter for HG
« Reply #13 on: April 15, 2019, 11:17:39 AM »

If you export the app and then import it, it won't be linked to the built-in app.  As a result, you can modify things all you want and it won't be overwritten.

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 282
  • Posts: 10497
  • I don't work for X10, I use it successfuly!
Re: 🌪️Weather Alerter for HG
« Reply #14 on: April 15, 2019, 12:09:47 PM »

If you export the app and then import it, it won't be linked to the built-in app.  As a result, you can modify things all you want and it won't be overwritten.
True, I did that for a few things including OpenWeatherMap, and the Philips Hue.

There were a few reasons for creating the viewable widget, all personal.
1: to compare values and to be sure things (triggering & alerts) actually worked during coding.
2: to learn more how widgets and devices interact in HG.
3: to learn about building a new widget or modifying an existing one.(OpenWeatherMap widget I felt was to big of a task for me to bite off right now)
4: Finally I enjoy testing new updates and reporting issues it is what keeps a project moving forward. If I'm running a customized widget I get confused  as to what is working or not. rofl

The Weather Alerter app doesn't need to be displaying in order for the weather device triggering or SeverWeather E-mail Alert to work, it is just a bonus which some may enjoy.

I suppose if you got right down to it if I were to just modify an existing app I wouldn't need to make a separate sever weather alert app as it could be included in the modified app. ::)
Taking on this project helped me learn a lot about the inner workings of HG which I've only been running for slightly over a year.


Logged
Please Read Topic:
General Forum Etiquette
Before you post!
Pages: [1] 2
 

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