Hi all, i am trying to use the yahoo weather script. have changed the CWZipCode to EIXX0006 and CWUnits to c on the device property page.
when the script is run i get the Error unable to find device with the description [] and no properties update.
What have i missed?
Thanks Mark....
Weather script
Re: Weather script
Hmm...let me take a look at this.
Osler
Osler
Re: Weather script
For some reason it isn't happy with the name you've given the device. It shouldn't matter based upon how I coded it...but apparently it does. For now, change the device name back to CurrentWeather and then restart HouseBot and it will work. I will have to look at the code a bit more closely to see if I can't tease out the detail I appear to have missed.
Osler
Osler
Re: Weather script
Found the issue. Use the attached script and the device name will not matter. There was still a reference to the device name in the script (from when HB required this) for pulling the zip code and unit format. Put this in C:\Program Files\HouseBot\Config\Scripts.
Sorry for the inconvenience.
Osler
Sorry for the inconvenience.
Osler
- Attachments
-
- YahooWeather.zip
- (1.86 KiB) Downloaded 389 times
Re: Weather script
the device is named CurrentWeather and i have tried the new script same error.
p.s no need for apologies. i am the one making use of your hard work
Mark...
p.s no need for apologies. i am the one making use of your hard work
Mark...
Re: Weather script
So you:
1) Imported the .hbx file
2) verified that you have a CurrentWeather Script Device populated with the appropriate properties
3) point the device to the correct script
4) change the device state to run
Despite all of this you are getting the error?
After the changes I made to the script I can't reproduce the error here anymore, no matter if I change the device name, zip code, or unit type in between script runs.
Can you do me a favor and delete the script device that was imported and build one from scratch. All of the correct properties should have been populated in HB already? It is just a matter of creating a script device and adding all of the CW properties to it.
Osler
1) Imported the .hbx file
2) verified that you have a CurrentWeather Script Device populated with the appropriate properties
3) point the device to the correct script
4) change the device state to run
Despite all of this you are getting the error?
After the changes I made to the script I can't reproduce the error here anymore, no matter if I change the device name, zip code, or unit type in between script runs.
Can you do me a favor and delete the script device that was imported and build one from scratch. All of the correct properties should have been populated in HB already? It is just a matter of creating a script device and adding all of the CW properties to it.
Osler
Re: Weather script
Its official housebot hates me.
Created from scratch and added all the elements. pointed to the script. filled in the zip code (yahoo code for Castlebar) and the units (c)
ran the script same error.
on the off chance is it the fact that the zip code is in fact not a zip code (we dont have them in ireland) and it is flipping yahoo out.
i use the code from http://uk.weather.yahoo.com/EIXX/EIXX0006/index_c.html
wish i knew how to write script.....
Created from scratch and added all the elements. pointed to the script. filled in the zip code (yahoo code for Castlebar) and the units (c)
ran the script same error.
on the off chance is it the fact that the zip code is in fact not a zip code (we dont have them in ireland) and it is flipping yahoo out.
i use the code from http://uk.weather.yahoo.com/EIXX/EIXX0006/index_c.html
wish i knew how to write script.....
Re: Weather script
No, it's not your zip. I was able to pull your weather data just fine from my machine.
Let's try this version. In this version, all calls to HB explicitly state the device and the property (the other script left it up to HB to figure out that the device was the one running the script).
Make sure the device is called CurrentWeather and point it to this script.
What version of HB are you running?
Osler
Let's try this version. In this version, all calls to HB explicitly state the device and the property (the other script left it up to HB to figure out that the device was the one running the script).
Make sure the device is called CurrentWeather and point it to this script.
What version of HB are you running?
Osler
- Attachments
-
- YahooWeather_Revised.zip
- (1.88 KiB) Downloaded 375 times
Re: Weather script
Well housebot may still hate me but it loves osler.
That worked no problem.
Many Thanks.
in case it matters i am running 3.2
back to the tweaking...
That worked no problem.
Many Thanks.
in case it matters i am running 3.2
back to the tweaking...
Re: Weather script
I would call this to Scott's attention. With your version of HB you shouldn't have to explicitly state the device when getting and setting property values from within the script if it is only referencing properties contained within that script device.
Osler
Osler