Best Practices for Managing OpenHAB with a mobile phone

For me, openHAB is a hobby, recreation and therefore rather the opposite of desk and PC. I know that a PC works much better but I like to optimize my openHAB installation lying on the couch. I would like to know if there are others like me and what are your tips about fiddling around with openhab on the phone.
[Info: I update this post so that it reflects the knowledge gained and in particular does not contain any incorrect information. This skews the flow of the discussion a bit, but I think it’s acceptable for better providing information]
So, now to my experiences:
First: The browser:
If you don’t have to touch code within your rules you can use almost any browser, but if you want to copy and edit code then only browsers with the old Gecko renderer (<2020) work well, e.g. Icecat (available at the fdroid archive) or Firefox before v79. Attention: only use those for your openhab, not for everyday internet due to security risks of outdated browsers.

Renderer Usability
Code Editor
log viewer
a Nightmare
works nomal good
Firefox (>= v79)
GeckoView really bad works nomal good
Icecat Mobile
Firefox (<= v68.11)
Gecko copying works fails: page is empty good

Then: SSH client:
I use JuiceSSH to communicate via terminal, but typing extensively is no fun as 120 characters/line is a bit difficult on the phone (but openhabian-config works).
I start and stop openHAB and boot the Raspi using RaspiCheck. Here you can create your frequently used command sequences and simply start them with a tap. If someone’s interested I can give examples.
I usually use Total Commander with LAN plug-in. You might need an additional smb-share to see the whole directory. When a file is opened in QEdit you can directly edit and save back (if the permissions fit).

And finally if you have an MQTT-Server running then MQTT Snooper is a great tool to show you the exact messages exchanged.
Do you have anything to share how to work best with openHAB on the mobile phone?

I can confirm this in Chrome and Brave on Android too.

I’m the opposite. I’d rather have a monitor, mouse and a keyboard than a mobile app when I’m configuring complex systems and devices. Mostly because I dislike touchscreen keyboards.

Mobile browsers are not as fully featured as desktop browsers, which is why many websites work great on PCs and horribly on phones/tablets. It used to be that every web browser on an iOS device uses the Safari rendering engine (even Chrome), and every web browser on Android uses the Chrome rendering engine. However, that may have changed in recent years (I haven’t been paying attention). Either way, they’re still going to be less capable than their desktop versions.

The big thing now is to develop websites that prioritize the mobile experience and universal accessibility. Basically, design to the limitations of mobile browsers and people who use assistive technologies (e.g. screen readers), which virtually ensures that they’ll work on desktop browsers. I’m not a developer, but I’m doubtful that this was the case with MainUI. It’s generally been understood that you’re going to want/need a computer to set up openHAB.

Yeah, that’s why I dislike touchscreen keyboards. The only way around this is to get a Bluetooth keyboard to use with your phone. I’ve tried that for other things, and find that it only works if I also have a mouse. Otherwise, I’m constantly reaching back and forth between the screen and keyboard.

I’m doubtful that you could do any more than you’re already doing with a phone. If anything, I’d recommend getting a Chrome OS tablet like the Lenovo Chromebook Duet. That would give you a fully featured web browser (as good as any desktop browser), portability so that you can hang out on your couch, and a detachable keyboard with a trackpad. You can install Android apps such as RaspiCheck, and also install Chrome browser extensions for editing text files on your remote server and for SSH.

Have you tried it in the Android app? It might work better.

For rules built on a phone screen I’d stick to Blockly which is graphical and drag-and-drop. That should work much better on a phone screen.

I’ve never tried to write rules on my phone. I can’t imagine a more miserable experience than trying to write code on a phone even if everything else worked as it should. And this is as someone who writes most of these posts on the forum from his phone.

I have to agree to all of you: The PC is more comfortable and a lot faster for writing rules. But late on the couch while watching TV I don’t wanna pick up a PC or a tablet and still got an idea how some rule could be improved…
I tried Android app but it doesn’t work cause it uses chromium, too.

I found another promising candidate: Icecat is the GNU version of firefox and it’s based on gekko instead of chromium. It’s still available e.g. via fdroid. The first tries were successful. I keep testing…

I just make a note to try something later and then go back to watching TV. Or I go to my desk and mess around with OH until suddenly realizing it’s 2am. :wink:

Either way, I’m going to avoid the browser, screen, and interface limitations of a mobile device.

Me too, and I’ve often been frustrated because I’ve wanted to give someone a working example from my own setup but just can’t copy/paste from the Code tab without massive frustration.

I’m interested to hear how this goes. I would have thought that Firefox uses the same rendering engine though?

I’ll only write short posts with no code on my phone, because it’s exhausting trying to edit text with a touchscreen. I should really start using voice dictation more than I do, as it actually works pretty well in GBoard.

This is just a suggestion of how to solve the problem as you seem to be happy to edit on a phone.

I would get extremely frustrated.

You could host code server in docker and access the VS via the browser on your phone.

This would mean using text based rules but it seems you are already doing that rather than GUI ones.

1 Like

I digged a little bit deeper and tested a bit more. Here is what I found out what might help if you use openhab on the phone.
Firefox uses GeckoView for rendering and that really doesn’t work for editing code.
The actual free (!) version Iceraven has similar problems, probably using the same engine.
Icecat is discontinued since two years but it used the old gecko renderer. I would strongly recommend not using it for everyday browsing but I don’t see a problem as a tool only to access openhab rules. So this is my recommendation as for simple actions in the code it works much better than all the others.
Copy& paste of several lines really worked reliable.

Don’t get me wrong: Writing code is no fun on the phone for many reasons and handling openhab in general works better on the PC.
But sometimes it’s handy if one can make a small change or copy some code from a rule with the phone or tablet (thanks for the hints).
At the moment I have a mixture of everything: DSL, javascript, rules from marketplace (great thing, thanks for your content Rich!), NGRE. Havn’t tried Blockly a lot but this seems to be promising, too (and then my kids could write their own rules).

1 Like

Have you tried it in the Android app? It might work better.

Yes I tried the openhab app and HABPanelViewer but probably both use GeckoView. As soon as you open a bigger rule in the editor the app freezes. As stated above only IceCat or Firefox <v79 work.

I finally started creating some rules with Blockly and I have to say this is definitely by far the best method to work with rules on the mobile phone.
The Blockly add-ons from the marketplace are really great and cover most of the stuff that I do with rules: Timers, persistence, cache, triggeringItems, Telegram messages… Really a lot of cool stuff is now available, (I guess mostly because of the great work of Stefan Hoehn.) Never thought I would like this kind of programming but I really have to say it’s fun.