Custom IA7 pages with direct control?

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Custom IA7 pages with direct control?

rickerdo
I'm in the process of trying to create a few custom pages in IA7 using direct control (no pop-up) of Insteon based light objects. No matter what I do, the static HTML page I create will not allow direct control. However, the same object in "Browse All Lights" does allow direct control (no pop-up).

Any ideas why direct control works in an MH created page, but not my custom page? My custom page does show a heavier black border around the "Garage" button, but it still creates a pop-up when clicked, so I know the json is being parsed and is being applied.

The results are the same on both master and stable branches.

Thanks!

My code:
cat /home/mh/data/web/ia7_config.json
{
  "prefs" : {
     "header_button" : "yes",
     "state_log_show" : "yes",
     "state_log_entries" : "4",
     "always_double_buttons" : "yes",
     "fp_icon_size" : "32",
     "fp_state_popovers" : "yes",
     "substate_percentages" : "20",
     "disable_current_state" : "yes",
     "notifications" : "yes",
     "speech_default" : "banner"
  },

  "objects" : {
    "Garage" : {
      "direct_control" : "yes"
    }
  }
}


cat /home/mh/data/web/mypages/test2.shtml
<div class="col-sm-4">
  <div style="vertical-align:middle">
    <button entity='Garage' class='btn btn-lg btn-block btn-list btn-popover btn-direct btn-state-cmd navbutton-padding btn-default'>Garageloading...</button>
  </div>
</div>

<script> updateStaticPage(); </script>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Custom IA7 pages with direct control?

H Plato
Good catch, the javascript routine for static pages doesn't have that component, just the modal. Should be an easy fix, I'll add it in.

Sent from my mobile device.

> On Oct 20, 2016, at 6:41 AM, rickerdo <[hidden email]> wrote:
>
> I'm in the process of trying to create a few custom pages in IA7 using direct
> control (no pop-up) of Insteon based light objects. No matter what I do, the
> static HTML page I create will not allow direct control. However, the same
> object in "Browse All Lights" does allow direct control (no pop-up).
>
> Any ideas why direct control works in an MH created page, but not my custom
> page? My custom page does show a heavier black border around the "Garage"
> button, but it still creates a pop-up when clicked, so I know the json is
> being parsed and is being applied.
>
> The results are the same on both master and stable branches.
>
> Thanks!
>
> My code:
> cat /home/mh/data/web/ia7_config.json
> {
>  "prefs" : {
>     "header_button" : "yes",
>     "state_log_show" : "yes",
>     "state_log_entries" : "4",
>     "always_double_buttons" : "yes",
>     "fp_icon_size" : "32",
>     "fp_state_popovers" : "yes",
>     "substate_percentages" : "20",
>     "disable_current_state" : "yes",
>     "notifications" : "yes",
>     "speech_default" : "banner"
>  },
>
>  "objects" : {
>    "Garage" : {
>      "direct_control" : "yes"
>    }
>  }
> }
>
>
> cat /home/mh/data/web/mypages/test2.shtml
> <div class="col-sm-4">
>  <div style="vertical-align:middle">
>    <button entity='Garage' class='btn btn-lg btn-block btn-list btn-popover
> btn-direct btn-state-cmd navbutton-padding
> btn-default'>Garageloading...</button>
>  </div>
> </div>
>
>
>
>
>
>
> --
> View this message in context: http://misterhouse.10964.n7.nabble.com/Custom-IA7-pages-with-direct-control-tp21468.html
> Sent from the Misterhouse - User mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> ________________________________________________________
> To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users
>

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Custom IA7 pages with direct control?

rickerdo
Awesome! I wasn't sure if I was missing something.

Once the changes are in place, would a button require any class definitions? Would the following be enough static HTML since the "entity" is defined?

<button entity='Garage'>Garage<span class='pull-right'>loading...</span></button>

<script>
  updateStaticPage();
</script>


Thanks for the quick response! 


