Skip to main content

Home Center 2 API Python Library

Project description

Introduction

Fiblary is a Python module wrapping Fibaro Home Center REST API. This allows Python programs to make calls directly to Home Center and control the Z-wave devices and run scenes managed by HC. It also provides access and methods to variables, users, room and sections defined on Home Center.

Installation

Current fiblary module is provided as PyPi package. To install on a unix based system use pip:

pip install fiblary

Basic usage

The main client object contains several managers controlling a basic functions of HC:

  • Sections,

  • Rooms,

  • Info,

  • Weather,

  • Variables,

  • Scenes,

  • Devices,

  • Events

and more.

It’s easiest to to get some basic information about the Home Center:

from fiblary.client import Client

# Connect to Home Center
hc = Client('v3', 'http://192.168.1.1/api/', 'admin', 'admin')

# Retrieve the basic info as returned by /api/info
info = hc.info.get()

print(info)

will produce the similar output as below:

{u'batteryLowNotification': True, u'temperatureUnit': u'C', u'updateStableAvailable': False, u'sunsetHour': u'16:29',
u'softVersion': u'3.580', u'newestBetaVersion': u'3.581', u'serialNumber': u'HC2-000666', u'sunriseHour': u'07:24',
u'beta': False, u'defaultLanguage': u'pl', u'mac': u'38:60:77:92:bf:a5', u'serverStatus': 1390148753, u'hotelMode': True,
u'updateBetaAvailable': True, u'zwaveVersion': u'3.42'}

The returned info behaves like a dictionary:

print info['softVersion']

but also like a property:

print info.softVersion

Easy, eh?

For the managers that Client supports the full set of options is implemented.

Please refer to the example code attached to the project.

License

Copyright (c) 2014 Klaudiusz Staniek

Apache License Version 2.0 http://www.apache.org/licenses/LICENSE-2.0

Project details


Download files

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

Source Distribution

fiblary-0.1.3.tar.gz (32.6 kB view details)

Uploaded Source

File details

Details for the file fiblary-0.1.3.tar.gz.

File metadata

  • Download URL: fiblary-0.1.3.tar.gz
  • Upload date:
  • Size: 32.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for fiblary-0.1.3.tar.gz
Algorithm Hash digest
SHA256 db0ce33365c53f324ddebc98936b336585ea0982713868327bec1672f0a51d03
MD5 1edd12e9b55994c5c07cdd13264535a9
BLAKE2b-256 5b4bd9ed56e5eab791a77908449b65b180c51608732dc62c84808517d5d82f54

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page