Go to file
Thomas Dietrich 7fc889a34b Fix wrongful italic presentation in README (#35)
GitHub would show half the file as italic because there is no second asterisk to end the format block.
Signed-off-by: Thomas Dietrich thomas.dietrich@tu-ilmenau.de (github: ThomDietrich)
2017-10-09 12:42:19 +02:00
.vscode openHAB VS Code extension - Initial contribution (#1) 2017-06-19 08:09:32 +02:00
fileicons Icon Theme (#21) 2017-07-03 20:52:50 +02:00
images openHAB VS Code extension - Initial contribution (#1) 2017-06-19 08:09:32 +02:00
project-orga Added CONTRIBUTING, generate-authors and minor tweaks (#13) 2017-06-20 07:38:54 +02:00
resources Items Explorer view - Initial contribution (#20) 2017-07-07 12:58:40 +02:00
snippets openHAB VS Code extension - Initial contribution (#1) 2017-06-19 08:09:32 +02:00
src Optional REST API connection + better error handling. Closes #33 Resolves #22 (#34) 2017-10-08 17:58:40 +02:00
syntaxes openHAB VS Code extension - Initial contribution (#1) 2017-06-19 08:09:32 +02:00
.gitignore Items Explorer view - Initial contribution (#20) 2017-07-07 12:58:40 +02:00
.pullapprove.yml Update .pullapprove.yml 2017-07-10 09:41:03 +02:00
.vscodeignore Added CONTRIBUTING, generate-authors and minor tweaks (#13) 2017-06-20 07:38:54 +02:00
AUTHORS Items Explorer view - Initial contribution (#20) 2017-07-07 12:58:40 +02:00
CHANGELOG.md Items Explorer view - Initial contribution (#20) 2017-07-07 12:58:40 +02:00
CONTRIBUTING.md Update CONTRIBUTING.md 2017-07-08 09:13:21 +02:00
ISSUE_TEMPLATE.md Added CONTRIBUTING, generate-authors and minor tweaks (#13) 2017-06-20 07:38:54 +02:00
LICENSE Initial commit 2017-06-18 22:05:59 +02:00
README.md Fix wrongful italic presentation in README (#35) 2017-10-09 12:42:19 +02:00
language-configuration.json openHAB VS Code extension - Initial contribution (#1) 2017-06-19 08:09:32 +02:00
openhab.png openHAB VS Code extension - Initial contribution (#1) 2017-06-19 08:09:32 +02:00
package.json Optional REST API connection + better error handling. Closes #33 Resolves #22 (#34) 2017-10-08 17:58:40 +02:00
tsconfig.json Added functionality to open openHAB Preview on MacOS based systems (#14) 2017-06-21 14:36:38 +02:00

README.md

openHAB VS Code Extension

openHAB is a vendor and techology agnostic open source automation software for your home. This Visual Studio Code extension allows you to work with openHAB configuration files (like *.items, *.rules, *.sitemap and *.script) thanks to the syntax highlighting, code snippets and integrated search.

The extension is designed with openHAB 2.x in mind - most snippets and design patterns will work in openHAB 2.x

Features

  • Code snippets for openHAB, including Design Patterns by Rich Koshak
  • Syntax highlighting for the openHAB DSL (rules, items, scripts and sitemaps).
  • Integrated quick search of openHAB Docs page (Alt + Shift + O)
  • Integrated quick search of openHAB Community
  • Integrated Basic UI browser window (Ctrl + Alt + O or editor title icon)
  • Integration with openHAB REST API
  • List of all Items accessible from the tree view
  • Code completions

openHAB2 code snippets

integrated search engine

Configuration

You are able to configure the hostname and port for the Sitemap preview.

  • openhab.host (mandatory), default: openhabianpi
  • openhab.port (optional), default: 8080

openhab.host will also work with the IP address of your openHAB instance, instead of the hostname.

These settings should work fine on Windows machines and openHAB installations using the recommended openHABian setup. They should be edited if you use macOS or *NIX systems or manual openHAB installations.

To edit these settings, simply add overrides to either your user settings or your workspace settings in your Visual Studio Codes preferences.

For further informations on how to change your settings, visit the official Visual Studio Code docs.

Configuration example (local)

{
	"openhab.host": "localhost",
	"openhab.port": "80"
}

Configuration example (macOS)

{
	"openhab.host": "openhabianpi.local",
	"openhab.port": "8080"
}

Integration with openHAB REST API

This VSCode extension connects to the openHAB REST API by default. The connection is used to display list of Items in the left side tree view. It's also utilized for code completions.

If you're using this extension just for the syntax highlighting and don't want to involve the REST API, you can disable it by providing the following parameter in your User Settings (Ctrl + Shift + S):

"openhab.useRestApi": false

You may need to reload the VSCode window to take effect.

Sitemap preview with Basic UI

openHAB VS Code Extension allows you to preview the sitemap structure in the Basic UI running on your openHAB server instance.

If you have a sitemap file active in your editor and open Basic UI (Ctrl + Alt + O or editor title icon), you'll land directly on the sitemap you're working on.

Intelligent sitemap preview

You need to have openHAB server running in order to preview changes. The extension assumes that you access your openHAB config files from either:

Samba share (e.g. \\OPENHABIANPI\openHAB-conf\) Local folder (e.g. c:\openhab\configuration)

Known Issues

Check out existing issues in the repository.

Release Notes

See CHANGELOG.md file for the details.


For More Information

Enjoy!