On Thu, Oct 20, 2016 at 10:01 AM, H Plato <[hidden email]> wrote:
Good catch, the javascript routine for static pages doesn't have that component, just the modal. Should be an easy fix, I'll add it in.

Sent from my mobile device.

> On Oct 20, 2016, at 6:41 AM, rickerdo <[hidden email]> wrote:
>
> I'm in the process of trying to create a few custom pages in IA7 using direct
> control (no pop-up) of Insteon based light objects. No matter what I do, the
> static HTML page I create will not allow direct control. However, the same
> object in "Browse All Lights" does allow direct control (no pop-up).
>
> Any ideas why direct control works in an MH created page, but not my custom
> page? My custom page does show a heavier black border around the "Garage"
> button, but it still creates a pop-up when clicked, so I know the json is
> being parsed and is being applied.
>
> The results are the same on both master and stable branches.
>
> Thanks!
>
> My code:
> cat /home/mh/data/web/ia7_config.json
> {
>  "prefs" : {
>     "header_button" : "yes",
>     "state_log_show" : "yes",
>     "state_log_entries" : "4",
>     "always_double_buttons" : "yes",
>     "fp_icon_size" : "32",
>     "fp_state_popovers" : "yes",
>     "substate_percentages" : "20",
>     "disable_current_state" : "yes",
>     "notifications" : "yes",
>     "speech_default" : "banner"
>  },
>
>  "objects" : {
>    "Garage" : {
>      "direct_control" : "yes"
>    }
>  }
> }
>
>
> cat /home/mh/data/web/mypages/test2.shtml
> <div class="col-sm-4">
>  <div style="vertical-align:middle">
>    <button entity='Garage' class='btn btn-lg btn-block btn-list btn-popover
> btn-direct btn-state-cmd navbutton-padding
> btn-default'>Garageloading...</button>
>  </div>
> </div>
>
>
>
>
>
>
> --
> View this message in context: http://misterhouse.10964.n7.nabble.com/Custom-IA7-pages-with-direct-control-tp21468.html
> Sent from the Misterhouse - User mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> ________________________________________________________
> To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users
>


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Custom IA7 pages with direct control?

H Plato
OK, this now works in IA7 v1.3.600

