Can't get CP image to show

Posted on
Sun Mar 01, 2015 1:13 pm
lochnesz offline
Posts: 370
Joined: Oct 01, 2014
Location: Stockholm, Sweden

Can't get CP image to show

I am trying to add a battery status icon (LED icon) to my control page. The device is a Oregon temp/hum sensor with data collected by rfxtrx. When I select the battery level for the device in CP, I can see that the value is 10 when it shows as text. However, when I try to show it as a colored LED image, it isn't showing anything at all on the rendered web page, but I can see the default icon in the CP editor. I am sure it is just some obvious mistake from my point, but at this time I can't figure it out. I have attached a few pictures showing the CP editor, the file names and the rendered web page. As a demonstration I have both the icon and text version on the pictures.

Any thoughts?
Attachments
rendered.jpg
rendered.jpg (76.61 KiB) Viewed 4147 times
files.jpg
files.jpg (15.79 KiB) Viewed 4147 times
CP.jpg
CP.jpg (84.09 KiB) Viewed 4147 times

Posted on
Sun Mar 01, 2015 1:18 pm
DaveL17 offline
User avatar
Posts: 6757
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Can't get CP image to show

Try this:

battdot_40+.png
battdot_40+10.png
battdot_40+20.png
battdot_40+30.png
...

You're very close.
Dave

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

[My Plugins] - [My Forums]

Posted on
Sun Mar 01, 2015 1:30 pm
lochnesz offline
Posts: 370
Joined: Oct 01, 2014
Location: Stockholm, Sweden

Re: Can't get CP image to show

Try this:

battdot_40+.png
battdot_40+10.png
battdot_40+20.png
battdot_40+30.png
...


I tried that with no luck. The battery value seams to be from 1 to 10 since my current batteries are almost new, and the device battery level reported is 10. That is why I used numbers up to 10.

I just saw this in the log:

01 Mar 2015 20:26:15
WebServer undefined page requested "http://192.168.87.12:8176/images/controls/devices/battdot_40+on.png" from 192.168.87.10
WebServer undefined page requested "http://192.168.87.12:8176/images/controls/devices/battdot_40+on.png" from 192.168.87.11


So it requests "+on" when the value is 10?

Posted on
Sun Mar 01, 2015 1:36 pm
lochnesz offline
Posts: 370
Joined: Oct 01, 2014
Location: Stockholm, Sweden

Re: Can't get CP image to show

Hm... +on shows the image, but doesn't give me the actual level. How can 10 equal to +on?

Posted on
Sun Mar 01, 2015 1:36 pm
DaveL17 offline
User avatar
Posts: 6757
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Can't get CP image to show

The logic goes by the device state.

So first, change 10 to 1, 20 to 2, etc. on the image filenames and see what you get.

If the actual value is 10, it won't be looking for "+on."

I can't remember, but Indigo may also have trouble with the underscore....

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

[My Plugins] - [My Forums]

Posted on
Sun Mar 01, 2015 1:42 pm
lochnesz offline
Posts: 370
Joined: Oct 01, 2014
Location: Stockholm, Sweden

Re: Can't get CP image to show

Changed to 1-10 and removed underscore, still not working and the log shows

WebServer undefined page requested "http://192.168.87.12:8176/images/controls/devices/battdot_40+on.png" from 192.168.87.11


The current value is 10, or that is at least what the rendered CP shows when I show it as a value.

Posted on
Sun Mar 01, 2015 1:45 pm
RogueProeliator offline
User avatar
Posts: 2501
Joined: Nov 13, 2012
Location: Baton Rouge, LA

Re: Can't get CP image to show

I tried that with no luck. The battery value seams to be from 1 to 10 since my current batteries are almost new, and the device battery level reported is 10. That is why I used numbers up to 10.

This apparently is not so much a battery level as a "status" -- I assumed the exact same thing but was correct by other users having gone through this before; see this thread for more information on it.

However, it should show okay with a +10, +1 and +0 values as the battery level... that is what I have on my control pages. Dave was on the right track, I believe... you need that "empty value" placeholder in there AND you have to select it on the control page. Make sure your control page image selection is battdot_40+.png and NOT battdot_40.png.

Posted on
Sun Mar 01, 2015 1:46 pm
DaveL17 offline
User avatar
Posts: 6757
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Can't get CP image to show

Try deleting the control and placing a new one. The webserver is still looking for an image with an underscore in it (as per the log error.)

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

[My Plugins] - [My Forums]

Posted on
Sun Mar 01, 2015 1:47 pm
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: Can't get CP image to show

lochnesz wrote:
[I tried that with no luck. The battery value seams to be from 1 to 10 since my current batteries are almost new, and the device battery level reported is 10. That is why I used numbers up to 10.

Are you sure you did the exact image names suggested? In particular, do you have a base file named:

battdot_40+.png

The + on the end of the base file tells Indigo to use the more advanced state value to filename heuristics.

Image

Posted on
Sun Mar 01, 2015 1:57 pm
lochnesz offline
Posts: 370
Joined: Oct 01, 2014
Location: Stockholm, Sweden

Re: Can't get CP image to show

As I mentioned in my first post, it is probably a obvious mistake, and it was...the + after the base file name (which I should have known). Now I got it to work, and I also learned that the Oregon battery status isn't what I thought it was.
Thanks for your help!
Attachments
rendered_2.jpg
rendered_2.jpg (55.27 KiB) Viewed 4101 times

Posted on
Sun Mar 01, 2015 2:04 pm
lochnesz offline
Posts: 370
Joined: Oct 01, 2014
Location: Stockholm, Sweden

Re: Can't get CP image to show

Confirmed that Oregon only has one bit to report battery status, so the two states are "battery good" and "battery low".
Attachments
oregon.jpg
oregon.jpg (165.89 KiB) Viewed 4099 times

Posted on
Sun Mar 01, 2015 2:05 pm
DaveL17 offline
User avatar
Posts: 6757
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Can't get CP image to show

Terrific. Love the graphic by the way!

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

[My Plugins] - [My Forums]

Posted on
Sun Mar 01, 2015 2:11 pm
lochnesz offline
Posts: 370
Joined: Oct 01, 2014
Location: Stockholm, Sweden

Re: Can't get CP image to show

Thanks! Inspired by Oregon as you can see, made in Illustrator. I Replaced "channel" with "signal", which works great updated each time the sensor sends data.
Attached 340x300 icon here.
Cheers!
Attachments
thermohygro_340x300.png
thermohygro_340x300.png (27.57 KiB) Viewed 4094 times

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 9 guests