Question about openHAB UI

Good morning,

does someone knows if there is a possibility to scan a qr code via the openhab ui? Or any other code, so you could make some sort of storage management (with some http backend, that I would script myself).

Thanks in advance.

Good morning, Patrik, this is an english speaking forum. Please, do you mind quickly translating your question?

btw, I would not know how you could use a widget to scan a QR code. @florian-h05 may have an idea because I know he did some interactive stuff with a sip device.

No problem, done. This would be a nice thing, so I could implement it all to openhab, as my phone with the openhab app is always in range.

This is completely out of scope what openHAB aims to be, so it will unlikely going to be implemented.

Edir: I have translated the topic title :wink:

Thank you for translating it, I forgot it…

I don’t think, that this is out of the scope of openHAB, I would say, this would be a feature also usable for other use-cases.

I totally disagree. openHAB is not a storage management system. This is the use case you mentioned.

That’s the example I made, but scanning a code and doing something with the information, can be totally useful in a home automation solution.

Agreed, but this had to be implemented into the native Apps, don’t see this as a server side (core or UI) feature.

No, this is not possible (yet) … it might be implemented at some point to allow scanning pairing codes, which currently have to be typed in, but it’s not supported yet.
You could try to put a QR code scanner library in $OPENHAB_CONF/html, so you can load it inside a widget from /static/…, but this requires a good amount of scripting inside the widget.

I know there are at least a couple different QR code → MQTT solutions out there. If I were trying to do this, I would just use a web-frame to include one of those options on an OH page and then use an MQTT topic to get the required information into OH.

1 Like

You can scan QR codes in JavaScript - see for instance https://scanapp.org and GitHub - mebjas/html5-qrcode: A cross platform HTML5 QR code reader. See end to end implementation at: https://scanapp.org - so it could be added to the UI and could eventually update an item with the result (what you do with it though is your choice through rules), but it needs to have a practical usage for smart homes, or it’s just cramming in another feature.

It’s tangential at best, but I’ve visited a place where they had QR code stickers near the physical switches in every room - apparently you could scan those with your phone (when on their internal network and Wi-Fi) and get to a web page where you could control the equipment in the room.

If you design individual pages for rooms in the Main UI, maybe it would be a nice idea to have a feature to generate such QR codes that you could print on a label?