We have moved at community.getvera.com

Author Topic: Custom Page Creation?  (Read 6791 times)

Offline amg0

  • Moderator
  • Master Member
  • *****
  • Posts: 3174
  • Karma: +209/-8
Re: Custom Page Creation?
« Reply #15 on: January 06, 2016, 06:24:40 am »
Thanks. Should be easy enough to change the variable type.
it is not a question of type, it is a question of which values means what, meaning I am going to have to ask the user to tell what text is considered a "on" value and what text is considred to be a 'off' value,  so 2 new parameters in the widget dialog box

No you don't - they already tell you when they tell you what value to set it with.

I thought about that too but no, i cannot assume the parameter of the set actions for ON is the same as the value of the variable for ON. This is a special case here. in some situations that would not be true , the state of the button would be a variable with a particular value but to change this state it would be a different parameter in the upnp action, or even could be toggle() action without any paremters, etc ... . 

so it has to be a more generic solution than that and I have to ask the user to confirm the values for ON & OFF state.


Offline MSW

  • Full Member
  • ***
  • Posts: 114
  • Karma: +6/-6
Re: Custom Page Creation?
« Reply #16 on: January 06, 2016, 06:29:20 am »
Thanks. Should be easy enough to change the variable type.
it is not a question of type, it is a question of which values means what, meaning I am going to have to ask the user to tell what text is considered a "on" value and what text is considred to be a 'off' value,  so 2 new parameters in the widget dialog box

No you don't - they already tell you when they tell you what value to set it with.

I thought about that too but no, i cannot assume the parameter of the set actions for ON is the same as the value of the variable for ON. This is a special case here. in some situations that would not be true , the state of the button would be a variable with a particular value but to change this state it would be a different parameter in the upnp action, or even could be toggle() action without any paremters, etc ... . 

so it has to be a more generic solution than that and I have to ask the user to confirm the values for ON & OFF state.

I don't think you need to solve a problem that doesn't exist - plus you are adding complexity to the setup. Both in your case and in my case, re-using the values works fine. That would already make it much more powerful that it currently is and is not complex. You are correct that there could be a case where the values are different but I'm not sure adding the complexity and spending your time is worth it to solve for that scenario. It may not even exist. Of course, it is your decision.

Offline MSW

  • Full Member
  • ***
  • Posts: 114
  • Karma: +6/-6
Re: Custom Page Creation?
« Reply #17 on: January 08, 2016, 02:07:58 am »
Firstly, thanks for working towards fixing this.  I downloaded the latest version and input the additional settings for On and Off.  Now, when I click on, not only does the heater turn on, but the device recognizes it is on (the icon also shows the word "on" in the corner*)!  Unfortunately, when I click Off, it is still sending the 'On' command (checked in Chrome network), so the device never turns off.  I added a screenshot. 

It seems you can override the default device icon (as it seems you did by adding the on/off text).  The thermostat device already shows on/off because the icon color changes depending on what mode it is in, so you can probably remove that. 
« Last Edit: January 08, 2016, 02:45:12 am by MSW »

Offline amg0

  • Moderator
  • Master Member
  • *****
  • Posts: 3174
  • Karma: +209/-8
Re: Custom Page Creation?
« Reply #18 on: January 08, 2016, 02:55:24 am »
Firstly, thanks for working towards fixing this.  I downloaded the latest version and input the additional settings for On and Off.  Now, when I click on, not only does the heater turn on, but the device recognizes it is on (the icon also shows the word "on" in the corner*)!  Unfortunately, when I click Off, it is still sending the 'On' command (checked in Chrome network), so the device never turns off.  I added a screenshot. 
can you please try this beta for the onfoff button & let me know if that works ?
thx

Offline amg0

  • Moderator
  • Master Member
  • *****
  • Posts: 3174
  • Karma: +209/-8
Re: Custom Page Creation?
« Reply #19 on: January 08, 2016, 02:56:59 am »
Firstly, thanks for working towards fixing this.  I downloaded the latest version and input the additional settings for On and Off.  Now, when I click on, not only does the heater turn on, but the device recognizes it is on (the icon also shows the word "on" in the corner*)!  Unfortunately, when I click Off, it is still sending the 'On' command (checked in Chrome network), so the device never turns off.  I added a screenshot. 

It seems you can override the default device icon (as it seems you did by adding the on/off text).  The thermostat device already shows on/off because the icon color changes depending on what mode it is in, so you can probably remove that.

I apologize, I inadvertently modified your post ( I have the moderator right ? ) and I think I removed a piece of it. can you please repost . ( sorry )

Offline MSW

  • Full Member
  • ***
  • Posts: 114
  • Karma: +6/-6
Re: Custom Page Creation?
« Reply #20 on: January 08, 2016, 03:49:33 am »
Firstly, thanks for working towards fixing this.  I downloaded the latest version and input the additional settings for On and Off.  Now, when I click on, not only does the heater turn on, but the device recognizes it is on (the icon also shows the word "on" in the corner*)!  Unfortunately, when I click Off, it is still sending the 'On' command (checked in Chrome network), so the device never turns off.  I added a screenshot. 
can you please try this beta for the onfoff button & let me know if that works ?
thx

How do I apply it?  I don't see where to upload in AltUI.

Offline amg0

  • Moderator
  • Master Member
  • *****
  • Posts: 3174
  • Karma: +209/-8
Re: Custom Page Creation?
« Reply #21 on: January 08, 2016, 03:58:12 am »
Firstly, thanks for working towards fixing this.  I downloaded the latest version and input the additional settings for On and Off.  Now, when I click on, not only does the heater turn on, but the device recognizes it is on (the icon also shows the word "on" in the corner*)!  Unfortunately, when I click Off, it is still sending the 'On' command (checked in Chrome network), so the device never turns off.  I added a screenshot. 
can you please try this beta for the onfoff button & let me know if that works ?
thx

How do I apply it?  I don't see where to upload in AltUI.
in UI5 in UI7  : Apps / develop / Luup Files & do the file upload there

Offline MSW

  • Full Member
  • ***
  • Posts: 114
  • Karma: +6/-6
Re: Custom Page Creation?
« Reply #22 on: January 08, 2016, 04:07:57 am »
Firstly, thanks for working towards fixing this.  I downloaded the latest version and input the additional settings for On and Off.  Now, when I click on, not only does the heater turn on, but the device recognizes it is on (the icon also shows the word "on" in the corner*)!  Unfortunately, when I click Off, it is still sending the 'On' command (checked in Chrome network), so the device never turns off.  I added a screenshot. 
can you please try this beta for the onfoff button & let me know if that works ?
thx

How do I apply it?  I don't see where to upload in AltUI.
in UI5 in UI7  : Apps / develop / Luup Files & do the file upload there

Yep, that fixed it.  Thanks!

Offline MSW

  • Full Member
  • ***
  • Posts: 114
  • Karma: +6/-6
Re: Custom Page Creation?
« Reply #23 on: January 08, 2016, 04:40:53 am »
I made a mistake in my post above.  I thought you overrode the default icon, but this was my mistake (due to my layout on my custom page).  You add the text to the On/Off button below it.  Would it be possible to move that text onto the button itself or to remove it altogether?  It takes up space on the screen and isn't really needed.

thanks!

Offline amg0

  • Moderator
  • Master Member
  • *****
  • Posts: 3174
  • Karma: +209/-8
Re: Custom Page Creation?
« Reply #24 on: January 08, 2016, 04:53:18 am »
I made a mistake in my post above.  I thought you overrode the default icon, but this was my mistake (due to my layout on my custom page).  You add the text to the On/Off button below it.  Would it be possible to move that text onto the button itself or to remove it altogether?  It takes up space on the screen and isn't really needed.

thanks!
if you do not want the text, you can leave the label properties empty, I think that should work