more G-Labs products

Author Topic: Additional Switch widgets  (Read 1542 times)

January 03, 2015, 06:54:00 AM
Read 1542 times

enterprised

  • ****
  • Information
  • Sr. Member
  • Posts: 101
  • Things are only impossible until they are not
I like to request 2 additional Switch widgets to be added to the default widget list.

  • Slider Switch, like the switch type used in the "Security Alarm System" module
  • Push Button / Toggle Switch (momentary contact switch)
4a 75 73 74 20 61 20 70 65 72 73 6f 6e 20 68 61 76 69 6e 67 20 66 75 6e 20 77 69 74 68 20 68 6f 6d 65 20 61 75 74 6f 6d 61 74 69 6f 6e
enterprised == guytpetj

January 04, 2015, 08:32:28 AM
Reply #1

mvdarend

  • *****
  • Information
  • Hero Member
  • Posts: 431
It should be fairly easy to make one yourself, you can see an example of the slider switch here:
http://codepen.io/genielabs/public/

Here is the slider itself:
Code: [Select]
      <select data-ui-field="armdisarm" data-role="slider">
        <option value="off">
          Disarmed
        </option>
        <option value="on">
          Armed
        </option>
      </select>

I was thinking of a momentary switch as well for the Wake on LAN app, but I'm not sure how to display one in an elegant manner, any ideas?

January 04, 2015, 09:34:02 PM
Reply #2

enterprised

  • ****
  • Information
  • Sr. Member
  • Posts: 101
  • Things are only impossible until they are not
I was thinking something like the attached mock-up pictures.

"pushbutton_off.png" as the default (Off) state

"pushbutton_activated.png" as the On or Active state, the active image will only show for a second or so before returning to the default (Off) color scheme.

The push button should have a configurable "On state" time. For instance a garage door may only need 0.5 seconds in the On state, for something else you may want to configure it to 20 seconds.
« Last Edit: January 04, 2015, 10:25:15 PM by enterprised »
4a 75 73 74 20 61 20 70 65 72 73 6f 6e 20 68 61 76 69 6e 67 20 66 75 6e 20 77 69 74 68 20 68 6f 6d 65 20 61 75 74 6f 6d 61 74 69 6f 6e
enterprised == guytpetj

January 04, 2015, 11:39:07 PM
Reply #3

RoChess

  • ***
  • Information
  • Full Member
  • Posts: 61