Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue #212 - Web can not dim/brighten Insteon lights #231

Merged
merged 8 commits into from
Jul 14, 2013
Merged

Fix issue #212 - Web can not dim/brighten Insteon lights #231

merged 8 commits into from
Jul 14, 2013

Commits on Jun 3, 2013

  1. Fix issues with INSTEON lights in web interface

    INSTEON lights are treated differently in the web interface versus X10
    lights, for example: they get different icons, and cannot be dimmed or
    brightened. This patch does the following:
    
    - Use the same light icons for INSTEON lights that are used for X10
    lights.
    
    - Allow dimming/brightening of INSTEON lights by clicking on the left
    or right side of the icon in the web interface (only dimmable light, of
    course).
    
    - Fix a logic error that prevents disabling the button image cache. Ran
    into this while creating new icons for my web interface.
    
    - As an experimental "feature", and a small delay to try to give MH a
    chance to receive the new state of an INSTEON device changed through the
    web interface. This will allow the correct state to be displayed when
    the web page renders again. Disabled by default since it's just a hack
    (though it works good enough for me).
    
    Comments welcome.
    Eloy Paris committed Jun 3, 2013
    Configuration menu
    Copy the full SHA
    61102b2 View commit details
    Browse the repository at this point in the history

Commits on Jun 30, 2013

  1. Configuration menu
    Copy the full SHA
    e3e1b03 View commit details
    Browse the repository at this point in the history
  2. Updated Insteon state definition for new Insteon object model

    Moved responsibility for Insteon states out of http_server.pl and
    into the Insteon objects themselves. (i.e. Insteon::DimmableLight)
    The existing code was not working with the new object model.  This
    is an additional fix for Issue #212.
    
    Open Issue:  http_server.pl->button_action() probably needs to
    be modified so Insteon lights dim/brighten correctly.  It
    doesn't look like is_dimable() was ever implemented for any MH
    object.
    Michael Stovenour committed Jun 30, 2013
    Configuration menu
    Copy the full SHA
    235bc5c View commit details
    Browse the repository at this point in the history

Commits on Jul 5, 2013

  1. Corrections for setting Insteon device states for web

    Flip order of on/off states to match new web object model
    Used the set_states() function rather than directly
    modifying data from the Generic_Item class.
    Eliminated the save/restore of the "states" array.  I'm
    not sure what the original pupose was but saving/restoring
    prevents users from defining additional states in their ini
    file.  Note that the current device "state" is still stored.
    Michael Stovenour committed Jul 5, 2013
    Configuration menu
    Copy the full SHA
    283432d View commit details
    Browse the repository at this point in the history
  2. Make sure web icons show 'on' if light state is 100%

    Michael Stovenour committed Jul 5, 2013
    Configuration menu
    Copy the full SHA
    eadf6e0 View commit details
    Browse the repository at this point in the history
  3. Better set of states for insteon_menu_states given new behavior

    Michael Stovenour committed Jul 5, 2013
    Configuration menu
    Copy the full SHA
    e1db05a View commit details
    Browse the repository at this point in the history
  4. Fix issue where setting level 100% sets to 0xfe

    Changed each instance of this calcualtion to use 5/4 rounding prior
    to calling sprintf().  There is some issue between perl data types
    and the C sprintf() implementation.  In this case perl will print
    255 but sprintf will return fe.  Some instances of this were
    previously fixed by adding check logic to force fe or 254 to 100%.
    I modified all the instances to be consistent.
    Michael Stovenour committed Jul 5, 2013
    Configuration menu
    Copy the full SHA
    871d5e7 View commit details
    Browse the repository at this point in the history
  5. Make sure web icons show 'off' if light state is 0%

    Michael Stovenour committed Jul 5, 2013
    Configuration menu
    Copy the full SHA
    313d46e View commit details
    Browse the repository at this point in the history