Skip to content

Installation

olialb edited this page Jul 26, 2026 · 5 revisions

Installation

Preconditions:

  • Your NsPanel(s) are flashed with tasmota and lovelace ui
  • Important: Topic configuration in tasmota must be done like described here
  • openHAB is installed and running
  • You have an MQTT Broker, which is connected to openHAB and your NSPanel

Installation Steps:

Step 1:

Clone this project with:

git clone https://github.com/olialb/nspanelMqttBridge

and go inside the project directory:

cd nspanelMqttBridge

Step 2:

Call setup:

bash setup.sh

This installs the required python packages and configures a systemd service which is atomatically running the mqtt client after startup. The systemd service is started with the current user rights.

Step 3:

Configure the ini file for your personal needs:

nano nspanelMqttBridge.ini

Details of the configuration you can find in next section: Configuration of ini file

Step 4:

Configure the pages (cards) and screen saver card of your panel in yaml files. How to do this is documented in section Card file configuration. The example files in the ./config folder should be enough to make some first tests.

Step 5:

Test you configuration by starting the bridge from the command line. Go to the installation folder and enable the python environment with:

source venv/bin/activate

start the bridge:

python nspanel_mqtt_bridge.py

Check the logs carefully and fix all issues in your personal configuration before you go to step 6.

Step 6:

Enabele the systemd service which was prepared in the setup script:

sudo systemctl enable nsPanelMqttBridge

and start the service:

sudo systemctl start nsPanelMqttBridge

Now the service is running in th back ground and the logs are stored in the configured log file location in case you want to check them. From now on systemd should start the bridge automatically after each reboot.

Step 7

If you want to control the panel brightness and switch between cards over openHAB you need to add an MQTT thing to your openHAB thing configuration. As an example configuration, matching to the nspanel01 default config after setup, it looks like this:

//nspanel display
Thing topic nspanel01 "nspanel01" @ "Flur" {
    Channels:
        //Standard channels
        Type dimmer  : brightness       "display brightness"     [stateTopic="nspanel-bridge/flur/brightness", commandTopic="nspanel-bridge/flur/brightness/set"]
        Type dimmer  : brightness_saver "Screensaver brightness" [stateTopic="nspanel-bridge/flur/brightness_saver", commandTopic="nspanel-bridge/flur/brightness_saver/set"]
        Type number  : timeout          "Screensaver timeout"    [stateTopic="nspanel-bridge/flur/timeout", commandTopic="nspanel-bridge/flur/timeout/set"]
        Type string  : current_card     "Currend card"           [stateTopic="nspanel-bridge/flur/card", commandTopic="nspanel-bridge/flur/card/set"]
        Type string  : status_card     "Status card"             [stateTopic="nspanel-bridge/flur/status_card", commandTopic="nspanel-bridge/flur/status_card/set"]
        Type switch  : status_left       "Status left"           [stateTopic="nspanel-bridge/flur/status_left", commandTopic="nspanel-bridge/flur/status_left/set"]
        Type switch  : status_right      "Satus right"           [stateTopic="nspanel-bridge/flur/status_right", commandTopic="nspanel-bridge/flur/status_right/set"]
        Type string  : notification     "Notification"           [stateTopic="nspanel-bridge/flur/notfication", commandTopic="nspanel-bridge/flur/notfication/set"]
        Type string  : version_hmi      "Version HMI"            [stateTopic="nspanel-bridge/flur/version_hmi", transformationPattern="JSONPATH:$.hmi"]
        Type string  : version_panel    "Version Panel"          [stateTopic="nspanel-bridge/flur/version_panel", transformationPattern="JSONPATH:$.panel"]
}

For more details about the topic structure and functionality behind see: Exposed MQTT topics and usage

Later updates

After you successfully installed the bridge and actived the systemd service, you can later update the bridge to the latest release by calling the update shell script:

bash ./update.sh

NOTE: Only your ini file content will be kept during the update. All other local changes, like in skin or language json files will be lost!! Please make a backup of these changes when you want to restore them after the update.

The script

  1. stops the systemd service
  2. moves the ini file content to a backup file
  3. get the latest files from the release branch
  4. move the ini file content back
  5. start the systemd service again

Clone this wiki locally