Custom Page Creation?

Goal: To create a page that I can bookmark for non-admin users that gives them control over certain devices in the home, but prevents them from making any damaging changes to the system.

  1. I am trying to do this in Chrome, but after creating a new page, the drag & drop doesn’t work at all. Bug? Not supported in Chrome?
  2. Is there an easy way to drag and drop some controllers to my page so they appear just like on the Devices page? (the link to the usage guide for ALTUI is broken)
  3. Is there a way to provide a link to this custom page (not the main AltUI dashboard) so they can bookmark it on their smartphones?

thanks!

[quote=“MSW, post:1, topic:190405”]Goal: To create a page that I can bookmark for non-admin users that gives them control over certain devices in the home, but prevents them from making any damaging changes to the system.

  1. I am trying to do this in Chrome, but after creating a new page, the drag & drop doesn’t work at all. Bug? Not supported in Chrome?
  2. Is there an easy way to drag and drop some controllers to my page so they appear just like on the Devices page? (the link to the usage guide for ALTUI is broken)
  3. Is there a way to provide a link to this custom page (not the main AltUI dashboard) so they can bookmark it on their smartphones?

thanks![/quote]

for 1) we need to investigate. I need ALTUI version, VERA version and an extract of all the message you have in the console javascript log for that ALTUI page at the moment you open the “UsePages” and try the drag and drop
2) not yet, someone asked for this but it does not sound really simple so in the “thinking” queue
3) the closest possible is to use a different opening url like:
http:///port_3480/data_request?id=lr_ALTUI_Handler&command=home&home=pageUsePages

[quote=“amg0, post:2, topic:190405”][quote=“MSW, post:1, topic:190405”]Goal: To create a page that I can bookmark for non-admin users that gives them control over certain devices in the home, but prevents them from making any damaging changes to the system.

  1. I am trying to do this in Chrome, but after creating a new page, the drag & drop doesn’t work at all. Bug? Not supported in Chrome?
  2. Is there an easy way to drag and drop some controllers to my page so they appear just like on the Devices page? (the link to the usage guide for ALTUI is broken)
  3. Is there a way to provide a link to this custom page (not the main AltUI dashboard) so they can bookmark it on their smartphones?

thanks![/quote]

for 1) we need to investigate. I need ALTUI version, VERA version and an extract of all the message you have in the console javascript log for that ALTUI page at the moment you open the “UsePages” and try the drag and drop
2) not yet, someone asked for this but it does not sound really simple so in the “thinking” queue
3) the closest possible is to use a different opening url like:
http:///port_3480/data_request?id=lr_ALTUI_Handler&command=home&home=pageUsePages[/quote]

Latest altUI version.
Is there any documentation at all on how to create a custom page? The link to the PDF isn’t working.
thanks!

[quote=“MSW, post:3, topic:190405”]Latest altUI version.
Is there any documentation at all on how to create a custom page? The link to the PDF isn’t working.
thanks![/quote]

you should find it toward the end of that file. could be a bit old but still ok more or less.
[url=http://code.mios.com/trac/mios_alternate_ui/export/1071/Docs/doc.pdf]http://code.mios.com/trac/mios_alternate_ui/export/1071/Docs/doc.pdf[/url]

[quote=“amg0, post:4, topic:190405”][quote=“MSW, post:3, topic:190405”]Latest altUI version.
Is there any documentation at all on how to create a custom page? The link to the PDF isn’t working.
thanks![/quote]

you should find it toward the end of that file. could be a bit old but still ok more or less.
[url=http://code.mios.com/trac/mios_alternate_ui/export/1071/Docs/doc.pdf]http://code.mios.com/trac/mios_alternate_ui/export/1071/Docs/doc.pdf[/url][/quote]

I found the bug - the UI lets you enter a page name with a space, but if you do that, the grey canvas doesn’t show up.

Now I have a different issue - I am trying to use the 2 state button tool to turn a heater on and off (thermostat device) but I can only succeed to get it to turn on. The button also doesn’t change color, so it seems the button thinks it is still off and keeps sending the On command only. How is the button supposed to know the state of the device to know if it is on or off? I see the place to specify Variable, but it doesn’t seem to be comparing the value of the variable with the Off and On properties I set. For a thermostat, I set on to ‘AutoChangeOver’ and Off is ‘Off.’ It send AutoChangeOver command and the device turns on, but the button stays the same and the next time I click it sends the same command again, never sends off.

[quote=“MSW, post:5, topic:190405”][quote=“amg0, post:4, topic:190405”][quote=“MSW, post:3, topic:190405”]Latest altUI version.
Is there any documentation at all on how to create a custom page? The link to the PDF isn’t working.
thanks![/quote]

you should find it toward the end of that file. could be a bit old but still ok more or less.
[url=http://code.mios.com/trac/mios_alternate_ui/export/1071/Docs/doc.pdf]http://code.mios.com/trac/mios_alternate_ui/export/1071/Docs/doc.pdf[/url][/quote]

I found the bug - the UI lets you enter a page name with a space, but if you do that, the grey canvas doesn’t show up.

Now I have a different issue - I am trying to use the 2 state button tool to turn a heater on and off (thermostat device) but I can only succeed to get it to turn on. The button also doesn’t change color, so it seems the button thinks it is still off and keeps sending the On command only. How is the button supposed to know the state of the device to know if it is on or off? I see the place to specify Variable, but it doesn’t seem to be comparing the value of the variable with the Off and On properties I set. For a thermostat, I set on to ‘AutoChangeOver’ and Off is ‘Off.’ It send AutoChangeOver command and the device turns on, but the button stays the same and the next time I click it sends the same command again, never sends off.[/quote]

thx for the bug, i will check

2 states button is a bit touchy to setup and this happens when the variable state value is inverted compared to the red green color. it all depends on the underlying device action upnp and you may need the 'inverted’checkbox.

here is an example where I needed it as I wanted it green when the phone was not muted ( Muted variable = 0 ) and red when it was.

To help the way to think about this is can you try to explain precisely :

  • what variable value should represent ON or OFF state
  • what is the action to go from ON to OFF state =>
  • what is the action to go from OFF to ON state =>
  • if you want the OFF state to appear red or green

[quote=“amg0, post:6, topic:190405”][quote=“MSW, post:5, topic:190405”][quote=“amg0, post:4, topic:190405”][quote=“MSW, post:3, topic:190405”]Latest altUI version.
Is there any documentation at all on how to create a custom page? The link to the PDF isn’t working.
thanks![/quote]

you should find it toward the end of that file. could be a bit old but still ok more or less.
[url=http://code.mios.com/trac/mios_alternate_ui/export/1071/Docs/doc.pdf]http://code.mios.com/trac/mios_alternate_ui/export/1071/Docs/doc.pdf[/url][/quote]

I found the bug - the UI lets you enter a page name with a space, but if you do that, the grey canvas doesn’t show up.

Now I have a different issue - I am trying to use the 2 state button tool to turn a heater on and off (thermostat device) but I can only succeed to get it to turn on. The button also doesn’t change color, so it seems the button thinks it is still off and keeps sending the On command only. How is the button supposed to know the state of the device to know if it is on or off? I see the place to specify Variable, but it doesn’t seem to be comparing the value of the variable with the Off and On properties I set. For a thermostat, I set on to ‘AutoChangeOver’ and Off is ‘Off.’ It send AutoChangeOver command and the device turns on, but the button stays the same and the next time I click it sends the same command again, never sends off.[/quote]

thx for the bug, i will check

2 states button is a bit touchy to setup and this happens when the variable state value is inverted compared to the red green color. it all depends on the underlying device action upnp and you may need the 'inverted’checkbox.

here is an example where I needed it as I wanted it green when the phone was not muted ( Muted variable = 0 ) and red when it was.

To help the way to think about this is can you try to explain precisely :

  • what variable value should represent ON or OFF state
  • what is the action to go from ON to OFF state =>
  • what is the action to go from OFF to ON state =>
  • if you want the OFF state to appear red or green[/quote]

explain precisely :

  • what variable value should represent ON or OFF state? On: ‘AutoChangeOver’ Off: ‘Off’
  • what is the action to go from ON to OFF state => SetModeTarget Off
  • what is the action to go from OFF to ON state => SetModeTarget AutoChangeOver
  • if you want the OFF state to appear red or green? Off should be Red (or no color). On should be green.

[quote=“MSW, post:7, topic:190405”]explain precisely :

  • what variable value should represent ON or OFF state? On: ‘AutoChangeOver’ Off: ‘Off’
  • what is the action to go from ON to OFF state => SetModeTarget Off
  • what is the action to go from OFF to ON state => SetModeTarget AutoChangeOver
  • if you want the OFF state to appear red or green? Off should be Red (or no color). On should be green.[/quote]

it feels standard configuration so maybe there is a crash.

1/ can you share a print screen of your button configuration dialog.
2/ can you place a simple action button for each action (SetModeTarget Off) and (SetModeTarget AutoChangeOver) and play with them ? does it change the device variable ( mode ? )

3/ also
a) try to go in use page mode,
b) open javascript console log ( Ctrl+Shift+J on chrome )
c) press on the on/off button , see what happens
d) press again a few sec later , see what happens
get me your console log messages.

thx

[quote=“amg0, post:8, topic:190405”][quote=“MSW, post:7, topic:190405”]explain precisely :

  • what variable value should represent ON or OFF state? On: ‘AutoChangeOver’ Off: ‘Off’
  • what is the action to go from ON to OFF state => SetModeTarget Off
  • what is the action to go from OFF to ON state => SetModeTarget AutoChangeOver
  • if you want the OFF state to appear red or green? Off should be Red (or no color). On should be green.[/quote]

it feels standard configuration so maybe there is a crash.

1/ can you share a print screen of your button configuration dialog.
2/ can you place a simple action button for each action (SetModeTarget Off) and (SetModeTarget AutoChangeOver) and play with them ? does it change the device variable ( mode ? )

3/ also
a) try to go in use page mode,
b) open javascript console log ( Ctrl+Shift+J on chrome )
c) press on the on/off button , see what happens
d) press again a few sec later , see what happens
get me your console log messages.

thx[/quote]

Are you certain your code is using the variables passed in to test state and not hard coded “On” and “Off”? I know that you are sending the variables correctly, but the button itself must reflect the state of the device based on the value and perhaps there you hard coded a check with On and Off?

[quote=“MSW, post:9, topic:190405”][quote=“amg0, post:8, topic:190405”][quote=“MSW, post:7, topic:190405”]explain precisely :

  • what variable value should represent ON or OFF state? On: ‘AutoChangeOver’ Off: ‘Off’
  • what is the action to go from ON to OFF state => SetModeTarget Off
  • what is the action to go from OFF to ON state => SetModeTarget AutoChangeOver
  • if you want the OFF state to appear red or green? Off should be Red (or no color). On should be green.[/quote]

it feels standard configuration so maybe there is a crash.

1/ can you share a print screen of your button configuration dialog.
2/ can you place a simple action button for each action (SetModeTarget Off) and (SetModeTarget AutoChangeOver) and play with them ? does it change the device variable ( mode ? )

3/ also
a) try to go in use page mode,
b) open javascript console log ( Ctrl+Shift+J on chrome )
c) press on the on/off button , see what happens
d) press again a few sec later , see what happens
get me your console log messages.

thx[/quote]

Are you certain your code is using the variables passed in to test state and not hard coded “On” and “Off”? I know that you are sending the variables correctly, but the button itself must reflect the state of the device based on the value and perhaps there you hard coded a check with On and Off?[/quote]

there are many years since I gave up in computer science to be certain of anything. and as I age, even less.

