I have been using Jon00's plugins for quite a long time and am so grateful as many plugins are specific to the U.S. and don't work here in the UK .... so firstly thanks for all your hard work.
Having recently bought a copy of HS Touch, I discovered that the weather template doesn't work, as it requires a U.S. zip code and won't work with UK postcodes.
I had been using Jon00's BBC weather script for a long time (latest version) so decided to try and map the status's of Jon00's devices to my HS Touch interface. The problem I found was that many of the forecast elements have been concatenated / joined to read as a sentence in the status field. I wanted the discrete values to show in HS Touch. I am not that experienced in advanced programming functions within HS, but managed to figure out that the discrete values are stored in the Jon00BBCWeather.ini file. So all I needed to do was read the value from the ini file and store it as a virtual device to map into HS Touch. I searched as much as I could to try and find out how to do it and read the help file. The help file shows you how to access data in the default "settings.ini" file, but when I do my best to retrieve data from the Jon00BBCWeather.ini file, it comes back with blank values. The HS help file doesnt give an example of how to code for a different ini file ... only that you can do it. I decided to test it in two steps .. firstly get it to just show a popup box with the value, then if I managed that - to write the value to a new virtual device status. Needless to say I cant get past stage 1 LOL. If anyone can help with either steps I would be so grateful.
The following script was what I tried just to retrieve a simple value to test. Although the script below shows the full file extension, I have tried it with just the file name, with the filename and .ini extension and also with and without "" either side of the file.
sub main()
dim Value
Value = hs.GetINIsetting("Settings","LocationCode","","C:\Program Files\HomeSeer HS2\Config\Jon00Weather.ini")
msgbox Value
end sub
All I get is the blank value - infering that it can't find a matching entry.
Many many thanks,
Jay
Having recently bought a copy of HS Touch, I discovered that the weather template doesn't work, as it requires a U.S. zip code and won't work with UK postcodes.
I had been using Jon00's BBC weather script for a long time (latest version) so decided to try and map the status's of Jon00's devices to my HS Touch interface. The problem I found was that many of the forecast elements have been concatenated / joined to read as a sentence in the status field. I wanted the discrete values to show in HS Touch. I am not that experienced in advanced programming functions within HS, but managed to figure out that the discrete values are stored in the Jon00BBCWeather.ini file. So all I needed to do was read the value from the ini file and store it as a virtual device to map into HS Touch. I searched as much as I could to try and find out how to do it and read the help file. The help file shows you how to access data in the default "settings.ini" file, but when I do my best to retrieve data from the Jon00BBCWeather.ini file, it comes back with blank values. The HS help file doesnt give an example of how to code for a different ini file ... only that you can do it. I decided to test it in two steps .. firstly get it to just show a popup box with the value, then if I managed that - to write the value to a new virtual device status. Needless to say I cant get past stage 1 LOL. If anyone can help with either steps I would be so grateful.
The following script was what I tried just to retrieve a simple value to test. Although the script below shows the full file extension, I have tried it with just the file name, with the filename and .ini extension and also with and without "" either side of the file.
sub main()
dim Value
Value = hs.GetINIsetting("Settings","LocationCode","","C:\Program Files\HomeSeer HS2\Config\Jon00Weather.ini")
msgbox Value
end sub
All I get is the blank value - infering that it can't find a matching entry.
Many many thanks,
Jay
Comment