| Author |
Message |
|
hwitten
Joined: Dec 26, 2007 Posts: 486 Location: British Columbia
|
 How can I change device or variable images on the fly
Apologies in advance if posted in wrong spot.
I currently use a program done in Real Basic to display Indigo values. I could do same using a control page except for some colour coding I use.
I change the background for UV Values I get from Davies weather station to represent the UV colour chart. Since control pages are basically on/off I'm stuck, or am I missing something?
I need 4 different colours to display based on value of UV variable.
|
| Sun Jun 10, 2012 5:49 pm |
|
 |
|
jay (support)
Site Admin
Joined: Mar 19, 2008 Posts: 6667 Location: Austin, Texas
|
 Re: How can I change device or variable images on the fly
The Custom Images wiki article describes how to do it.
_________________ Jay (Indigo Support)
|
| Mon Jun 11, 2012 8:32 am |
|
 |
|
hwitten
Joined: Dec 26, 2007 Posts: 486 Location: British Columbia
|
 Re: How can I change device or variable images on the fly
Just what the doctor ordered Jay. Thank you very much.
|
| Mon Jun 11, 2012 8:43 am |
|
 |
|
hwitten
Joined: Dec 26, 2007 Posts: 486 Location: British Columbia
|
 Re: How can I change device or variable images on the fly
One additional wrinkle... largest font seems to be 58. Can I add larger?
FOUND IT! Found an old link to try.
|
| Mon Jun 11, 2012 8:51 am |
|
 |
|
jay (support)
Site Admin
Joined: Mar 19, 2008 Posts: 6667 Location: Austin, Texas
|
 Re: How can I change device or variable images on the fly
Just type in the point size into the combo box rather than selecting a size from the menu.
_________________ Jay (Indigo Support)
|
| Mon Jun 11, 2012 9:15 am |
|
 |
|
hwitten
Joined: Dec 26, 2007 Posts: 486 Location: British Columbia
|
 Re: How can I change device or variable images on the fly
DUH, do I feel stupid to not have tried that.
Thank you.
|
| Mon Jun 11, 2012 9:24 am |
|
 |
|
hwitten
Joined: Dec 26, 2007 Posts: 486 Location: British Columbia
|
 Re: How can I change device or variable images on the fly
Had a look at the Custom Images Wiki article.
My UV values include a decimal so not so straight forward for me. I looked at the source mentioned in the article but kinda' chicken to attempt that.
I'm hoping that perhaps someone has already hacked indigoutil.py to accommodate decimal values and is able to share. I realize extra care needs to be taken, I.e. copies on updates, etc.
An alternative solution would be to turn the decimal into an integer? I'm getting the WD values via the Weather Display plug-in.
If I have to get brave later on and tackle the hack myself I would try and simply use the whole portion of the value but since I'm totally green when it comes to python, any suggestions/help greatly appreciated.
Aside from this little wrinkle, by migration to using a control page vs dedicated prog is coming along nicely.
|
| Tue Jun 12, 2012 9:12 am |
|
 |
|
jay (support)
Site Admin
Joined: Mar 19, 2008 Posts: 6667 Location: Austin, Texas
|
 Re: How can I change device or variable images on the fly
Weather Display plugin? Didn't know there was one. Point me to it and I can probably cook up a script that would insert the integer value into a variable.
_________________ Jay (Indigo Support)
|
| Tue Jun 12, 2012 9:27 am |
|
 |
|
hwitten
Joined: Dec 26, 2007 Posts: 486 Location: British Columbia
|
 Re: How can I change device or variable images on the fly
|
| Tue Jun 12, 2012 9:53 am |
|
 |
|
jay (support)
Site Admin
Joined: Mar 19, 2008 Posts: 6667 Location: Austin, Texas
|
 Re: How can I change device or variable images on the fly
Oh - it's not an Indigo 5 Server plugin but an IWS plugin. You just need a trigger that watches for the variable holding the float value to change and have an action that puts the integer version into a different variable. Something like this should work (python script): sourceVar = indigo.variables[117822919] # this is the ID of the variable that has the float value indigo.variable.updateValue(1445420835, sourceVar.value.split(".")[0]) # this is the ID of the variable that will hold the integer version
Rather than convert from a string to a float then to an integer then back to a string I just chopped off everything after the first period.
_________________ Jay (Indigo Support)
|
| Tue Jun 12, 2012 10:10 am |
|
 |
|
hwitten
Joined: Dec 26, 2007 Posts: 486 Location: British Columbia
|
 Re: How can I change device or variable images on the fly
Perfect.
Thank you very much.
|
| Tue Jun 12, 2012 12:10 pm |
|
 |
|
hwitten
Joined: Dec 26, 2007 Posts: 486 Location: British Columbia
|
 Re: How can I change device or variable images on the fly
Just had to add a follow-up. The success of my HA efforts are primarily due to INDIGO, I.e. Matt and Jay and the community as a whole. There always seems to be a solution, simply for the asking. THANK YOU. Have migrated successfully to a control page for the monitoring of weather, some temps and door looks. With appropriate colour coding and large fonts the Control Page is visible from across the room. This Control Page lives at the top of a 30 in. display, mounted sideways. The Display also displays 8 cameras via SecuritySpy. A custom browser serves as a container for the Control Page.  I use the "chopped" number to colour code the background and the real number to display exact value. Thank you for allowing 'layering'. Keep up the good work. BTW, Outside temps are Celsius. It's cold out, but not 'that' cold. Just seems like it. 
|
| Wed Jun 13, 2012 2:55 pm |
|
|