### Example addons.cfg Configuration Source: https://www.openhab.org/docs/configuration/addons This is an example of the `addons.cfg` file, used for configuring add-on installations. It specifies add-ons for different categories like UI, actions, bindings, transformations, and persistence. ```properties ui = basic,habpanel action = pushover binding = astro transformation = jsonpath persistence = influxdb ``` -------------------------------- ### Install and Start OpenHAB Windows Service Source: https://www.openhab.org/docs/installation/windows.html Commands to install and start the OpenHAB service on Windows. Ensure you run these in an elevated command prompt. ```bash C:\openHAB\userdata\bin\openHAB-service.bat install net start "openHAB" ``` -------------------------------- ### openHAB Console Help Command Example Source: https://www.openhab.org/docs/administration/console Demonstrates using the 'help' command to get general assistance or specific command details within the openHAB console. ```text openhab> help ... openhab> help bundle ... openhab> help bundle:stop ... ``` -------------------------------- ### Basic Multimedia Actions Source: https://www.openhab.org/docs/configuration/multimedia Examples of starting and stopping dialogs with default parameters. ```DSL startDialog(null, null) stopDialog(null) ``` -------------------------------- ### Launch OpenHABian Configuration Tool Source: https://www.openhab.org/docs/installation/openhabian Starts the interactive OpenHABian configuration tool. Use this command to access menus for system settings, software installation, and updates. ```bash sudo openhabian-config ``` -------------------------------- ### Get openHAB Installation Info Source: https://www.openhab.org/docs/installation/index.html Use this command to display essential installation paths, user details, and URLs for your openHAB instance. This is useful for understanding where configuration files are located and how to access the openHAB UI. ```bash openhab-cli info ``` -------------------------------- ### Launch openHAB Source: https://www.openhab.org/docs/installation/macos.html Starts the openHAB service from the terminal. Use the name of the installed package ('openhab' or 'openhab-milestone'). ```bash openhab ``` -------------------------------- ### Install Bundle from URI Source: https://www.openhab.org/docs/administration/bundles.html Installs a bundle from a remote URI. The bundle will be listed after installation. ```bash openhab> bundle:install https://github.com/myrepy/my-binding/raw/main/org.openhab.binding.my-5.0.0-SNAPSHOT.jar ``` -------------------------------- ### Install Samba and Open Configuration File Source: https://www.openhab.org/docs/installation/linux Installs the Samba server and client packages and opens the Samba configuration file for editing. ```bash sudo apt-get install samba samba-common-bin sudo vim /etc/samba/smb.conf ``` -------------------------------- ### Example: Start Wake Up Light on Sunrise Source: https://www.openhab.org/docs/configuration/rules-dsl.html An example rule that triggers when the Astro binding's sun rise event occurs. It demonstrates how to use a specific trigger event like START. ```rules rule "Start wake up light on sunrise" when Channel "astro:sun:home:rise#event" triggered START then ... end ``` -------------------------------- ### Tail openHAB Log Files (Manual Installation) Source: https://www.openhab.org/docs/installation/linux Monitor the main openHAB log and events log in real-time for a manual installation. This command should be executed from within the openHAB installation directory. ```bash tail -f /opt/openhab/userdata/logs/openhab.log -f /opt/openhab/userdata/logs/events.log ``` -------------------------------- ### Complete Persistence Configuration Example Source: https://www.openhab.org/docs/configuration/persistence An example of a complete persistence configuration file, including custom strategies, filters, and item-to-strategy mappings. ```plaintext // persistence strategies have a name and definition and are referred to in the "Items" section Strategies { everyHour : "0 0 * * ?" everyDay : "0 0 0 * ?" } Filters { fivepercent : > % 5 atMostOnceAMinute : T 1 m } /* * Each line in this section defines for which Item(s) which strategy(ies) should be applied. * You can list single items, use "*" for all items or "groupitem*" for all members of a group * Item (excl. the group Item itself). */ Items { // persist the Item state of Heating_Mode and Notifications_Active on every change and restore them from the db at startup Heating_Mode, Notifications_Active: strategy = everyChange, restoreOnStartup // additionally, persist all temperature and weather values every hour Temperature*, Weather* : strategy = everyHour // persist all items every day, except items in the weather group and the cellar temperature *, !Weather*, !CellarTemperature: strategy = everyDay } ``` -------------------------------- ### Action Analyzer Items Example Source: https://www.openhab.org/docs/ui/components/oh-knob-cell.html Select one or more Items to start the analysis process. ```text actionAnalyzerItems ``` -------------------------------- ### Start a Bundle Source: https://www.openhab.org/docs/administration/bundles.html Starts a specific bundle identified by its ID. Use bundle:list to find the ID. ```bash openhab> bundle:start 209 ``` -------------------------------- ### Start openHAB Service Source: https://www.openhab.org/docs/configuration/migration After a successful upgrade, use this command to start the openHAB service. Note the absence of '2' in the service name. ```bash sudo systemctl start openhab ``` -------------------------------- ### Start and Status openHAB (sysVinit) Source: https://www.openhab.org/docs/installation/linux Start the openHAB service and check its status on systems using sysVinit. ```bash sudo /etc/init.d/openhab start sudo /etc/init.d/openhab status ``` -------------------------------- ### Install openHAB (Apt) Source: https://www.openhab.org/docs/installation/linux Installs the latest version of openHAB using the apt package manager. This command fetches and installs the core openHAB package. ```bash sudo apt-get install openhab ``` -------------------------------- ### Start OpenHAB as a Homebrew Service Source: https://www.openhab.org/docs/installation/macos.html Starts OpenHAB as a background service using Homebrew, ensuring it launches automatically on user login. ```bash brew services start openhab # OR # brew services start openhab-milestone ``` -------------------------------- ### Start and Status openHAB (systemd) Source: https://www.openhab.org/docs/installation/linux Start the openHAB service and check its status on systems using systemd. ```bash sudo systemctl start openhab.service sudo systemctl status openhab.service ``` -------------------------------- ### Example Item Definitions Source: https://www.openhab.org/docs/configuration/items.html Example definitions for Switch and String items that utilize custom icons. ```java Switch Livingroom_Light "Livingroom Ceiling Light" String Livingroom_Light_Connection "Livingroom Ceiling Light [MAP(error.map):%s]" ``` -------------------------------- ### Enable ZRAM Installation Source: https://www.openhab.org/docs/installation/openhabian Set this parameter to 'enable' to install ZRAM. This is used for memory compression. ```shell zraminstall="enable" ``` -------------------------------- ### Create OpenHAB Installation Directory Source: https://www.openhab.org/docs/installation/macos.html Creates a directory for your OpenHAB installation. Ensure the path does not contain spaces. ```bash mkdir ~/openhab cd ~/openhab ``` -------------------------------- ### Example Java Version Output Source: https://www.openhab.org/docs/installation/index.html This is an example of the output you should expect when checking for Java 21. It confirms the version and build details. ```text openjdk version "21.0.7" 2025-04-15 LTS OpenJDK Runtime Environment Temurin-21.0.7+6 (build 21.0.7+6-LTS) OpenJDK 64-Bit Server VM Temurin-21.0.7+6 (build 21.0.7+6-LTS, mixed mode, sharing) ``` -------------------------------- ### HueLightDiscoveryService Example Source: https://www.openhab.org/docs/developer/bindings This example demonstrates how to use DiscoveryResultBuilder to create a discovery result for a discovered light, utilizing the thingDiscovered method. ```java private void onLightAddedInternal(FullLight light) { ThingUID thingUID = getThingUID(light); if (thingUID != null) { ThingUID bridgeUID = hueBridgeHandler.getThing().getUID(); Map properties = new HashMap<>(1); properties.put(LIGHT_ID, light.getId()); DiscoveryResult discoveryResult = DiscoveryResultBuilder.create(thingUID).withProperties(properties) .withBridge(bridgeUID).withLabel(light.getName()).build(); thingDiscovered(discoveryResult); } else { logger.debug("discovered unsupported light of type '{}' with id {}", light.getModelID(), light.getId()); } } ``` -------------------------------- ### MQTT Broker and Topic Thing Example Source: https://www.openhab.org/docs/configuration/yaml.html Example demonstrating the definition of an MQTT broker Bridge and associated topic Things, including channel configurations. ```yaml version: 1 things: mqtt:broker:mosquitto: isBridge: true config: host: 192.168.1.1 lwtMessage: offline lwtTopic: openhab/status lwtQos: 1 birthMessage: online birthTopic: openhab/status shutdownMessage: offline shutdownTopic: openhab/status enableDiscovery: false mqtt:topic:bedroom1-switch: bridge: mqtt:broker:mosquitto label: Bed Room1 Switch config: availabilityTopic: bedroom1-switch/status payloadAvailable: online payloadNotAvailable: offline channels: switch1: type: switch config: stateTopic: bedroom1-switch/switch/switch1/state commandTopic: bedroom1-switch/switch/switch1/command button1: type: string config: stateTopic: bedroom1-switch/button1 postCommand: true statusled: type: switch config: stateTopic: bedroom1-switch/light/status_led/state commandTopic: bedroom1-switch/light/status_led/command transformationPattern: - JSONPATH:$.state formatBeforePublish: '{"state": "%s"}' # This needs to be quoted to be parsed as a string # because YAML interprets {} as a map object ``` -------------------------------- ### Astro Sun Channel Configuration Example Source: https://www.openhab.org/docs/configuration/yaml.html Example showing how to configure a built-in channel for the Astro binding, specifically for event-based configurations. ```yaml # Example to configure a built-in channel astro:sun:home: config: geolocation: 52.5200066,13.4049540,100 interval: 60 channels: rise#event: type: rangeEvent config: offset: -30 ``` -------------------------------- ### Install NGINX Source: https://www.openhab.org/docs/installation/reverse-proxy.html Installs the NGINX web server on Debian-based systems. This is the first step before configuring it as a reverse proxy. ```bash sudo apt-get update && sudo apt-get install nginx ``` -------------------------------- ### Install openHAB Package (Arch Linux) Source: https://www.openhab.org/docs/installation/linux Install the built openHAB package using pacman after successful compilation. ```bash sudo pacman -U openhab3-3.0.0.M4-1-any.pkg.tar.zst ``` -------------------------------- ### Example User ID Output Source: https://www.openhab.org/docs/installation/synology.html Example output from the 'sudo id openhab' command, showing the UID and GID. These values are needed for Docker configuration. ```text uid=1032(openhab) gid=100(users) groups=100(users),65537(dialout),65539(openhab) ``` -------------------------------- ### Install Add-on via Console Source: https://www.openhab.org/docs/configuration/addons Use this command in the openHAB console to install an add-on in the background, specifying its `id` as obtained from the list command. ```bash openhab:addons install ``` -------------------------------- ### Advanced Multimedia Actions with All Parameters Source: https://www.openhab.org/docs/configuration/multimedia Example demonstrating the startDialog function with all possible parameters, including keyword spotter, STT, TTS, voice, interpreters, source, sink, locale, keyword, and listeningItem. ```DSL startDialog("porcupineks", "voskstt", "voicerss", "voicerss:frFR_Zola", "system,rulehli", "javasound", "sonos:PLAY5:kitchen", "fr-FR", "terminator", "listeningItem") stopDialog("javasound") ``` -------------------------------- ### Install openHAB as a Windows Service Source: https://www.openhab.org/docs/installation/windows.html These commands are used within the openHAB console to install the necessary service wrapper for running openHAB as a background service. ```bash feature:install service-wrapper wrapper:install --name "openHAB" --display "openHAB" --description "openHAB Service" ``` -------------------------------- ### Install openHAB Add-ons (Apt) Source: https://www.openhab.org/docs/installation/linux Installs the openHAB add-ons package. This is recommended if you plan to disconnect your machine from the internet, as it downloads add-ons locally. ```bash sudo apt-get install openhab-addons ``` -------------------------------- ### SystemStartlevelTrigger Configuration Source: https://www.openhab.org/docs/configuration/jsr223.html Example configuration for a SystemStartlevelTrigger, specifying a start level. This trigger fires when the system reaches a specific start level. ```groovy triggers: [ SystemStartlevelTrigger(startlevel: '100') ] ``` -------------------------------- ### Trigger rule on specific start level Source: https://www.openhab.org/docs/configuration/rules-dsl.html This example demonstrates triggering a rule at a specific start level (e.g., 70). It also notes that rules are reloaded if saved during development when the expected start level is reached. ```rules-dsl rule "Start level reload" when System reached start level 70 then logInfo("StartLevelTest", "triggered a second time, if active rule being edited and saved another time.") logInfo("StartLevelTest", "You won´t realize this behaviour under regular run conditions, each start level is reached exactly once.") end ``` -------------------------------- ### Launch the openHAB Demo App with Maven Source: https://www.openhab.org/docs/developer/ide/generic.html Execute this command from the `/openhab-distro/launch/app/` directory to launch the demo application using the configurations in `app.bndrun`. The application will be accessible at http://localhost:8080. ```bash mvn bnd-run:run ``` -------------------------------- ### Example Add-on List Output Source: https://www.openhab.org/docs/configuration/addons This is an example output from the `feature:list` command, showing available add-ons and their details. The `id` is typically the first part of the name. ```text ... openhab-binding-mqtt | 5.0.0 | | Started | openhab-addons-5.0.0 | MQTT Binding openhab-binding-netatmo | 5.0.0 | | Started | openhab-addons-5.0.0 | Netatmo Binding openhab-binding-onewire | 5.0.0 | | Uninstalled | openhab-addons-5.0.0 | OneWire Binding ... openhab-binding-network | 5.0.0 | | Uninstalled | openhab-addons-5.0.0 | Network Binding ... ``` -------------------------------- ### Basic YAML Configuration Example Source: https://www.openhab.org/docs/configuration/yaml.html Demonstrates the structure of a typical openHAB YAML configuration file, including version, tags, things, and items. ```yaml version: 1 # All the sections below are optional and may appear in any order tags: Equipment_Curtain: label: Curtain Location_Indoor_Room_HomeCinemaRoom: label: Home Cinema Room description: The room containing my home cinema system synonyms: - Home theater room - TV room - Movie room things: lgwebos:WebOSTV:3aab9eea-953b-4272-bdbd-f0cd0ecf4a46: config: host: 192.168.2.119 key: 6ef1dff6c7c936c8dc5056fc85ea3aef macAddress: 3c:cd:93:c2:20:e0 items: TV_Power: type: Switch label: TV Power icon: television autoupdate: false channel: lgwebos:WebOSTV:3aab9eea-953b-4272-bdbd-f0cd0ecf4a46:power TV_Volume: type: Dimmer label: Volume # Label must not contain a format pattern format: "%d" # Values starting with a percent sign must be quoted channel: lgwebos:WebOSTV:3aab9eea-953b-4272-bdbd-f0cd0ecf4a46:volume ``` -------------------------------- ### Clone OpenHABian Repository and Link Setup Script Source: https://www.openhab.org/docs/installation/openhabian This snippet clones the openHABian repository, creates a symbolic link for the setup script, and copies the default configuration file. This is the initial step for setting up OpenHABian. ```bash git clone -b openHAB https://github.com/openhab/openhabian.git /opt/openhabian ln -s /opt/openhabian/openhabian-setup.sh /usr/local/bin/openhabian-config cp /opt/openhabian/build-image/openhabian.conf /etc/openhabian.conf ``` -------------------------------- ### Multimedia Actions with Specific Sources and Sinks Source: https://www.openhab.org/docs/configuration/multimedia Examples of starting and stopping dialogs with specified audio sources and sinks. ```DSL startDialog("javasound", "sonos:PLAY5:kitchen") stopDialog("javasound") ``` -------------------------------- ### Adding a Binding to addons.cfg Source: https://www.openhab.org/docs/configuration/addons To install a new binding using `addons.cfg`, add its `id` to the `binding` line. This example adds the 'network' binding. ```properties binding = astro,network ``` -------------------------------- ### Prepare and Mount USB Drive with ext4 Source: https://www.openhab.org/docs/installation/openhabian-backup.html Example of partitioning a USB drive, formatting a partition with ext4, and mounting it. This is the recommended filesystem for USB drives used with openHABian. Avoid Windows FAT formatting. ```bash root@pi:/home/pi# fdisk -l /dev/sda Disk /dev/sda: 14,8 GiB, 15836643328 bytes, 30930944 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel : dos Disk identifier: 0x000210ce Device Boot Start End Sectors Size Id Type /dev/sda1 8192 2357421 2349230 1,1G e W95 FAT16 (LBA) /dev/sda2 2357422 31116287 28758866 13,7G 85 Linux extended /dev/sda5 2359296 2424829 65534 32M 83 Linux /dev/sda6 2424832 2553855 129024 63M c W95 FAT32 (LBA) /dev/sda7 2555904 30056445 27500542 13,1G 83 Linux /dev/sda8 30056448 31105023 1048576 512M 83 Linux root@pi:/# mke2fs -t ext4 /dev/sda8 mke2fs 1.43.3 (04-Sep-2016) /dev/sda8 contains a ext4 file system created on Sun Oct 29 00:17:48 2017 Proceed anyway? (y,n) y Creating filesystem with 437248 1k blocks and 109728 inodes Filesystem UUID: edb36b80-f363-434c-a50e-ca4a81a6bb7d Superblock backups stored on blocks: 8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409 Allocating group tables: done Writing inode tables: done Creating journal (8192 blocks): done Writing superblocks and filesystem accounting information: done root@pi:/home/pi# mkdir -p /storage/usbstick-linux root@pi:/home/pi# echo "/dev/sda8 /storage/usbstick-linux ext4 defaults,noatime 0 1" >> /etc/fstab root@pi:/home/pi# mount /storage/usbstick-linux root@pi:/home/pi# df -k /storage/usbstick-linux Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda8 13403236 8204144 4495196 65% /storage/usbstick-linux root@pi:/home/pi# ``` -------------------------------- ### Basic Sitemap Definition Example Source: https://www.openhab.org/docs/ui/sitemaps A typical Sitemap definition illustrating various elements like Frame, Text, Switch, Group, and Selection. This serves as a starting point for creating custom sitemaps. ```sitemap sitemap demo label="My home automation" { Frame label="Date" { Text item=Date } Frame label="Demo" { Switch item=Lights icon="light" Text item=LR_Temperature label="Livingroom [%.1f °C]" Group item=Heating Text item=LR_Multimedia_Summary label="Multimedia [%s]" staticIcon="video" { Selection item=LR_TV_Channel mappings=[0="off", 1="DasErste", 2="BBC One", 3="Cartoon Network"] Slider item=LR_TV_Volume } } } ``` -------------------------------- ### Execute openHAB for First Test Run Source: https://www.openhab.org/docs/installation/linux Starts the openHAB runtime as the `openhab` user. The openHAB console will appear in the terminal, and the dashboard should be accessible via `http://openhab-device:8080` after a few minutes. ```bash # execute as restricted user openhab: sudo su -s /bin/bash -c '/opt/openhab/start.sh' openhab ``` -------------------------------- ### Charger Group with Rechargeable and Unit Configuration Source: https://www.openhab.org/docs/ecosystem/google-assistant Example of a charger group configured for rechargeable devices with units specified in kilowatt-hours. This setup includes items for charging status, plug status, and remaining capacity. ```text Group chargerGroup { ga="Charger" [ isRechargeable=true, unit="KILOWATT_HOURS" ] } Switch chargingItem (chargerGroup) { ga="chargerCharging" } Switch pluggedInItem (chargerGroup) { ga="chargerPluggedIn" } Number capacityRemainItem (chargerGroup) { ga="chargerCapacityRemaining" } Number capacityFullItem (chargerGroup) { ga="chargerCapacityUntilFull" } ``` -------------------------------- ### Get Thing Status Information in OpenHAB Source: https://www.openhab.org/docs/configuration/actions This example shows how to retrieve the status information for a specific thing using its UID. It checks if the thing is online and logs the status accordingly. If the thing is offline or does not exist, an error is logged. ```rules var thingStatusInfo = getThingStatusInfo("zwave:device:c5155aa4:node2") if ((thingStatusInfo !== null) && (thingStatusInfo.getStatus().toString() == "ONLINE")) { logInfo("ThingStatus", "The thing is online.") } else { logError("ThingStatus", "The thing is offline or doesn't exist.") } ``` -------------------------------- ### Provide Service Example Source: https://www.openhab.org/docs/developer/osgi/osgids.html Shows how to register a service implementing an interface (EventHandler) with specific properties. The component is activated immediately. ```java @Component(service = {MyService.class, EventHandler.class}, immediate = true, property = { "event.topics=some/topic" }) @NonNullByDefault public class MyService implements EventHandler { @Activate protected void activate(BundleContext context) { System.out.println("Bundle is activated!"); } @Deactivate protected void deactivate(BundleContext context) { System.out.println("Bundle is deactivated!"); } @Override public void handleEvent(Event event) { String topic = event.getTopic(); System.out.println("Received event with topic: " + topic); } } ``` -------------------------------- ### Install Git on Debian Source: https://www.openhab.org/docs/installation/openhabian Installs the Git package on a Debian system, which is a prerequisite for installing openHABian on non-Raspberry Pi hardware. This command should be run as root. ```bash sudo bash apt-get update apt-get install git ``` -------------------------------- ### Initiate Backup Dump Source: https://www.openhab.org/docs/installation/openhabian-backup.html Start the actual backup process for the specified configuration. The output is typically mailed to the user upon completion. ```bash backup@pi:~$ amdump openhab-dir ``` -------------------------------- ### Enable Automatic Startup (sysVinit) Source: https://www.openhab.org/docs/installation/linux Register openHAB to start automatically at system boot on sysVinit-based systems. ```bash sudo update-rc.d openhab defaults ``` -------------------------------- ### Purge OpenHAB2 and Install OpenHAB on Debian/Ubuntu Source: https://www.openhab.org/docs/configuration/migration Perform a clean installation on Debian/Ubuntu by first purging the openHAB2 package, then updating and installing the latest OpenHAB. ```bash sudo apt purge openhab2 sudo apt update sudo apt install openhab ``` -------------------------------- ### Run OpenHABian Unattended Setup Source: https://www.openhab.org/docs/installation/openhabian Executes the OpenHABian setup process in unattended mode. This is used after initial configuration file edits for an automated setup. ```bash openhabian-config unattended ``` -------------------------------- ### Action Photo Browser Configuration Example Source: https://www.openhab.org/docs/ui/components/oh-aggregate-series.html Configure the photo browser with options like exposition, type, and theme. ```json { "exposition": false, "type": "popup", "theme": "dark" } ``` -------------------------------- ### Update OpenHAB on Windows (Manual) Source: https://www.openhab.org/docs/configuration/migration Manually update your OpenHAB installation on Windows using PowerShell. Ensure you have Java 21 installed and have backed up your installation folder. ```powershell . .\runtime\bin\update.ps1 Update-openHAB -OHVersion 3.0.0 ``` -------------------------------- ### Launch OpenHAB Source: https://www.openhab.org/docs/installation/macos.html Run this command from OpenHAB's root directory to start the application. The first launch may take longer. ```bash ./start.sh ``` -------------------------------- ### Install OpenSSL on Debian/Ubuntu Source: https://www.openhab.org/docs/installation/reverse-proxy.html Install the OpenSSL package on Debian-based Linux distributions. ```bash sudo apt-get install openssl ``` -------------------------------- ### Set Start and End Time Variables Source: https://www.openhab.org/docs/tutorial/rules_blockly.html Initialize variables 'start' and 'end' to represent specific times. 'start' is set to sunset, and 'end' is set to 23:00:00. These are used to define a time range for a condition. ```blockly var start = ZDT.fromItem(Sunset_Item); var end = ZDT.withDate(now.getYear(), now.getMonth(), now.getDay()).withTime(23, 0, 0, 0); ``` -------------------------------- ### Install openHAB Add-ons (Yum/Dnf) Source: https://www.openhab.org/docs/installation/linux Install the openHAB add-ons package, which downloads add-ons on demand. ```bash sudo yum install openhab-addons ``` -------------------------------- ### Launch Armbian Configuration Tool Source: https://www.openhab.org/docs/installation/armbian.html Execute this command to open the Armbian configuration utility for selecting and installing software. ```bash sudo armbian-config ``` -------------------------------- ### Launch OpenHAB Runtime Source: https://www.openhab.org/docs/installation/macos.html This snippet shows the expected output when launching the OpenHAB runtime, indicating a successful startup and the prompt for commands. ```bash $ ./start.sh Launching the OpenHAB runtime... _ _ _ ____ ___ ___ ___ ___ | | | | / \ | __ ) / _ \ / _ \ / _ \ / _ \ | |_| | / _ \ | _ \ | (_) | (_) | __/| | | || _ | / ___ \ | |_) ) \___/| __/ \___/|_| |_||_| |_|/_/ \_\|____/ |_| 5.0.0 - Release Build Use '' for a list of available commands and '[cmd] --help' for help on a specific command. To exit, use '' or 'logout'. openhab> ``` -------------------------------- ### Group Element Example Source: https://www.openhab.org/docs/ui/sitemaps Example of a Group element displaying room temperatures with a formatted label. ```plaintext Group item=gTemperature label="Room Temperatures [%.1f °C]" ``` -------------------------------- ### Action Modal Configuration Example Source: https://www.openhab.org/docs/ui/components/oh-knob-cell.html Provide configuration properties for the target modal page or widget. ```text actionModalConfig ``` -------------------------------- ### Install JRuby Gem Source: https://www.openhab.org/docs/tutorial/rules_advanced.html Install a JRuby-compatible Gem from rubygems.org by listing it in the JRuby Script add-on configurations. ```ruby gemfile do source "https://rubygems.org" gem "faraday", ">= 2.12.2", "~> 2.12" end ``` -------------------------------- ### Install openHAB (Yum/Dnf) Source: https://www.openhab.org/docs/installation/linux Install the openHAB package on systems using yum or dnf package managers. ```bash sudo yum install openhab ``` -------------------------------- ### Thing Examples Source: https://www.openhab.org/docs/configuration/things Illustrates defining different types of Things, including network devices, astronomical data, and NTP servers. Configuration parameters vary per binding. ```text Thing network:device:webcam "Webcam" @ "Living Room" [ hostname="192.168.0.2", timeout="5000", ... ] Thing astro:moon:home [ geolocation="50.12345,10.98765", interval=300 ] Thing ntp:ntp:local [ hostname="de.pool.ntp.org" ] ``` -------------------------------- ### Install Specific openHAB Version Source: https://www.openhab.org/docs/installation/linux Install a particular version of openHAB and its add-ons by specifying the version number. ```bash sudo apt install openhab=5.0.0 sudo apt install openhab-addons=5.0.0 ``` -------------------------------- ### Enable Automatic Startup (systemd) Source: https://www.openhab.org/docs/installation/linux Configure openHAB to start automatically at system boot on systemd-based systems. ```bash sudo systemctl daemon-reload sudo systemctl enable openhab.service ``` -------------------------------- ### Specify Initial Configuration Backup Source: https://www.openhab.org/docs/installation/openhabian Provide the path to a `.zip` archive created by `openhab-cli backup`. This file will be imported during initial setup. Ensure it's placed in the `/boot/firmware/` directory. ```shell initialconfig="/boot/firmware/initial.zip" ``` -------------------------------- ### openHAB Console Auto-completion Example Source: https://www.openhab.org/docs/administration/console Shows how auto-completion works in the openHAB console. Typing part of a command and pressing TAB suggests and completes available commands. ```text openhab> bundle bundle bundle:capabilities bundle:classes bundle:diag bundle:dynamic-import bundle:find-class bundle:headers bundle:id bundle:info bundle:install bundle:list bundle:load-test bundle:refresh bundle:requirements bundle:resolve bundle:restart bundle:services bundle:start bundle:start-level bundle:stop bundle:tree-show bundle:uninstall bundle:update bundle:watch ``` -------------------------------- ### List Available Add-ons Source: https://www.openhab.org/docs/configuration/addons Use this command in the openHAB console to list all available add-ons, which is useful for identifying the `id` of a desired add-on. ```bash feature:list | grep ^openhab ```