But my example that I shared with IPhone does not uses On Off but uses 1 or 0 and the url called when I press the button is correct so that should not be the problem.

http://192.168.1.16/port_3480/data_request?id=action&output_format=json&DeviceNum=94&serviceId=urn:upnp-org:serviceId:IPhoneLocator1&action=SetMute&[glow=red,2,300]newMuteStatus=1[/glow]

but it is a good point to open Chrome Network page and check the url that is called at the time you press the button. it should start with http://<yourip>/port_3480/data_request?id=action&output_format=json&DeviceNum=

[quote=“amg0, post:10, topic:190405”][quote=“MSW, post:9, topic:190405”][quote=“amg0, post:8, topic:190405”][quote=“MSW, post:7, topic:190405”]explain precisely :

  • what variable value should represent ON or OFF state? On: ‘AutoChangeOver’ Off: ‘Off’
  • what is the action to go from ON to OFF state => SetModeTarget Off
  • what is the action to go from OFF to ON state => SetModeTarget AutoChangeOver
  • if you want the OFF state to appear red or green? Off should be Red (or no color). On should be green.[/quote]

1/ can you share a print screen of your button configuration dialog.
2/ can you place a simple action button for each action (SetModeTarget Off) and (SetModeTarget AutoChangeOver) and play with them ? does it change the device variable ( mode ? )

3/ also
a) try to go in use page mode,
b) open javascript console log ( Ctrl+Shift+J on chrome )
c) press on the on/off button , see what happens
d) press again a few sec later , see what happens
get me your console log messages.

thx[/quote]

Are you certain your code is using the variables passed in to test state and not hard coded “On” and “Off”? I know that you are sending the variables correctly, but the button itself must reflect the state of the device based on the value and perhaps there you hard coded a check with On and Off?[/quote]

there are many years since I gave up in computer science to be certain of anything. and as I age, even less.

But my example that I shared with IPhone does not uses On Off but uses 1 or 0 and the url called when I press the button is correct so that should not be the problem.

http://192.168.1.16/port_3480/data_request?id=action&output_format=json&DeviceNum=94&serviceId=urn:upnp-org:serviceId:IPhoneLocator1&action=SetMute&[glow=red,2,300]newMuteStatus=1[/glow]

but it is a good point to open Chrome Network page and check the url that is called at the time you press the button. it should start with http://<yourip>/port_3480/data_request?id=action&output_format=json&DeviceNum=[/quote]

A separate button sending Off works fine.

As I suspected, this combo button is only sending:
http://192.168.0.200/port_3480/data_request?id=action&output_format=json&DeviceNum=9&serviceId=urn:upnp-org:serviceId:HVAC_UserOperatingMode1&action=SetModeTarget&NewModeTarget=AutoChangeOver

It never sends Off. The button never changes state to believe it is on. BTW, the console doesn’t record any messages after I clear away all the junk there from loading the page (I included that page load junk below)

Failed to decode downloaded font: https://maxcdn.bootstrapcdn.com/bootswatch/latest/fonts/glyphicons-halflings-regular.woff2
data_request?id=lr_ALTUI_Handler&command=home:1 OTS parsing error: Failed to convert WOFF 2.0 font to SFNT
data_request?id=lr_ALTUI_Handler&command=home:1 Failed to decode downloaded font: https://maxcdn.bootstrapcdn.com/bootswatch/latest/fonts/glyphicons-halflings-regular.woff
data_request?id=lr_ALTUI_Handler&command=home:1 OTS parsing error: incorrect file size in WOFF header
data_request?id=lr_ALTUI_Handler&command=home:1 Failed to decode downloaded font: https://maxcdn.bootstrapcdn.com/bootswatch/latest/fonts/glyphicons-halflings-regular.ttf
data_request?id=lr_ALTUI_Handler&command=home:1 OTS parsing error: incorrect entrySelector for table directory

