xAP on the Joggler

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • chris_j_hunter
    Automated Home Legend
    • Dec 2007
    • 1713

    #61
    Looks good - have you experimented with button sizes, to find what's reliable / SWMBO-friendly ?

    Chris
    Our self-build - going further with HA...

    Comment

    • g8kmh
      Automated Home Jr Member
      • May 2006
      • 18

      #62
      Buttons

      Originally posted by chris_j_hunter View Post
      Looks good - have you experimented with button sizes, to find what's reliable / SWMBO-friendly ?
      No, so far this is an engineering exercise! The 60x60 and 120x120 work fine. Smaller than that is an issue.

      Lehane

      Comment

      • Kevin
        Moderator
        • Jan 2004
        • 558

        #63
        Based on that screenshot there's something wrong with my 'red' button - Those bulb icons should be the same size . I think it's due to the 9 slice scaling which was aimed at keeping the corners square but behaved really weirdly. - I thought I'd corrrected them but must have missed the red....

        K

        Comment

        • Kevin
          Moderator
          • Jan 2004
          • 558

          #64
          Dimming on the Joggler

          Apologies for the delay in a nice dimming option on the Joggler - I've been battling (and lost) with Flash's inbuilt slider but hope a a solution is just around the corner.

          How would people most like to implement dimming - are there suggestions ?

          I can offer these... any more ?

          1)You click on a button and a pop up appears with a slider graphic.

          2) You press and hold a button and it starts to dim/bright until releases - ie a long press. A quick press still acts as a toggle.

          3) As currently you can use a slider set up as 'use.last.device' which will always dim/bright/show the level of the last device addressed by a button press. This has the slight niggle that the button press causes a state toggle.

          K

          Comment

          • chris_j_hunter
            Automated Home Legend
            • Dec 2007
            • 1713

            #65
            how about implementing it like an electric car-window - length of press determines whether it moves while pressing or goes all the way, with a second press stopping it if it's going all the way ... and maybe a quick double press meaning fade them out, we're going out ?

            PS: wonder if it would be possible to use HTML5 rather than Flash, which can be less than perfect ?
            Last edited by chris_j_hunter; 30 July 2010, 11:02 AM.
            Our self-build - going further with HA...

            Comment

            • martynwendon
              Automated Home Sr Member
              • Feb 2009
              • 57

              #66
              Originally posted by Kevin View Post
              Apologies for the delay in a nice dimming option on the Joggler - I've been battling (and lost) with Flash's inbuilt slider but hope a a solution is just around the corner.

              How would people most like to implement dimming - are there suggestions ?

              I can offer these... any more ?

              1)You click on a button and a pop up appears with a slider graphic.

              2) You press and hold a button and it starts to dim/bright until releases - ie a long press. A quick press still acts as a toggle.

              3) As currently you can use a slider set up as 'use.last.device' which will always dim/bright/show the level of the last device addressed by a button press. This has the slight niggle that the button press causes a state toggle.

              K
              My vote would be for option 1 - but could the slider be similar to how the volume slider works in the O2 music app? So you have a slider that you can "slide" but also plus / minus buttons that you can push and hold? Maybe on & off buttons at each end too?

              Something like:

              OFF -- |||||||||||||||||||||||||| ++ ON

              An option to have the pop-up horizontal or vertical would be cool too!


              Martyn
              My Blog

              Comment

              • Kevin
                Moderator
                • Jan 2004
                • 558

                #67
                Originally posted by chris_j_hunter View Post
                PS: wonder if it would be possible to use HTML5 rather than Flash, which can be less than perfect ?
                .... except it wouldn't run on the Joggler :-(

                K

                Comment

                • BodgeIT
                  Automated Home Sr Member
                  • Jul 2010
                  • 57

                  #68
                  My preference would be 2.
                  Quick press toggle long press slide, I assuming there would need to be 2 buttons, one up one down?

                  Comment

                  • Kevin
                    Moderator
                    • Jan 2004
                    • 558

                    #69
                    Originally posted by BodgeIT View Post
                    My preference would be 2.
                    Quick press toggle long press slide, I assuming there would need to be 2 buttons, one up one down?
                    Most dimmer switches only use one button - first long press starts to brighten - a second press to dim - and they remember their last direction.

                    K

                    Comment

                    • Kevin
                      Moderator
                      • Jan 2004
                      • 558

                      #70
                      I have previously engaged in a long battle with the Flash slider component - and it won as can be seen by my current abysmal offering :-( . I'm hopeful of having a better graphic soon and then I'll revisit option 1) again.

                      ITMT I have implemented option 2. Any long press and hold over 400mS starts a dim or bright ramp and I have played with timings that work well for me but will be configurable in the XML to suit whatever technology of xAP dimmers you have. The key is to set dim steps and number of messages per second that provide realtime feedback from the light. If your technology is slow to react (eg X10) this approach will likely not be very satisfactory at all although you'll have only 16 levels.

                      For me using C-Bus I'm finding that 10 level changes per second (100mS timer) allows reaction realtime i.e. the light has reacted and the Joggler updated the level before the next xAP command is sent. This means that when you take your finger off the button it stops where it is. I am using 2% level changes so 5 secs for 0-100%. IDRAtek and IHC both seem happy at this speed and I suspect DMX and Dynalite will be too but I suspect other systems - say RF or X10 based , will need to be slower.

                      Actually with C-Bus this isn't the way to do this at all. What should happen is that the long press issues a 'start ramp over 5 secs' command and then the release cancels it, which uses only 2 xAP commands instead of maybe 50 ! It is also a much smoother ramp using 256 step levels. So I'll look at implementing such a mechanism for those lighting systems that support ramp and ramp cancel commands.

                      K
                      Last edited by Kevin; 6 August 2010, 03:01 AM.

                      Comment

                      • SiliconPixel
                        Automated Home Sr Member
                        • May 2007
                        • 52

                        #71
                        Finally had a chance to look at the slider code - Kevin, I've sent you a custom slider class I found - should do the trick.

                        Once we've tested - I'll design some slider graphics to go with it.

                        Paul.

                        Comment

                        • BodgeIT
                          Automated Home Sr Member
                          • Jul 2010
                          • 57

                          #72
                          Sounds like the best solution given the various technologies the dimmer may be controlling. Unfortunately I can't test as I have no dimmable devices.

                          I'm having trouble in an other area, namely with the functionality of the pages.
                          Can I confirm my expectations on how they should work?
                          My plan is to have 2 pages, 1 on the left is the leftmenu and is about 100pixels wide, full height. The second is 720 pixels wide, full height. I haven't set onything for the <xpos> for the leftmenu, and I've set <xpos> to 101 for main page. I've then created a grid on the main page of 6x4. My expectation is that <xgrid>00 on the main page should start somewhere after xpos 101.
                          i.e. the grid uses pixel 101(of the screen) as pixel 0 on the main page?
                          Is this how it should work?

                          I guess the alternative is just to not set anything for main page and not to have anything positioned in the area where the leftmenu sits...

                          Comment

                          • Kevin
                            Moderator
                            • Jan 2004
                            • 558

                            #73
                            Ahah..that's maybe as it should work but it's not how it does ...

                            The grid is calculated using the full screen size and can't be recalulated within a smaller/different sized (sub)page. Think of it as calculating the position based on a transparent overlay of the whole screen. There is only one grid , not a grid per page.
                            However you can offset the x or y position of each button by a fixed amount by including an <xPos> or <yPos> tag within individual <button> elements.
                            eg <xPos>+50</xPos> or <yPos>-10</yPos>
                            You can't place one <yPos> or <xPos> tag within the <layout> element to offset every button and within the <page> section this tag is purposed to place the top left corner of the backgound/page.

                            Also , and this where I think the confusion is , I'm always calculating the xPos / yPos of any button based on the top left screen origin and not adding it to any <xPos> <yPos> that an individual page might have. These tags only effectively place the page background....
                            The buttons are 'contained' within the page only in respect of their visibility and not their coordinates. I'll think on this as one thing it doesn't facilitate is moving a whole page around , complete with contents just by altering the page's <xPos> or <yPos> .. which could be very useful (and logical) but it makes things awkward in other respects....

                            So looking at what you're trying to do there are a couple of approaches. I think you're trying to create a 100 pixel wide left menu space on which you're going to later directly place buttons and then you want a 6x4 grid centred and spaced within the remaining 720 pixel wide area to the right.

                            Consider your default button grid as the main page as full width/height and at the back of everything else and then the left 100 pixel wide as a sub page on top with <xPos>0</xPos>.
                            Now several approaches..

                            1) Use 6x4 but create a <marginLeft> that is 100 pixels more than your <marginRight>

                            2) Use a grid of 7x4 but never place a button in the left hand vertical column so you get an offset 6x4 grid effectively... The unused column grids might be useful for placing buttons on your left menu....

                            3) Use 7x4 but add an <xPos>+100</xPos> within every <button> section. This will effectively push the grid off the RHS of the screen making the right hand column inaccessible/invisible.

                            You may have to adjust the +100 to get things looking just right...

                            Am I on the right track here ?

                            K
                            Last edited by Kevin; 6 August 2010, 06:12 PM.

                            Comment

                            • Kevin
                              Moderator
                              • Jan 2004
                              • 558

                              #74
                              Also - just one thing re pages, particularly if you are basing a layout on a dual menu selection ....

                              In the provided brainstorm type XML there is an inference of a central page selection that is a combination of a left hand vertical menu and a second horizontal menu along the bottom of the screen. I'm not sure this is a sensible design approach but regardless it didn't even work as is.....

                              Martyn has kindly modified the AS3 code to support remembering the page visibility of the combinational selections so that as you reselect previous buttons in either of the menus the correct pages are hidden/shown. This still supports <group> tags that are in place for either buttons or pages and functions by the inclusion of an additional <parent> tag. It supports upto 4 levels of heirarchical depths.

                              This code (thanks Martyn) will be included in beta 5

                              K

                              Comment

                              • BodgeIT
                                Automated Home Sr Member
                                • Jul 2010
                                • 57

                                #75
                                Thanks Kevin, that cleared up my confusion...

                                Comment

                                Working...
                                X