Archived
1
0

added VoiceWeatherAlarm.xml and updated readme

This commit is contained in:
Nikki 2017-10-26 15:09:29 -04:00
parent 8eb1f3130a
commit a8ecfcef87
2 changed files with 122 additions and 0 deletions

View File

@ -30,6 +30,16 @@ and notifies **ONLY** if there will be rain today.
Don't forget to change `%WUnderKey` to your API key - get one from [here](http://www.wunderground.com/weather/api).
VoiceWeatherAlarm
-----------------
Runs upon stopping my morning alarm. It fetches today's weather prediction from Weather Underground
and speaks it to you aloud. Prediction includes current temperature, sky condition, humidity percentage, day temperature high, and day temperature low. Additional data can be added be reading the wunderground.com api documentation and editing the tasker details.
Don't forget to change `%WUnderKey` to *your* unique API key - get one from [here](http://www.wunderground.com/weather/api). Also, enter in your name and zip code. Detailed instructions can be found
[here](https://github.com/NA-Dev/VoiceWeatherAlarm-Tasker).
You may need to download a Tasker-compatible alarm app, e.g. [Gentle Alarm](https://play.google.com/store/apps/details?id=com.mobitobi.android.gentlealarm&hl=en). Alternatively, you could give the free [ClockTask](https://play.google.com/store/apps/details?id=com.balda.clocktask&hl=en) plugin a try along with your stock alarm app.
SayCaller
---------

112
VoiceWeatherAlarm.prf.xml Normal file
View File

@ -0,0 +1,112 @@
<TaskerData sr="" dvi="1" tv="5.0u6m">
<Profile sr="prof30" ve="2">
<cdate>1508549314954</cdate>
<edate>1509033475145</edate>
<id>30</id>
<mid0>37</mid0>
<nme>VoiceWeatherAlarm</nme>
<Event sr="con0" ve="2">
<code>446</code>
<Int sr="arg0" val="2"/>
<Str sr="arg1" ve="3"/>
<Str sr="arg2" ve="3"/>
<Str sr="arg3" ve="3"/>
<Int sr="arg4" val="0"/>
</Event>
</Profile>
<Task sr="task37">
<cdate>1386947273630</cdate>
<edate>1508770528125</edate>
<id>37</id>
<nme>AlarmWeather</nme>
<pri>100</pri>
<Action sr="act0" ve="7">
<code>547</code>
<Str sr="arg0" ve="3">%string</Str>
<Str sr="arg1" ve="3">Error, data not found.</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
</Action>
<Action sr="act1" ve="3">
<code>547</code>
<Str sr="arg0" ve="3">%WUnderKey</Str>
<Str sr="arg1" ve="3">###changeme###</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
</Action>
<Action sr="act2" ve="3">
<code>547</code>
<Str sr="arg0" ve="3">%Name</Str>
<Str sr="arg1" ve="3">###changeme###</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
</Action>
<Action sr="act3" ve="3">
<code>547</code>
<Str sr="arg0" ve="3">%Zip</Str>
<Str sr="arg1" ve="3">###changeme###</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
</Action>
<Action sr="act4" ve="7">
<code>118</code>
<Str sr="arg0" ve="3">api.wunderground.com</Str>
<Str sr="arg1" ve="3">api/%WUnderKey/conditions/forecast/q/%Zip.json</Str>
<Str sr="arg2" ve="3"/>
<Str sr="arg3" ve="3"/>
<Str sr="arg4" ve="3"/>
<Int sr="arg5" val="30"/>
<Str sr="arg6" ve="3"/>
<Str sr="arg7" ve="3"/>
<Int sr="arg8" val="0"/>
</Action>
<Action sr="act5" ve="7">
<code>129</code>
<se>false</se>
<Str sr="arg0" ve="3">var tmp = JSON.parse(global('HTTPD')).current_observation.temp_f;
var skies = JSON.parse(global('HTTPD')).current_observation.weather;
var high = JSON.parse(global('HTTPD')).forecast.simpleforecast.forecastday[0].high.fahrenheit;
var low = JSON.parse(global('HTTPD')).forecast.simpleforecast.forecastday[0].low.fahrenheit;
var humid = JSON.parse(global('HTTPD')).forecast.simpleforecast.forecastday[0].avehumidity;</Str>
<Str sr="arg1" ve="3"/>
<Int sr="arg2" val="1"/>
<Int sr="arg3" val="45"/>
</Action>
<Action sr="act6" ve="7">
<code>303</code>
<Int sr="arg0" val="5"/>
<Int sr="arg1" val="0"/>
<Int sr="arg2" val="0"/>
</Action>
<Action sr="act7" ve="7">
<code>548</code>
<on>false</on>
<Str sr="arg0" ve="3">%string</Str>
<Int sr="arg1" val="1"/>
</Action>
<Action sr="act8" ve="7">
<code>559</code>
<Str sr="arg0" ve="3">Good morning %Name. Wake up please. Let me tell you the weather. The current temperature is %tmp degrees. The skies are %skies with %humid percent humidity in the air. The high today will be %high degrees, and the low will be %low degrees.</Str>
<Str sr="arg1" ve="3">com.google.android.tts:eng-aus</Str>
<Int sr="arg2" val="4"/>
<Int sr="arg3" val="5"/>
<Int sr="arg4" val="5"/>
<Int sr="arg5" val="1"/>
<Int sr="arg6" val="0"/>
<Int sr="arg7" val="0"/>
</Action>
<Action sr="act9" ve="7">
<code>30</code>
<Int sr="arg0" val="0"/>
<Int sr="arg1" val="3"/>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
</Action>
</Task>
</TaskerData>