[quote=“MSW, post:11, topic:190405”][quote=“amg0, post:10, topic:190405”][quote=“MSW, post:9, topic:190405”][quote=“amg0, post:8, topic:190405”][quote=“MSW, post:7, topic:190405”]explain precisely :

  • what variable value should represent ON or OFF state? On: ‘AutoChangeOver’ Off: ‘Off’
  • what is the action to go from ON to OFF state => SetModeTarget Off
  • what is the action to go from OFF to ON state => SetModeTarget AutoChangeOver
  • if you want the OFF state to appear red or green? Off should be Red (or no color). On should be green.[/quote]

1/ can you share a print screen of your button configuration dialog.
2/ can you place a simple action button for each action (SetModeTarget Off) and (SetModeTarget AutoChangeOver) and play with them ? does it change the device variable ( mode ? )

3/ also
a) try to go in use page mode,
b) open javascript console log ( Ctrl+Shift+J on chrome )
c) press on the on/off button , see what happens
d) press again a few sec later , see what happens
get me your console log messages.

thx[/quote]

Are you certain your code is using the variables passed in to test state and not hard coded “On” and “Off”? I know that you are sending the variables correctly, but the button itself must reflect the state of the device based on the value and perhaps there you hard coded a check with On and Off?[/quote]

there are many years since I gave up in computer science to be certain of anything. and as I age, even less.

But my example that I shared with IPhone does not uses On Off but uses 1 or 0 and the url called when I press the button is correct so that should not be the problem.

http://192.168.1.16/port_3480/data_request?id=action&output_format=json&DeviceNum=94&serviceId=urn:upnp-org:serviceId:IPhoneLocator1&action=SetMute&[glow=red,2,300]newMuteStatus=1[/glow]

but it is a good point to open Chrome Network page and check the url that is called at the time you press the button. it should start with http://<yourip>/port_3480/data_request?id=action&output_format=json&DeviceNum=[/quote]

A separate button sending Off works fine.

As I suspected, this combo button is only sending:
http://192.168.0.200/port_3480/data_request?id=action&output_format=json&DeviceNum=9&serviceId=urn:upnp-org:serviceId:HVAC_UserOperatingMode1&action=SetModeTarget&NewModeTarget=AutoChangeOver

It never sends Off. The button never changes state to believe it is on. BTW, the console doesn’t record any messages after I clear away all the junk there from loading the page (I included that page load junk below)

Failed to decode downloaded font: https://maxcdn.bootstrapcdn.com/bootswatch/latest/fonts/glyphicons-halflings-regular.woff2
data_request?id=lr_ALTUI_Handler&command=home:1 OTS parsing error: Failed to convert WOFF 2.0 font to SFNT
data_request?id=lr_ALTUI_Handler&command=home:1 Failed to decode downloaded font: https://maxcdn.bootstrapcdn.com/bootswatch/latest/fonts/glyphicons-halflings-regular.woff
data_request?id=lr_ALTUI_Handler&command=home:1 OTS parsing error: incorrect file size in WOFF header
data_request?id=lr_ALTUI_Handler&command=home:1 Failed to decode downloaded font: https://maxcdn.bootstrapcdn.com/bootswatch/latest/fonts/glyphicons-halflings-regular.ttf
data_request?id=lr_ALTUI_Handler&command=home:1 OTS parsing error: incorrect entrySelector for table directory[/quote]
I see. I did not plan for textual values for the variable. I ll have a look.

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

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[/quote]

No you don’t - they already tell you when they tell you what value to set it with. In my case Off means Off and AutoChangeOver means On. You don’t have to ask me since I already have you those values. No change to the UI.

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[/quote]

No you don’t - they already tell you when they tell you what value to set it with.[/quote]

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.

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[/quote]

No you don’t - they already tell you when they tell you what value to set it with.[/quote]

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.[/quote]

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.

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.

can you please try this beta for the onfoff button & let me know if that works ?
thx

[quote=“MSW, post:18, topic:190405”]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.[/quote]

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 )