You’ll need the direct_control entity definition in the ia7_config.json. and the btn-direct class to get the outline. I used this for my test purposes.

        <div class="col-sm-4">
                   <div style="vertical-align:middle">
                <button entity='app1' class='btn btn-default btn-lg btn-list btn-block btn-state-cmd btn-direct navbutton-padding'>TestApp1<span class='pull-right'>loading...</span>
                </button>
                </div>

 If would be great to get some testers of the new code. Merge in my ia7 branch (https://github.com/hplato/misterhouse)  and see if that change works for you.

On Oct 20, 2016, at 10:26 AM, Rick Reed <[hidden email]> wrote:

Awesome! I wasn't sure if I was missing something.

Once the changes are in place, would a button require any class definitions? Would the following be enough static HTML since the "entity" is defined?

<button entity='Garage'>Garage<span class='pull-right'>loading...</span></button>

<script>
  updateStaticPage();
</script>


Thanks for the quick response! 


On Thu, Oct 20, 2016 at 10:01 AM, H Plato <[hidden email]> wrote:
Good catch, the javascript routine for static pages doesn't have that component, just the modal. Should be an easy fix, I'll add it in.

Sent from my mobile device.

> On Oct 20, 2016, at 6:41 AM, rickerdo <[hidden email]> wrote:
>
> I'm in the process of trying to create a few custom pages in IA7 using direct
> control (no pop-up) of Insteon based light objects. No matter what I do, the
> static HTML page I create will not allow direct control. However, the same
> object in "Browse All Lights" does allow direct control (no pop-up).
>
> Any ideas why direct control works in an MH created page, but not my custom
> page? My custom page does show a heavier black border around the "Garage"
> button, but it still creates a pop-up when clicked, so I know the json is
> being parsed and is being applied.
>
> The results are the same on both master and stable branches.
>
> Thanks!
>
> My code:
> cat /home/mh/data/web/ia7_config.json
> {
>  "prefs" : {
>     "header_button" : "yes",
>     "state_log_show" : "yes",
>     "state_log_entries" : "4",
>     "always_double_buttons" : "yes",
>     "fp_icon_size" : "32",
>     "fp_state_popovers" : "yes",
>     "substate_percentages" : "20",
>     "disable_current_state" : "yes",
>     "notifications" : "yes",
>     "speech_default" : "banner"
>  },
>
>  "objects" : {
>    "Garage" : {
>      "direct_control" : "yes"
>    }
>  }
> }
>
>
> cat /home/mh/data/web/mypages/test2.shtml
> <div class="col-sm-4">
>  <div style="vertical-align:middle">
>    <button entity='Garage' class='btn btn-lg btn-block btn-list btn-popover
> btn-direct btn-state-cmd navbutton-padding
> btn-default'>Garageloading...</button>
>  </div>
> </div>
>
>
>
>
>
>
> --
> View this message in context: http://misterhouse.10964.n7.nabble.com/Custom-IA7-pages-with-direct-control-tp21468.html
> Sent from the Misterhouse - User mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> ________________________________________________________
> To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users
>



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Custom IA7 pages with direct control?

rickerdo
Thanks for the quick fix! I have confirmed that the functionality works as expected using your changes, but shouldn't "direct_control" : "yes" in ia7_config.json be enough to darken the border of the button? It seems somewhat redundant defining "direct_control" in ia7_config.json AND adding the "btn-direct" class to the button. The button still works directly even when "btn-direct" is omitted, the border just isn't darkened.

Unrelated to my initial question, but still somewhat on topic:
 - Is it possible to use bootstrap components, like a slider for instance, to control something like a light dimmer or a volume control? How would such a thing tie to a MH object in HTML?
 - If you have a MH item with several states, is it possible to have each state of that item be a separate direct control button? I have a specific use case where I would like to have each input of my AV receiver be a separate button on a custom page in order to reduce the number of button clicks. 

On Thu, Oct 20, 2016 at 7:47 PM, H Plato [via MisterHouse] <[hidden email]> wrote:
OK, this now works in IA7 v1.3.600

You’ll need the direct_control entity definition in the ia7_config.json. and the btn-direct class to get the outline. I used this for my test purposes.

        <div class="col-sm-4">
                   <div style="vertical-align:middle">
                <button entity='app1' class='btn btn-default btn-lg btn-list btn-block btn-state-cmd btn-direct navbutton-padding'>TestApp1<span class='pull-right'>loading...</span>
                </button>
                </div>

 If would be great to get some testers of the new code. Merge in my ia7 branch (https://github.com/hplato/misterhouse)  and see if that change works for you.

On Oct 20, 2016, at 10:26 AM, Rick Reed <[hidden email]> wrote:

Awesome! I wasn't sure if I was missing something.

Once the changes are in place, would a button require any class definitions? Would the following be enough static HTML since the "entity" is defined?

<button entity='Garage'>Garage<span class='pull-right'>loading...</span></button>

<script>
  updateStaticPage();
</script>


Thanks for the quick response! 


On Thu, Oct 20, 2016 at 10:01 AM, H Plato <[hidden email]> wrote:
Good catch, the javascript routine for static pages doesn't have that component, just the modal. Should be an easy fix, I'll add it in.

Sent from my mobile device.

> On Oct 20, 2016, at 6:41 AM, rickerdo <[hidden email]> wrote:
>
> I'm in the process of trying to create a few custom pages in IA7 using direct
> control (no pop-up) of Insteon based light objects. No matter what I do, the
> static HTML page I create will not allow direct control. However, the same
> object in "Browse All Lights" does allow direct control (no pop-up).
>
> Any ideas why direct control works in an MH created page, but not my custom
> page? My custom page does show a heavier black border around the "Garage"
> button, but it still creates a pop-up when clicked, so I know the json is
> being parsed and is being applied.
>
> The results are the same on both master and stable branches.
>
> Thanks!
>
> My code:
> cat /home/mh/data/web/ia7_config.json
> {
>  "prefs" : {
>     "header_button" : "yes",
>     "state_log_show" : "yes",
>     "state_log_entries" : "4",
>     "always_double_buttons" : "yes",
>     "fp_icon_size" : "32",
>     "fp_state_popovers" : "yes",
>     "substate_percentages" : "20",
>     "disable_current_state" : "yes",
>     "notifications" : "yes",
>     "speech_default" : "banner"
>  },
>
>  "objects" : {
>    "Garage" : {
>      "direct_control" : "yes"
>    }
>  }
> }
>
>
> cat /home/mh/data/web/mypages/test2.shtml
> <div class="col-sm-4">
>  <div style="vertical-align:middle">
>    <button entity='Garage' class='btn btn-lg btn-block btn-list btn-popover
> btn-direct btn-state-cmd navbutton-padding
> btn-default'>Garageloading...</button>
>  </div>
> </div>
>
>
>
>
>
>
> --
> View this message in context: http://misterhouse.10964.n7.nabble.com/Custom-IA7-pages-with-direct-control-tp21468.html
> Sent from the Misterhouse - User mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> ________________________________________________________
> To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users
>



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users




If you reply to this email, your message will be added to the discussion below:
http://misterhouse.10964.n7.nabble.com/Custom-IA7-pages-with-direct-control-tp21468p21472.html
To unsubscribe from Custom IA7 pages with direct control?, click here.
NAML

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Custom IA7 pages with direct control?

H Plato
Good point, that’s a one-liner change, so I can add it.

Those are definitely possible. Depending on the implementation, sliders can be a challenge. Right now, the sliders work in the IOS home kit app and the MH integration. However each slider step generates a command to the MH http server. Sending several a second seems to overload the insteon interface. 

You might be able to achieve that with multiple objects, and usercode that will adjust the other objects based on action. So if one button is ON, set the others to OFF.

On Oct 21, 2016, at 5:46 AM, rickerdo <[hidden email]> wrote:

Thanks for the quick fix! I have confirmed that the functionality works as expected using your changes, but shouldn't "direct_control" : "yes" in ia7_config.json be enough to darken the border of the button? It seems somewhat redundant defining "direct_control" in ia7_config.json AND adding the "btn-direct" class to the button. The button still works directly even when "btn-direct" is omitted, the border just isn't darkened.

Unrelated to my initial question, but still somewhat on topic:
 - Is it possible to use bootstrap components, like a slider for instance, to control something like a light dimmer or a volume control? How would such a thing tie to a MH object in HTML?
 - If you have a MH item with several states, is it possible to have each state of that item be a separate direct control button? I have a specific use case where I would like to have each input of my AV receiver be a separate button on a custom page in order to reduce the number of button clicks. 

On Thu, Oct 20, 2016 at 7:47 PM, H Plato [via MisterHouse] <<a href="x-msg://138/user/SendEmail.jtp?type=node&amp;node=21473&amp;i=0" target="_top" rel="nofollow" link="external" class="">[hidden email]> wrote:
OK, this now works in IA7 v1.3.600

You’ll need the direct_control entity definition in the ia7_config.json. and the btn-direct class to get the outline. I used this for my test purposes.

        <div class="col-sm-4">
                   <div style="vertical-align:middle">
                <button entity='app1' class='btn btn-default btn-lg btn-list btn-block btn-state-cmd btn-direct navbutton-padding'>TestApp1<span class='pull-right'>loading...</span>
                </button>
                </div>

 If would be great to get some testers of the new code. Merge in my ia7 branch (https://github.com/hplato/misterhouse)  and see if that change works for you.

On Oct 20, 2016, at 10:26 AM, Rick Reed <[hidden email]> wrote:

Awesome! I wasn't sure if I was missing something.

Once the changes are in place, would a button require any class definitions? Would the following be enough static HTML since the "entity" is defined?

<button entity='Garage'>Garage<span class='pull-right'>loading...</span></button>

<script>
  updateStaticPage();
</script>


Thanks for the quick response! 


On Thu, Oct 20, 2016 at 10:01 AM, H Plato <[hidden email]> wrote:
Good catch, the javascript routine for static pages doesn't have that component, just the modal. Should be an easy fix, I'll add it in.

Sent from my mobile device.

> On Oct 20, 2016, at 6:41 AM, rickerdo <[hidden email]> wrote:
>
> I'm in the process of trying to create a few custom pages in IA7 using direct
> control (no pop-up) of Insteon based light objects. No matter what I do, the
> static HTML page I create will not allow direct control. However, the same
> object in "Browse All Lights" does allow direct control (no pop-up).
>
> Any ideas why direct control works in an MH created page, but not my custom
> page? My custom page does show a heavier black border around the "Garage"
> button, but it still creates a pop-up when clicked, so I know the json is
> being parsed and is being applied.
>
> The results are the same on both master and stable branches.
>
> Thanks!
>
> My code:
> cat /home/mh/data/web/ia7_config.json
> {
>  "prefs" : {
>     "header_button" : "yes",
>     "state_log_show" : "yes",
>     "state_log_entries" : "4",
>     "always_double_buttons" : "yes",
>     "fp_icon_size" : "32",
>     "fp_state_popovers" : "yes",
>     "substate_percentages" : "20",
>     "disable_current_state" : "yes",
>     "notifications" : "yes",
>     "speech_default" : "banner"
>  },
>
>  "objects" : {
>    "Garage" : {
>      "direct_control" : "yes"
>    }
>  }
> }
>
>
> cat /home/mh/data/web/mypages/test2.shtml
> <div class="col-sm-4">
>  <div style="vertical-align:middle">
>    <button entity='Garage' class='btn btn-lg btn-block btn-list btn-popover
> btn-direct btn-state-cmd navbutton-padding
> btn-default'>Garageloading...</button>
>  </div>
> </div>
>
>
>
>
>
>
> --
> View this message in context: http://misterhouse.10964.n7.nabble.com/Custom-IA7-pages-with-direct-control-tp21468.html
> Sent from the Misterhouse - User mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> ________________________________________________________
> To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users
>



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users




If you reply to this email, your message will be added to the discussion below:
http://misterhouse.10964.n7.nabble.com/Custom-IA7-pages-with-direct-control-tp21468p21472.html
To unsubscribe from Custom IA7 pages with direct control?, click here.
NAML



View this message in context: Re: Custom IA7 pages with direct control?
Sent from the Misterhouse - User mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Custom IA7 pages with direct control?

rickerdo
I haven't noticed the one line change to remove the redundant requirements. Any plans to have these changes migrated into master?

Thanks!

On Fri, Oct 21, 2016 at 10:08 AM, H Plato [via MisterHouse] <[hidden email]> wrote:
Good point, that’s a one-liner change, so I can add it.

Those are definitely possible. Depending on the implementation, sliders can be a challenge. Right now, the sliders work in the IOS home kit app and the MH integration. However each slider step generates a command to the MH http server. Sending several a second seems to overload the insteon interface. 

You might be able to achieve that with multiple objects, and usercode that will adjust the other objects based on action. So if one button is ON, set the others to OFF.

On Oct 21, 2016, at 5:46 AM, rickerdo <[hidden email]> wrote:

Thanks for the quick fix! I have confirmed that the functionality works as expected using your changes, but shouldn't "direct_control" : "yes" in ia7_config.json be enough to darken the border of the button? It seems somewhat redundant defining "direct_control" in ia7_config.json AND adding the "btn-direct" class to the button. The button still works directly even when "btn-direct" is omitted, the border just isn't darkened.

Unrelated to my initial question, but still somewhat on topic:
 - Is it possible to use bootstrap components, like a slider for instance, to control something like a light dimmer or a volume control? How would such a thing tie to a MH object in HTML?
 - If you have a MH item with several states, is it possible to have each state of that item be a separate direct control button? I have a specific use case where I would like to have each input of my AV receiver be a separate button on a custom page in order to reduce the number of button clicks. 

On Thu, Oct 20, 2016 at 7:47 PM, H Plato [via MisterHouse] <<a href="x-msg://138/user/SendEmail.jtp?type=node&amp;node=21473&amp;i=0" target="_top" rel="nofollow" link="external" class="">[hidden email]> wrote:
OK, this now works in IA7 v1.3.600

You’ll need the direct_control entity definition in the ia7_config.json. and the btn-direct class to get the outline. I used this for my test purposes.

        <div class="col-sm-4">
                   <div style="vertical-align:middle">
                <button entity='app1' class='btn btn-default btn-lg btn-list btn-block btn-state-cmd btn-direct navbutton-padding'>TestApp1<span class='pull-right'>loading...</span>
                </button>
                </div>

 If would be great to get some testers of the new code. Merge in my ia7 branch (https://github.com/hplato/misterhouse)  and see if that change works for you.

On Oct 20, 2016, at 10:26 AM, Rick Reed <[hidden email]> wrote:

Awesome! I wasn't sure if I was missing something.

Once the changes are in place, would a button require any class definitions? Would the following be enough static HTML since the "entity" is defined?

<button entity='Garage'>Garage<span class='pull-right'>loading...</span></button>

<script>
  updateStaticPage();
</script>


Thanks for the quick response! 


On Thu, Oct 20, 2016 at 10:01 AM, H Plato <[hidden email]> wrote:
Good catch, the javascript routine for static pages doesn't have that component, just the modal. Should be an easy fix, I'll add it in.

Sent from my mobile device.

> On Oct 20, 2016, at 6:41 AM, rickerdo <[hidden email]> wrote:
>
> I'm in the process of trying to create a few custom pages in IA7 using direct
> control (no pop-up) of Insteon based light objects. No matter what I do, the
> static HTML page I create will not allow direct control. However, the same
> object in "Browse All Lights" does allow direct control (no pop-up).
>
> Any ideas why direct control works in an MH created page, but not my custom
> page? My custom page does show a heavier black border around the "Garage"
> button, but it still creates a pop-up when clicked, so I know the json is
> being parsed and is being applied.
>
> The results are the same on both master and stable branches.
>
> Thanks!
>
> My code:
> cat /home/mh/data/web/ia7_config.json
> {
>  "prefs" : {
>     "header_button" : "yes",
>     "state_log_show" : "yes",
>     "state_log_entries" : "4",
>     "always_double_buttons" : "yes",
>     "fp_icon_size" : "32",
>     "fp_state_popovers" : "yes",
>     "substate_percentages" : "20",
>     "disable_current_state" : "yes",
>     "notifications" : "yes",
>     "speech_default" : "banner"
>  },
>
>  "objects" : {
>    "Garage" : {
>      "direct_control" : "yes"
>    }
>  }
> }
>
>
> cat /home/mh/data/web/mypages/test2.shtml
> <div class="col-sm-4">
>  <div style="vertical-align:middle">
>    <button entity='Garage' class='btn btn-lg btn-block btn-list btn-popover
> btn-direct btn-state-cmd navbutton-padding
> btn-default'>Garageloading...</button>
>  </div>
> </div>
>
>
>
>
>
>
> --
> View this message in context: http://misterhouse.10964.n7.nabble.com/Custom-IA7-pages-with-direct-control-tp21468.html
> Sent from the Misterhouse - User mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> ________________________________________________________
> To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users
>



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users




If you reply to this email, your message will be added to the discussion below:
http://misterhouse.10964.n7.nabble.com/Custom-IA7-pages-with-direct-control-tp21468p21472.html
To unsubscribe from Custom IA7 pages with direct control?, click here.
NAML



View this message in context: Re: Custom IA7 pages with direct control?
Sent from the Misterhouse - User mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users




If you reply to this email, your message will be added to the discussion below:
http://misterhouse.10964.n7.nabble.com/Custom-IA7-pages-with-direct-control-tp21468p21474.html
To unsubscribe from Custom IA7 pages with direct control?, click here.
NAML

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Custom IA7 pages with direct control?

H Plato
In reply to this post by rickerdo
Sorry to resurrect this old thread, but I was thinking about ‘ slider for instance, to control something like a light dimmer or a volume control’. That was a good idea, so I’ve put together some slider support in my latest IA7 branch (IA7 v1.5.100). Bootstrap doesn’t have a native slider, but jquery does and it seems to fit the style of the modal. I’m still testing it, however if anyone else wants to give it a try and send me some feedback, I’d appreciate it.




On Oct 21, 2016, at 5:46 AM, rickerdo <[hidden email]> wrote:

Thanks for the quick fix! I have confirmed that the functionality works as expected using your changes, but shouldn't "direct_control" : "yes" in ia7_config.json be enough to darken the border of the button? It seems somewhat redundant defining "direct_control" in ia7_config.json AND adding the "btn-direct" class to the button. The button still works directly even when "btn-direct" is omitted, the border just isn't darkened.

Unrelated to my initial question, but still somewhat on topic:
 - Is it possible to use bootstrap components, like a slider for instance, to control something like a light dimmer or a volume control? How would such a thing tie to a MH object in HTML?
 - If you have a MH item with several states, is it possible to have each state of that item be a separate direct control button? I have a specific use case where I would like to have each input of my AV receiver be a separate button on a custom page in order to reduce the number of button clicks. 

On Thu, Oct 20, 2016 at 7:47 PM, H Plato [via MisterHouse] <<a href="x-msg://8/user/SendEmail.jtp?type=node&amp;node=21473&amp;i=0" target="_top" rel="nofollow" link="external" class="">[hidden email]> wrote:
OK, this now works in IA7 v1.3.600

You’ll need the direct_control entity definition in the ia7_config.json. and the btn-direct class to get the outline. I used this for my test purposes.

        <div class="col-sm-4">
                   <div style="vertical-align:middle">
                <button entity='app1' class='btn btn-default btn-lg btn-list btn-block btn-state-cmd btn-direct navbutton-padding'>TestApp1<span class='pull-right'>loading...</span>
                </button>
                </div>

 If would be great to get some testers of the new code. Merge in my ia7 branch (https://github.com/hplato/misterhouse)  and see if that change works for you.

On Oct 20, 2016, at 10:26 AM, Rick Reed <[hidden email]> wrote:

Awesome! I wasn't sure if I was missing something.

Once the changes are in place, would a button require any class definitions? Would the following be enough static HTML since the "entity" is defined?

<button entity='Garage'>Garage<span class='pull-right'>loading...</span></button>

<script>
  updateStaticPage();
</script>


Thanks for the quick response! 


On Thu, Oct 20, 2016 at 10:01 AM, H Plato <[hidden email]> wrote:
Good catch, the javascript routine for static pages doesn't have that component, just the modal. Should be an easy fix, I'll add it in.

Sent from my mobile device.

> On Oct 20, 2016, at 6:41 AM, rickerdo <[hidden email]> wrote:
>
> I'm in the process of trying to create a few custom pages in IA7 using direct
> control (no pop-up) of Insteon based light objects. No matter what I do, the
> static HTML page I create will not allow direct control. However, the same
> object in "Browse All Lights" does allow direct control (no pop-up).
>
> Any ideas why direct control works in an MH created page, but not my custom
> page? My custom page does show a heavier black border around the "Garage"
> button, but it still creates a pop-up when clicked, so I know the json is
> being parsed and is being applied.
>
> The results are the same on both master and stable branches.
>
> Thanks!
>
> My code:
> cat /home/mh/data/web/ia7_config.json
> {
>  "prefs" : {
>     "header_button" : "yes",
>     "state_log_show" : "yes",
>     "state_log_entries" : "4",
>     "always_double_buttons" : "yes",
>     "fp_icon_size" : "32",
>     "fp_state_popovers" : "yes",
>     "substate_percentages" : "20",
>     "disable_current_state" : "yes",
>     "notifications" : "yes",
>     "speech_default" : "banner"
>  },
>
>  "objects" : {
>    "Garage" : {
>      "direct_control" : "yes"
>    }
>  }
> }
>
>
> cat /home/mh/data/web/mypages/test2.shtml
> <div class="col-sm-4">
>  <div style="vertical-align:middle">
>    <button entity='Garage' class='btn btn-lg btn-block btn-list btn-popover
> btn-direct btn-state-cmd navbutton-padding
> btn-default'>Garageloading...</button>
>  </div>
> </div>
>
>
>
>
>
>
> --
> View this message in context: http://misterhouse.10964.n7.nabble.com/Custom-IA7-pages-with-direct-control-tp21468.html
> Sent from the Misterhouse - User mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> ________________________________________________________
> To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users
>



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users




If you reply to this email, your message will be added to the discussion below:
http://misterhouse.10964.n7.nabble.com/Custom-IA7-pages-with-direct-control-tp21468p21472.html
To unsubscribe from Custom IA7 pages with direct control?, click here.
NAML



View this message in context: Re: Custom IA7 pages with direct control?
Sent from the Misterhouse - User mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

Rob
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Custom IA7 pages with direct control?

Rob
This post was updated on .
What should I do to get the old (green) buttons back for all objects?  The slider control is too finicky on my 11.3 cm Android phone.  Tapping the slider at the new value you want works, but tapping on the square to drag it is more miss that hit.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Custom IA7 pages with direct control?

H Plato
In your ia7_config.json file, add a state_slider : no to the prefs section. You can also turn off sliders on the floorplan:


{
  "prefs" : {
     "state_slider" : “no",
     "floorplan_slider" : “no"
  }  
}

If you don’t have a ia7_config.json file, just create one in the same directory that your collections.json resides in.


> On Jul 29, 2017, at 12:24 PM, Rob <[hidden email]> wrote:
>
> What should I do to get the old (green) buttons back for all objects?  The
> slider control is too finicky on my 11.3 cm Android phone.  Tapping the
> slider works but on the square to drag it is more miss that hit.
>
>
>
> --
> View this message in context: http://misterhouse.10964.n7.nabble.com/Custom-IA7-pages-with-direct-control-tp21468p21887.html
> Sent from the Misterhouse - User mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ________________________________________________________
> To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users
>


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Custom IA7 pages with direct control?

H Plato
In reply to this post by Rob
I've been testing the slider on a amazon fire tablet and I see what you mean. I've increased the size to 32 pixels (same size as current buttons), and it works much, much better. I have some layout issues to solve and i'll update master.

The latest master has some fixes to modals and a few other improvements. Good to hear any other suggestions or bugs as we look to release 4.3 probably next week.

Sent from my mobile device.

> On Jul 29, 2017, at 12:24 PM, Rob <[hidden email]> wrote:
>
> What should I do to get the old (green) buttons back for all objects?  The
> slider control is too finicky on my 11.3 cm Android phone.  Tapping the
> slider works but on the square to drag it is more miss that hit.
>
>
>
> --
> View this message in context: http://misterhouse.10964.n7.nabble.com/Custom-IA7-pages-with-direct-control-tp21468p21887.html
> Sent from the Misterhouse - User mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ________________________________________________________
> To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users
>

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

Rob
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Custom IA7 pages with direct control?

Rob
This post has NOT been accepted by the mailing list yet.
Definitely an improvement for smaller screens.  Thank you.
Loading...