Skip to main content

Bosch Smart Home Controller API Python Library

Project description

Bosch Smart Home Controller API Python Library

This library implements the local communication REST API for the Bosch Smart Home Controller system. The API documentation is available here. It supports both long and short polling. The following device services are implemented:

  • TemperatureLevel
  • HumidityLevel
  • RoomClimateControl
  • ShutterContact
  • ValveTappet
  • PowerSwitch
  • PowerMeter
  • Routing
  • PowerSwitchProgram
  • BinarySwitch
  • SmokeDetectorCheck
  • Alarm
  • ShutterControl
  • CameraLight
  • PrivacyMode
  • CameraNotification
  • IntrusionDetectionControl
  • Keypad
  • LatestMotion
  • AirQualityLevel
  • SurveillanceAlarm
  • BatteryLevel
  • Thermostat
  • WaterLeakageSensor
  • WaterLeakageSensorTilt

The following device models are implemented, using the above services:

  • ShutterContact
  • ShutterControl
  • SmartPlug
  • SmartPlugCompact
  • LightControl
  • SmokeDetector
  • CameraEyes
  • IntrusionDetectionSystem
  • RoomClimateControl
  • Thermostat
  • WallThermostat
  • UniversalSwitch
  • MotionDetector
  • Twinguard
  • WaterLeakageSensor

Example

import boschshcpy

# Create session
session = boschshcpy.SHCSession(controller_ip="192.168.25.51", certificate='cert.pem', key='key.pem')
session.information.summary()

device = session.device('roomClimateControl_hz_5')
service = device.device_service('TemperatureLevel')
print(service.temperature)

# Update this service's state
service.short_poll()

# Start long polling thread in background
session.start_polling()

# Do work here
...

# Stop polling
session.stop_polling()

# Trigger intrusion detection system
intrusion_control = session.device_helper.intrusion_detection_system
intrusion_control.arm_instant()

To get a list of all devices, rooms and scenarios, see apisummary.py Example

Usage guide

Before accessing the Bosch Smart Home Controller, a client must be registered on the controller. For this a valid cert/key pair must be provided to the controller. To start the client registration, press and hold the button on the controller until the led starts flashing. More information here

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

boschshcpy-0.2.19.tar.gz (24.1 kB view details)

Uploaded Source

Built Distribution

boschshcpy-0.2.19-py3-none-any.whl (27.7 kB view details)

Uploaded Python 3

File details

Details for the file boschshcpy-0.2.19.tar.gz.

File metadata

  • Download URL: boschshcpy-0.2.19.tar.gz
  • Upload date:
  • Size: 24.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/54.1.2 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.2

File hashes

Hashes for boschshcpy-0.2.19.tar.gz
Algorithm Hash digest
SHA256 d5480237a9d94680cf0f71b7d260fadec60bb80aadb910cb96190527fe469d40
MD5 496ee94f8dc77b065a0cab3b416deb6d
BLAKE2b-256 332a841651645c77aec7e6b09d2d93e8c07576cc9ba8809c3c3d7872dbf463eb

See more details on using hashes here.

File details

Details for the file boschshcpy-0.2.19-py3-none-any.whl.

File metadata

  • Download URL: boschshcpy-0.2.19-py3-none-any.whl
  • Upload date:
  • Size: 27.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/54.1.2 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.2

File hashes

Hashes for boschshcpy-0.2.19-py3-none-any.whl
Algorithm Hash digest
SHA256 1d1f0f038299fe6c80a1c8406afb55ac24b8a05731d718e57280b1484fbbc6f4
MD5 68d9ae58a01b7ebe8d5c2b65bb448e70
BLAKE2b-256 c8cfb1a86bc7c0268fe83516275fb3e3be327d602eef959c10fd2bbd448460ef

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