Is there a way to identify which device a user is using teh MAin UI on?
For example, I wish to set up wall panels it would be useful to know if the panel is in the living room or a bedroom so that the widgets could display shortcuts to specific lighting or heating options for the location without having to choose from a menu. If I am using my phone then I could be anywhere so I woudl be presented with more general choices.
I can get information about the screen in use (gives me a clue about phones) but it appears not about the specific device. An IP address would do, or some unique identifier for the hardware.
There is no default way to do this. However you can do this fairly easily if you create specific users for each of the devices you want to identify. There is a user object that is available in the widget expressions that corresponds to the logged in user:
So, if you create a user with the name kitchen-tablet and log in with that user only on that device you can customize what the MainUI displays on that device using expressions such as:
That’s a good idea but I think I can only do that in a browser yes? I can’t open a specific page in the app, which is what I’d want to do on a tablet or phone. Actually, that’s a thought; perhaps a kiosk broswer is the way to go on a tablet that is meant to be a permanent Openhab display. I hadn’t thought of that.