Dashboard on 320 by 240 screen

Hi,

Really enjoying this so far, trying to use NR with Home Assistant for home autiomation.

I am looking to install switchplates in place of light sockets. I am running PI Zeros with 320x240 screens. I would like to know how to customise the dashboard widgets if possible to make them more small screen friendly, in particular to have slider with a wider target area, about finger width.

As a second problem, nothing to do with NR, I'm finding that Chrome has a minimum window size limitation which means it's always off the side and bottom of the framebuffer. One workaround would be to be able to position the groups precisely in the vewport. At the moment they are always centred, meaning that on the display they are over to the right and not fully showing.

Any other suggestions about chrome/PI desktop welcome, like having a higher res which is downscaled to the screen's native res. Or maybe there's another browser more suitable. I would like to control the browser remotely and even have it act as an MQTT sensor later maybe.

Cheers!

I will answer my own question in case it helps anyone else later

By moving over to Firefox on the Pi, I could solve these things via userChrome.css and userContent.css.

Firefox lets you override the chrome css so I could control the window minimum width easily there.

I also like userContent.css modifications locally in each dashboard screen, so I can customise the screen elements according to the device. So in my small screen device I just do things like:

md-slider .md-track-container {
  height: 60px !important;

}

1 Like

Did you see this post from 5 days ago?

Could you make that work for you?

Thanks, just tried it. Unfortunately it doesn't override wherever the minimum size limit is set. I guess there is no way around this because chrome/chromium doesn't have the same capability of allowing the chrome style to be overridden as Firefox.

No worries, I am pretty happy with the appearance now.

Actually I have NR running locally on the PI of the switch not on HA anymore, because I hadn't understood there is only one dashboard per NR. It's booting into Firefox in kiosk mode and looking fantastic, just talking to the MQTT broker rather than HA. This way I can also do stuff with the buttons because I can read the GPIO state.

This is the ultimate switchplate solution for me, after 2 weeks of looking at every possible option. About ÂŁ10 for the screen and the PI zero combined, plus the cost of a PSU and printed case, so <ÂŁ15, super smart switch, with UI based programming, lots of other options available with GPIO and sound i/o

1 Like

Which screens are you using to get to that price ?

Is the kiosk mode command line options for Firefox the same as for Chromium?

Similar

firefox -kiosk http://192.168.0.114:1880/endpoint/ui/
chromium-browser --incognito --kiosk  http://192.168.0.114:1880/endpoint/ui/
1 Like

1 Like

I needed some more options with Chromium, I'm wondering if I'd need equivalent ones for Firefox. Chromium is working wonderfully on my Pi3 with the 800x480 "official" touch screen, so I've no motivation to switch to Firefox at present, but I like to learn about possible alternatives.

I launch it from a shell script from node-red with an startup injection node:
pi@PiTouch:~ $ cat kiosk.sh
DISPLAY=:0 /usr/bin/chromium-browser --app http://localhost:1880/ui
--kiosk
--window-size=800,450
--window-position=0,0
--disable-infobars
--incognito
--disable-session-crashed-bubble
--disable-features=RendererCodeIntegrity
--process-per-site
--bwsi
--disable-cache
--noerrdialogs
--no-first-run
--fast --fast-start
--check-for-update-interval=31536000
--disable-gl-error-limit
--aggressive-cache-discard
--simulate-critical-update
--user-agent="Mozilla/5.0 (X11; CrOS armv7l 11895.95.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.125 Safari/537.36"
--autoplay-policy=no-user-gesture-required &

I need more than 320x240 pixels as the purpose it to be able to zoom in on the most recent "alert" image from my AI alarm system "person detection" to make a quick "friend or foe" determination The pinch-zoom feature really works well.

I'm getting ready to play with some Tasmota controlled RGB LED lights and a few controllers like this on a few PiZeroW could really be nice.

Thanks for the info.