Page 2 of 2

Re: Image for Device State - where am I going wrong?

PostPosted: Thu Sep 08, 2016 3:40 pm
by DaveL17
From the image above, it looks like DSC.




Sent from my iPhone using Tapatalk

Re: Image for Device State - where am I going wrong?

PostPosted: Sun Jan 01, 2017 3:52 pm
by petematheson
Hi All,

Still having issues with control page images once again not reflecting what should be there. Wish this was fixed properly in a future indigo update!

So I have an image file that was too large.
So I resized the image in photoshop and re-saved.
I've restarted indigo - in fact I actually upgraded Indigo to 7.0.2 as it prompted when I restarted Indigo that it was out of date.
But even after this it's still showing me the larger image pre-re-saving it.

I know previously I can fix this by restarting my whole mac but that's a silly fix for a simple issue.
Any clues on how to fix this, without having to restart the whole mac please?

Re: Image for Device State - where am I going wrong?

PostPosted: Sun Jan 01, 2017 4:23 pm
by andarv
For me it's enough to stop and start the server if I remember it correctly. Have only done it a few times.
I don't think it's necessary to exit the program.

Re: Image for Device State - where am I going wrong?

PostPosted: Sun Jan 01, 2017 4:23 pm
by Colorado4Wheeler
Any chance you have a second browser that has NOT pulled up that page with the old image? I would be curious to know if a browser that has yet to see that page will pull up the new graphic or the old one. I've run into this problem a bazillion times and if it's too big of a deal I simply restart Indigo, never the entire computer.

That being said, MY solution to this (as I say, I've run into this A LOT) is that I just name the image something different and move on because it's far easier to say that "Open+.jpg is now called "OpenV2+.jpg" than it is go deal with image caching issues.

Re: Image for Device State - where am I going wrong?

PostPosted: Sun Jan 01, 2017 4:29 pm
by petematheson
Not a browser caching issue as other browsers show the same. Plus all the graphs I've started playing with all seem to update without issues strangely when I'm playing with styling then hit the redraw option.


Sent from my iPhone using Tapatalk

Re: Image for Device State - where am I going wrong?

PostPosted: Sun Jan 08, 2017 9:13 am
by johnpolasek
I'm having a somewhat different but related problem; I wanted my control page to display the same icons as the device list for my Z-wave thermostat; flame for heating snowflake for cooling, and wavy lines for fan only. My particular thermostat doesn't actually have a state that would reflect this, but with a little script, I was able to construct a variable that does:
Code: Select all
Thermostat = 1937338795
ThermostatState = 1065678355
dev = indigo.devices[Thermostat]
if (dev.states["hvacFanIsOn"] == False):
    indigo.variable.updateValue(ThermostatState, value="off")
else:
    if (dev.states["hvacHeaterIsOn"] == True):
        indigo.variable.updateValue(ThermostatState, value="Heating")
    else:
        if (dev.states["hvacCoolerIsOn"] == True):
            indigo.variable.updateValue(ThermostatState, value="Cooling")
        else:
            indigo.variable.updateValue(ThermostatState, value="Fan")


when called from a trigger.

The icons also already existed in the web server/images/controls/devices folder, although in different segments; I copied the images I was interested in (Thermostat Fan Status.png, Thermostat Cool Status+on.png, Thermostat Heat Status+on.png, Thermostat Fan Status+on.png) to the controls/variables folder and renamed them Thermostat Status.png, Thermostat Status+Cooling.png, Thermostat Status+Heating.png, and Thermostat Status+Fan.png. I have verified that the variable changes correctly on Heating, Fan, and off; Cooling may have to wait a few months. However, when I attempted to place this variable on the control page as image Thermostat Status.png, I got the default fan off image for off, and an error saying that Thermostat Status+true.png was not found for the Fan and Heating values.

Changing the Thermostat Status.png to Thermostat Status+.png had no effect.

Duplicating the Thermostat Status+Fan.png as Thermostat Status+true.png causes the page to display the Thermostat Status+.png for off and Thermostat Status+true.png for everything else.

So how do I tell the server that this variable is NOT a bool, but has custom states?

Re: Image for Device State - where am I going wrong?

PostPosted: Sun Jan 08, 2017 9:33 am
by DaveL17
If I understand your situation, I believe that your images should be named something like this:

Thermostat+.png
Thermostat+off.png
Thermostat+Cooling.png
Thermostat+Heating.png
Thermostat+Fan.png

Re: Image for Device State - where am I going wrong?

PostPosted: Sun Jan 08, 2017 10:04 am
by johnpolasek
DaveL17 wrote:
If I understand your situation, I believe that your images should be named something like this:

Thermostat+.png
Thermostat+off.png
Thermostat+Cooling.png
Thermostat+Heating.png
Thermostat+Fan.png


Which is what I had after changing the nonplused value I started with and which produced the "Thermostat Status+true.png not found" error message in the log for everything but off until I added the +true.png to the list... and then displayed the +true png for every value except the off one... setting up a test variable and displaying it shows that 0, false, or off gives the +off.png while anything else displays the +true.png icon. The server seems locked into a boolean mode, displaying the false value for anything that can be interpreted as false and the true png for everything not false. I also restarted the server to make sure there weren't cached values without effect.

Re: Image for Device State - where am I going wrong?

PostPosted: Sun Jan 08, 2017 10:06 am
by Colorado4Wheeler
johnpolasek wrote:
"Thermostat Status+true.png not found"


Is there an actual space in the name of that file and/or variable state?

Re: Image for Device State - where am I going wrong?

PostPosted: Sun Jan 08, 2017 10:11 am
by johnpolasek
Colorado4Wheeler wrote:
johnpolasek wrote:
"Thermostat Status+true.png not found"


Is there an actual space in the name of that file and/or variable state?


There was a space, but I changed it to "Thermostat_Status+..." for all items without effect.

Re: Image for Device State - where am I going wrong?

PostPosted: Mon Jan 09, 2017 2:03 pm
by matt (support)
After you added the + character to the base name (which is needed), did you then re-select that image in the Control Page editor? Try selecting a different (unrelated) image, stop the Indigo Server and quit the client, relaunch everything, then select the base image that has the + character.

Re: Image for Device State - where am I going wrong?

PostPosted: Mon Jan 09, 2017 2:14 pm
by johnpolasek
Should I leave the +true.png item in or remove it whicl everything is deselected?

Re: Image for Device State - where am I going wrong?

PostPosted: Mon Jan 09, 2017 2:40 pm
by matt (support)
You shouldn't need it, but keeping it shouldn't effect how it works. The only things that matters is that the base name has the +, which is what signals to Indigo to use the more complex state to file name lookup technique.

Re: Image for Device State - where am I going wrong?

PostPosted: Tue Jan 10, 2017 6:33 am
by johnpolasek
Thanks; that works. I guess something got cached somewhere along the way.