-
Notifications
You must be signed in to change notification settings - Fork 1
Installation
Preconditions:
- Your NsPanel(s) are flashed with tasmota and lovelace ui
- openHAB is installed and running
- You have an MQTT Broker, which is connected to openHAB and your NSPanel
Installation Steps:
Clone this project with:
git clone https://github.com/olialb/nspanelMqttBridge
and go inside the project directory:
cd nspanelMqttBridge
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.
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
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.
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/activatestart the bridge:
python nspanel_mqtt_bridge.pyCheck the logs carefully and fix all issues in your personal configuration before you go to step 6.
Enabele the systemd service which was prepared in the setup script:
sudo systemctl enable nsPanelMqttBridgeand start the service:
sudo systemctl start nsPanelMqttBridgeNow 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.
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
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.shNOTE: 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
- stops the systemd service
- moves the ini file content to a backup file
- get the latest files from the release branch
- move the ini file content back
- start the systemd service again
Introduction
NSPanel Preparation
- Preparation
- Prepare NSPanel (extern)
- Flashing Tasmota to NSPanel (extern german)
- Configuring NSPanel and flash HMI jobr99 (extern)
- Flash latest HMI versions of ticaki (extern german)
- NSPanel Emulator (external german)
Installation of the Bridge
Yaml configuration
Further Concepts
Compatible HMI projects
Usefull Links