Hi,
I have created a simple python script that updates an Indigo variable (var_weather_state) and loads it with a string value ('cloudy','sunny', etc). The script is working well and the variable is updated on the hour using a scheduled action.
I have created a control page and added a Variable Value, assigned it to the 'var_weather_state' variable and created a set of basic weather images ('weather.png', 'weather+cloudy.png','weather+sunny.png',etc) placing them in the correct directory. The base image shows correctly in the control page editor.
When running the control page from a browser the image is not loaded. Reviewing the action log, an error is generated saying that the Indigo web server cannot find the file 'weather+true.png'. This suggests that there is an error in the heuristics or variable type?
Has any one seen this behaviour and have advice on how to resolve correctly?
Thanks,
Jeremy.
------
Footnote: Being a developer, I have investigated the underlying web server python scripts. The issue appears to be that the app is calling call 'GetImagePathSimple()' in the indigoutil.py script. The function inspects the variable, determines that it is not a false value (!='no', 'off', '0', etc) and then assigns '+true' as you would expect a boolean to behave.
After taking a copy of the original script, I updated 'GetImagePathSimple()' to have the same functionality as 'GetImagePathWithResolver()' - and the filename was correctly resolved and the image displayed in the browser as expected.
However, whilst I could happily live with the updated function, this script change does not work with the 'Control Pages' function from the iPhone app, and therefore the true cause of the problem really needs some more consideration - that being why the variable type is not identified correctly and thereby the incorrect function is used to resolve the heuristics.