Skip to content

Repository files navigation

neohab

neohab

A modern UI for openHAB. Modern web dashboards with mobile devices and tablets as first class citizens, built and configured entirely in the browser. Status: stable, latest release 1.38.0. A community project, not an official openHAB UI.

Requirements

  • openHAB 4.1 or newer, including 5.x: everything works. One jar covers every version

  • openHAB 3.1 to 4.0: supported, with some disabled features: see end of readme

  • openHAB 3.0 and older cannot run at all, the add-on interface neohab uses didn't exist yet

  • A browser from 2023 or later: Chrome or Edge 111, Safari 16.4, Firefox 121. Older browsers are shown a warning instead of rendering broken pages

  • A persistence service for charts, timelines, sparklines and trends: rrd4j, InfluxDB, JDBC and the in-memory service all work. MapDB stores only each item's last value, so there is no history to draw, and the widgets say so

  • Nothing else. Only openHAB's public REST and SSE APIs. No server-side code of ours, no account, no cloud. The only possible outside service neohab can call is Open-Meteo, and only once you put a weather widget on a dashboard and chose Open-Meteo as the data source, instead of local items

  • HTTPS for two things only: keeping a screen awake, and the microphone for voice input. Modern browsers will not allow those over HTTP

Install

  1. Download the jar from the releases page
  2. Drop it into openHAB's addons/ folder (/usr/share/openhab/addons)
  3. It's picked up in a few seconds, no restart. openhab.log says Started neohab at /neohab
  4. Open http://your-server:8080/neohab/ and sign in as an openHAB administrator

There is a five-minute guide in the add-on, linked from the welcome screen and served at /neohab/docs/getting-started.html

Upgrading: delete the old jar, wait for it to stop, then copy the new one in. Don't keep the old one beside the new one, openHAB keeps whichever it read last and logs a warning, so you can end up still running the old version with nothing obvious to show for it. Open tabs offer to reload themselves

Removing it: Just delete the jar. Dashboards stay in openHAB's JSON database under the three neohab:* namespaces, so putting the jar back brings everything with it.

Widgets


Button
Send a command, toggle an item, or jump to another dashboard. Eight finishes, a card or a sliding-switch look, and an icon that can change with the state

Slider
Set a dimmer or any number. It will not jump back under your finger while the device or rules catch up, like HABPanel sliders everyone has fought with. Five looks, across or upright

Dial
Round control in six looks, from a plain knob to an LED ring. Coloured zones, markers, an alarm band, a history ring, and a second item on the same face

Colour
Hue, saturation and brightness on one tile. On puts the lamp back to the brightness it was last used at, instead of blasting it to full

Selection
A set of commands as buttons or a dropdown. It reads the item's own options when it has them, or you type your own list

Stepper
Up and down by a step you pick, or around a list of values, in six looks. Volume, fan speed, a setpoint, AV inputs, etc

Thermostat
Room and setpoint on one face, with heat and cool, fan and aux heat. Reads the room at the precision your setpoint steps in

Rollershutter
Up, stop and down, with the position underneath. No position slider to catch, here or in the detail view, because that's a real door moving

Player
Previous, play or pause, and next, for any Player item

Label
Fixed text to title a row or break a dashboard into groups. Plain, in a pill, or in a box

Value
One reading, drawn eight ways: plain, stat, sparkline, split, bar, segment, pill or hero. The sparkline and the trend arrow come from your persistence service

Battery
Display a value as a battery in eight styles, coloured by how low it is, with a charging item for the bolt, and custom value scaling

Compass
Wind or any bearing on a compass, with a second item, usually the speed, in the middle

Clock
Analog or digital, with the date, extra time zones if desired, and either the device's clock or the server's.

Weather
Conditions, hours and days from Open-Meteo - no account or API key needed. Or source data from your own items if a binding already fetches them. Three layouts and a choice of forecast model

Floor plan
Your plan with your lights on it, each glowing in the colour and brightness it's actually at. Tap one to control it - Create overall lighting presets and scenes you save become openHAB rules any panel or wall switch can run

Chart
History from your persistence services: multiple items, two axes, thresholds, period picker, new values drawn as they arrive. Also groups by hour, weekday or month, or draws a heatmap

Timeline
What was on and when, as coloured bands. You pick the colour for each state

Camera
go2rtc, Frigate or a plain URL feed, over WebRTC, MSE, HLS, MJPEG or snapshots. Works down the list until one connects, and drops the stream when the tile is off screen so no burning CPU

Image
Any image by URL, refreshed on a timer: camera snapshots, radar maps, plans, graphs etc

Frame
Any web page, with a refresh timer and a sandbox switch for pages you don't fully trust

Log
openHAB's log and its event bus live, filtered by level, logger or text, with a pause and a full-screen view. Needs openHAB 4.1 or newer

Template
Your own HTML with {{ }} expressions and the same helpers HABPanel had, so its custom widgets come across. For real code there is an opt-in sandboxed JavaScript widget

Long-press or right click any widget, and you'll get a full details page with the current value, when it last changed, recent history graph and that widget's own full-size control options

Sliders, colour pickers and dials command the device as you drag them, a few times a second, so you see the level you're setting take effect as you set it. Can be turned off for the whole install or per widget if your lighting items (Hue etc) don't like fast updates

Dashboards

Add and arrange your widgets on a dash: drag to move or resize, drag in from the palette, select multiple widgets by clicking and dragging, copy and paste between dashboards or on the same dashboard with ctrl+c ctrl+v, undo anything. What you see while editing is what a save produces.

Phones and portrait tablets get a single-column stack you can reorder on its own without affecting landscape / full size displays, and there's an optional tablet layout with its own column count. Any widget can be left off any of the three. Text and icons scale with the tile, and with per-dashboard, per-widget and per-device settings.

A lot of effort was spent ensuring that regardless of the device / screen / orientation you open your dashboards on, the layout and sizing does what's needed to maintain layout and visibility - smart text, icon, and widget resizing, so nothing is ever cut off or clipped. Settings to further optimize this also exist: per device scaling / text size overrides, per dashboard overrides, per widget overrides.

You can optionally have neohab create dashboards for you, from your semantic model if you have one, otherwise by naming convention or group. Everything it picks and puts together is listed for review first.

Theming

Sixteen themes ship with it, seven of them ports of HABPanel's. The editor previews as you type, explains every design token, checks whether your colours can actually be read, and validates a custom stylesheet. Themes are global to the neohab instance unless you pin one to a single device, and they travel with your backups. See Making a theme.

If a theme ever makes the app unusable or invisible, add ?theme=none to the address to load with the default one for that page load to recover.

Running it

  • Wall panels - Installable as an app from your mobile browser (Android, iOS is currently untested) with an offline shell, able to keep the screen awake, with a per-device pinned dashboard, idle blanking and a kiosk mode. Adding a dashboard to a home screen pins that dashboard, so several shortcuts can sit side by side. A dashboard-control item lets your rules switch what every panel shows
  • Visitors - Devices not signed in get a read-only panel: controls still work, configuration does not. That's openHAB's default posture, same with HabPanel
  • Voice and audio - openHAB's Web Audio sink plays through the browser, a speech item announces changes, and a microphone button sends spoken commands to the interpreter
  • Backups - Export and import the whole configuration as a single JSON file, or a single dashboard, widget or theme on its own
  • Change Tracking - A restore point is taken before each change you make in neohab, the last twenty-five are kept by default, and you can see what changed field by field, and roll back to whatever point you wish
  • Languages - English, German, Spanish, French, Italian, Dutch and Polish, from the browser language with a per-device override

Coming from HABPanel

Settings › Migrate from HABPanel imports your HABPanel dashboards completely, either from the OpenHAB install or from a habpanel-config.json export you can upload. Widgets, layout, icons and dashboards are mapped, all seven of HABPanel's themes have a port here (the originals are by Yannick Schaus and the openHAB contributors), and custom AngularJS templates arrive as neohab template widgets. You get a report of what came over cleanly, what was approximated and what needs a look, and nothing is written until you've seen it and approved.

additional_stylesheet_url is the one thing that cannot come across, because its selectors are HABPanel's. The theming guide has the table to translate it.

Behind a reverse proxy

Don't buffer the event stream, or live values arrive in bursts or not at all:

location / {
  proxy_pass http://localhost:8080/;
  proxy_set_header Host $host;
  proxy_http_version 1.1;
  proxy_buffering off;      # the item-state stream is server-sent events
  proxy_read_timeout 3600s;
}

Two things are worth knowing if you move to HTTPS. The certificate has to be one the browser trusts, or the app will read fine but will not install as an app. And an http:// camera, frame or image cannot load into an https:// page: browsers block it silently, so neohab says so on the widget and in its settings as you type the address.

If you have turned openHAB's implicit user role off, neohab asks you to sign in before showing anything. Commands and configuration then work normally, but live values do not update: they arrive over an EventSource, which browsers do not allow a token to be attached to. neohab says so on screen rather than showing stale numbers

Icons and fonts

Nearly 10,000 icons ship in the add-on, so it works with no internet at all: Material Design Icons, Fluent Emoji, Flat Color Icons and Meteocons. Your server's own icon sets and your own uploads sit alongside them. The themes that need a font bundle them: DSEG, Montserrat and Poppins.

Everything bundled, with its licence and copyright, is listed in NOTICE.

Development

React, TypeScript and Vite, served by a thin OSGi add-on shell, talking to openHAB through its public REST and SSE APIs. CONTRIBUTING covers running it against your own openHAB with no Java build. The browser end-to-end suites live in e2e/; read e2e/README.md before pointing them at a server you care about to avoid unwanted changes being made to your production dashboards

Help

Open an issue. In your neohab install, the Settings page ends with an About blurb that shows all the relevent info - please paste this in to any github issues. Security issues should go privately instead: see SECURITY.md.

Old OpenHAB Limitations

openHAB 4.0 | Loses: the log widget. openHAB added the log feed it reads in 4.1

openHAB 3.1 - 3.x | Loses: Floor plan presets for signed-out viewers. Signed in they work; a wall panel with nobody logged in will not list them. Also Semantic tags you define yourself in the dashboard generator. Built-in tags work everywhere, so generation still works

openHAB 3.0 and older | Incompatible, Neohab will not start

License

Eclipse Public License 2.0

About

A modern dashboard UI add-on for openHAB

Resources

Contributing

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages