Please login or register.

Login with username, password and session length

Author Topic: HG Switch widget LED colors  (Read 1915 times)

shtckt

  • Full Member
  • ***
  • Helpful Post Rating: 0
  • Posts: 26
HG Switch widget LED colors
« on: January 03, 2020, 10:30:31 AM »

Within the Switch widget programming, there are two files mentioned for LED color. One is "images/common/led_green.png" and the other is "images/common/led_black.png". Have looked at the backed up configuration file, and on the SD Card, but can not find them.

Saw a README within the Overlays folder that mentioned the green or yellow status LEDs on Programs. Close, but that only counts when playing horseshoes.

Sorry, I worked too long within the power industry where the desired status was to show green for "ready to run" or "red for running". Happiness was seeing an all red board meaning we were producing product or making revenue.

I would never have considered making this change except to my eyes the green LEDs are hard to step back, see a screen full of Switch widgets, and find the one or few greenies among all the black and gray.

I will need to make a "...red.png", and refer to it where green is now, and then swap out the black LED png with the green LED png reference. Might even consider making the green a different shade or intensity to make it stand out.

Unfortunately, there is not much I can do about the mobile app. Way beyond my understanding to modify. But go figure, it has red for running, and the ON status is embellished, but it has black for stopped or not energized. So, so close...
Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 282
  • Posts: 10497
  • I don't work for X10, I use it successfuly!
Re: HG Switch widget LED colors
« Reply #1 on: January 03, 2020, 01:15:12 PM »

Within the Switch widget programming, there are two files mentioned for LED color. One is "images/common/led_green.png" and the other is "images/common/led_black.png". Have looked at the backed up configuration file, and on the SD Card, but can not find them.

Saw a README within the Overlays folder that mentioned the green or yellow status LEDs on Programs. Close, but that only counts when playing horseshoes.

Sorry, I worked too long within the power industry where the desired status was to show green for "ready to run" or "red for running". Happiness was seeing an all red board meaning we were producing product or making revenue.

I would never have considered making this change except to my eyes the green LEDs are hard to step back, see a screen full of Switch widgets, and find the one or few greenies among all the black and gray.

I will need to make a "...red.png", and refer to it where green is now, and then swap out the black LED png with the green LED png reference. Might even consider making the green a different shade or intensity to make it stand out.

Unfortunately, there is not much I can do about the mobile app. Way beyond my understanding to modify. But go figure, it has red for running, and the ON status is embellished, but it has black for stopped or not energized. So, so close...
I never thought of this. I always thought of green was go red was stop. I did test different back grounds and played with a few custom ones which made seeing widget status better.
 It is possible to edit the widgets thus changing how they display info and other aspects.
There is no need to make a led_red.png file HG has one as well as brown, purple, & blue
to make your changes click configure>widgets and select the homegenie/generic/switch then make the changes to the java script code on lines 90 and 92
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

petera

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 27
  • Posts: 1750
Re: HG Switch widget LED colors
« Reply #2 on: January 03, 2020, 01:25:19 PM »

Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 282
  • Posts: 10497
  • I don't work for X10, I use it successfuly!
Re: HG Switch widget LED colors
« Reply #3 on: January 03, 2020, 01:31:17 PM »

You can download anything you need from here https://github.com/genielabs/HomeGenie/tree/master/BaseFiles/Common/html/images/common
Those images should already be in HG as they are used for other things in HG.
a simple edit to the widget replacing the word green with red and black with green should do the mod shtckt is looking for.
« Last Edit: January 03, 2020, 01:36:39 PM by Tuicemen »
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 282
  • Posts: 10497
  • I don't work for X10, I use it successfuly!
Re: HG Switch widget LED colors
« Reply #4 on: January 03, 2020, 01:41:25 PM »

It should be noted that any editing you do to widgets included in a HG distribution will be lost on a update unless adopted by the author. If you have a recent backup to reinstall after the update it should return your mods.
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

petera

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 27
  • Posts: 1750
Re: HG Switch widget LED colors
« Reply #5 on: January 03, 2020, 03:27:02 PM »

You can download anything you need from here https://github.com/genielabs/HomeGenie/tree/master/BaseFiles/Common/html/images/common
Those images should already be in HG as they are used for other things in HG.
a simple edit to the widget replacing the word green with red and black with green should do the mod shtckt is looking for.

Clearly he has looked for them and can't find them. He either has them stored in a different folder or doesn't have them. The Github is the simplest source of obtaining missing files. A simple download will do the trick.
Logged

shtckt

  • Full Member
  • ***
  • Helpful Post Rating: 0
  • Posts: 26
Re: HG Switch widget LED colors
« Reply #6 on: January 03, 2020, 04:35:28 PM »

Thanks for all the replies.

Before I asked the community, I had tried once to make the simple swap and had seen where "red" had been used before. I saved the Switch widget and even rebooted. I must have again failed to do something right again.

What I had planned was to save this widget and then name it something that could be exported and reintroduced if a drastic update wiped it out.

The color convention is a bit of a twist to traffic lights. Actually, the convention is older that traffic lights back to the generations after Tesla, Edison, Westinghouse, GE. It might be that the power industry and industrial controls in general has kept the convention. I have been retired long enough now that I do not have to be honked from behind to proceed through a lighted intersection.

I still find it interesting that the mobile app, at least the Android version, did have red for running.


Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 282
  • Posts: 10497
  • I don't work for X10, I use it successfuly!
Re: HG Switch widget LED colors
« Reply #7 on: January 03, 2020, 04:40:15 PM »


Before I asked the community, I had tried once to make the simple swap and had seen where "red" had been used before. I saved the Switch widget and even rebooted. I must have again failed to do something right again.
It is possible you forgot to click action then save from bottom right.
I tend to forget to do that from time to time B:( however HG usually reminds me rofl
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 282
  • Posts: 10497
  • I don't work for X10, I use it successfuly!
Re: HG Switch widget LED colors
« Reply #8 on: January 03, 2020, 04:53:52 PM »

Ok, I just tested this and setting changes to widgets never took until I restarted the HG service. ;)
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

shtckt

  • Full Member
  • ***
  • Helpful Post Rating: 0
  • Posts: 26
Re: HG Switch widget LED colors
« Reply #9 on: January 03, 2020, 05:02:04 PM »

Ha, just got back on to send out the same information. You beat  me to it. Restarting the HG Service works! I still do not have the methods required stuck in my head yet. I love wood working but a mismarked cut is devastating. But programming is forgiving, well, most of the time.

Also found a new friend, when visiting Linux...

    FIND . -name *xxxx*  where xxxx is any portion of the file name.

Found the red LED color.  ./pi/homegenie/html/images/common/led_red.png
Still a novice.

Modified:
-Line 62 contains Red for signifying error. Suggest it be changed to Yellow.  Yellow and White are acceptable in industrial controls for TRIPPED or FAILED conditions.
-It takes getting used to but I like the all green where a module is not on. Did find a few black modules. I see now I had not used them yet. So I chose OFF on each and they snapped in Green.
« Last Edit: January 03, 2020, 05:31:41 PM by shtckt »
Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 282
  • Posts: 10497
  • I don't work for X10, I use it successfuly!
Re: HG Switch widget LED colors
« Reply #10 on: January 03, 2020, 06:04:43 PM »

Glad you got it all figured out.
It realy is all about personal preference. In the end your the only one that has to be happy with the look of your HG server. It is nice that HG allows so much customization.
Logged
Please Read Topic:
General Forum Etiquette
Before you post!
 

X10.com | About X10 | X10 Security Systems | Cameras| Package Deals
© Copyright 2014-2016 X10.com All rights reserved.