webbutton

6 views
Skip to first unread message

David

unread,
Feb 4, 2018, 3:24:37 AM2/4/18
to pytomation
What interfaces do you use the new webbutton device with? It seems to be a simple device that only has on, off, and status.

If it's used for something like lights, I think you should just use the light device and limit the commands for the device, or add security to limit the command for a specific user. I have examples for both use cases in the dopeyrealm instance. Or you could just change the interface to use the "Compact" view, which only allows you to toggle and adjust the level of lights and doesn't display the extra commands.

George Farris

unread,
Feb 4, 2018, 10:59:01 AM2/4/18
to pytom...@googlegroups.com
The webbutton I use with the Android app. It's just a Generic but I can select webbutton and not have 34 generics to scroll through on a mobile app. It was annoying. This way I see the two buttons I have configured and can operate them immediately. It's really a UI ease of use thing for me. I'm wondering now if the user code you contributed would do the same thing, I haven't tried it yet. Does it hide all the UI elements the user doesn't have rights to?

George

On Sun, 2018-02-04 at 00:24 -0800, David wrote:
What interfaces do you use the new webbutton device with? It seems to be a simple device that only has on, off, and status.

If it's used for something like lights, I think you should just use the light device and limit the commands for the device, or add security to limit the command for a specific user. I have examples for both use cases in the dopeyrealm instance. Or you could just change the interface to use the "Compact" view, which only allows you to toggle and adjust the level of lights and doesn't display the extra commands.

--
You received this message because you are subscribed to the Google Groups "pytomation" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pytomation+...@googlegroups.com.
To post to this group, send email to pytom...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

David Heaps

unread,
Feb 4, 2018, 1:12:59 PM2/4/18
to pytom...@googlegroups.com
The Android app and the web app are pretty much the same thing. I was actually considering removing the Android app, but I'm starting to see a use, for users that aren't running the latest Android, with the lastest Chrome, with verified SSL configured in Pytomation.

I'm still a little confused on the implementation. How do you use this to prevent the 34 Generics from displaying? Generics should still list in the app, and, while in the compact view, allow only toggle for that device.

Yes, the security hides all devices by default, you have to add them to the user object. Commands are all displayed by default, but you can override. Example (bathroom light overrides commands, by adding the command list, in a tupil):

u_david = User(username='David', password='ASecretPass', accessible_devices = [
    hall_thermostat,
    d_front_door,
    l_backporch,l_frontporch,
    l_kitchen_recessed,l_kitchen_back,l_kitchen_faucet,
    f_bathroom,(l_bathroom, [Command.OFF, Command.ON]), #Restricting bathroom light commands to only on and off, for this user only (note: disables toggle)
    l_foyer,
    l_hallway,
    l_master_bathroom,l_master_faucet])

On Feb 4, 2018 7:59 AM, "George Farris" wrote:
The webbutton I use with the Android app. It's just a Generic but I can select webbutton and not have 34 generics to scroll through on a mobile app. It was annoying. This way I see the two buttons I have configured and can operate them immediately. It's really a UI ease of use thing for me. I'm wondering now if the user code you contributed would do the same thing, I haven't tried it yet. Does it hide all the UI elements the user doesn't have rights to?

George

On Sun, 2018-02-04 at 00:24 -0800, David wrote:
What interfaces do you use the new webbutton device with? It seems to be a simple device that only has on, off, and status.

If it's used for something like lights, I think you should just use the light device and limit the commands for the device, or add security to limit the command for a specific user. I have examples for both use cases in the dopeyrealm instance. Or you could just change the interface to use the "Compact" view, which only allows you to toggle and adjust the level of lights and doesn't display the extra commands.

--
You received this message because you are subscribed to the Google Groups "pytomation" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pytomation+unsubscribe@googlegroups.com.

To post to this group, send email to pytom...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "pytomation" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pytomation+unsubscribe@googlegroups.com.

George Farris

unread,
Feb 4, 2018, 7:47:55 PM2/4/18
to pytom...@googlegroups.com
Well when the android app runs, I used to select Generics because that was what I used for a button
For example:

away = Generic(name='Set when away')
dooropen = Generic(name="Set for door alarm")

but I also have 29 other Generics so when I would select "Generic" on the left side of the app I would then have to scroll way down to to the button I wanted to press.

With this I select WebButton and only see 2 buttons in the UI, very handy.

away = WebButton(name='Set when away')
dooropen = WebButton(name="Set for door alarm")

George

David

unread,
Feb 18, 2018, 6:30:59 PM2/18/18
to pytomation
Thinking about it, I think the room functionality might have also worked for your use case. If you add devices to rooms, only those devices will be shown in the web app, when filtered by that room, in the web app.

But Pytomation was also built to allow exactly what you did too and I think it's a good example of how you can very easily customize the system.

Reply all
Reply to author
Forward
0 new messages