Image for Device State - where am I going wrong?

Posted on
Thu Sep 08, 2016 3:40 pm
DaveL17 offline
User avatar
Posts: 6742
Joined: Aug 20, 2013
Location: Chicago, IL, USA

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

From the image above, it looks like DSC.




Sent from my iPhone using Tapatalk

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Sun Jan 01, 2017 3:52 pm
petematheson offline
Posts: 847
Joined: Sep 14, 2014
Location: Southampton, UK

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

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?

Posted on
Sun Jan 01, 2017 4:23 pm
andarv offline
Posts: 126
Joined: Jun 28, 2015
Location: Stockholm, Sweden

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

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.

Posted on
Sun Jan 01, 2017 4:23 pm
Colorado4Wheeler offline
User avatar
Posts: 2794
Joined: Jul 20, 2009
Location: Colorado

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

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.

My Modest Contributions to Indigo:

HomeKit Bridge | Device Extensions | Security Manager | LCD Creator | Room-O-Matic | Smart Dimmer | Scene Toggle | Powermiser | Homebridge Buddy

Check Them Out Here

Posted on
Sun Jan 01, 2017 4:29 pm
petematheson offline
Posts: 847
Joined: Sep 14, 2014
Location: Southampton, UK

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

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

Posted on
Sun Jan 08, 2017 9:13 am
johnpolasek offline
Posts: 911
Joined: Aug 05, 2011
Location: Aggieland, Texas

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

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?

Posted on
Sun Jan 08, 2017 9:33 am
DaveL17 offline
User avatar
Posts: 6742
Joined: Aug 20, 2013
Location: Chicago, IL, USA

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

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

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Sun Jan 08, 2017 10:04 am
johnpolasek offline
Posts: 911
Joined: Aug 05, 2011
Location: Aggieland, Texas

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

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.

Posted on
Sun Jan 08, 2017 10:06 am
Colorado4Wheeler offline
User avatar
Posts: 2794
Joined: Jul 20, 2009
Location: Colorado

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

johnpolasek wrote:
"Thermostat Status+true.png not found"


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

My Modest Contributions to Indigo:

HomeKit Bridge | Device Extensions | Security Manager | LCD Creator | Room-O-Matic | Smart Dimmer | Scene Toggle | Powermiser | Homebridge Buddy

Check Them Out Here

Posted on
Sun Jan 08, 2017 10:11 am
johnpolasek offline
Posts: 911
Joined: Aug 05, 2011
Location: Aggieland, Texas

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

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.

Posted on
Mon Jan 09, 2017 2:03 pm
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

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

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.

Image

Posted on
Mon Jan 09, 2017 2:14 pm
johnpolasek offline
Posts: 911
Joined: Aug 05, 2011
Location: Aggieland, Texas

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

Should I leave the +true.png item in or remove it whicl everything is deselected?

Posted on
Mon Jan 09, 2017 2:40 pm
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

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

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.

Image

Posted on
Tue Jan 10, 2017 6:33 am
johnpolasek offline
Posts: 911
Joined: Aug 05, 2011
Location: Aggieland, Texas

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

Thanks; that works. I guess something got cached somewhere along the way.

Who is online

Users browsing this forum: No registered users and 3 guests

cron