Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

python library for accessing the openHAB REST API

Project Description

python library for accessing the openHAB REST API

This library allows for easily accessing the openHAB REST API. A number of features are implemented but not all, this is work in progress.


  • python 2.7.x / 3.5
  • python :: dateutil
  • python :: requests

Note on openHAB1:

Make sure to use the 1.x branch for openHAB1.x!


Install the latest version using pip:

pip install python-openhab


Example usage of the library:

from openhab import openHAB

base_url = 'http://localhost:8080/rest'
openhab = openHAB(base_url)

# fetch all items
items = openhab.fetch_all_items()

sunset = items.get('Sunset')

# fetch a single item
item = openhab.get_item('light_switch')

# turn a swith on

# send a state update (this only update the state)
item.state = 'OFF'

# send a command
Release History

Release History

This version
History Node


History Node


Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
python_openhab-2.2-py2.py3-none-any.whl (9.6 kB) Copy SHA256 Checksum SHA256 py2.py3 Wheel Jul 16, 2017
python-openhab-2.2.tar.gz (6.0 kB) Copy SHA256 Checksum SHA256 Source Jul 16, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting