{"id":23376,"library":"boschshcpy","title":"Bosch Smart Home Controller Python Library","description":"A Python library to interact with the Bosch Smart Home Controller (SHC) API. Version 0.2.111. Development seems active on GitHub with regular updates.","status":"active","version":"0.2.111","language":"python","source_language":"en","source_url":"https://github.com/tschamm/boschshcpy","tags":["bosch","smart-home","api","async"],"install":[{"cmd":"pip install boschshcpy","lang":"bash","label":"pip"}],"dependencies":[{"reason":"Async HTTP client used for API calls","package":"httpx","optional":false},{"reason":"Discovery of Bosch SHC devices on local network","package":"zeroconf","optional":false},{"reason":"Certificate handling for TLS communication","package":"cryptography","optional":false},{"reason":"Configuration validation","package":"voluptuous","optional":false},{"reason":"Async file I/O for storing certificates","package":"aiofiles","optional":false}],"imports":[{"note":"BoschShcClient is exported at package level; deep import may break in future.","wrong":"from boschshcpy.client import BoschShcClient","symbol":"BoschShcClient","correct":"from boschshcpy import BoschShcClient"},{"note":"Session management class for authentication.","symbol":"BoschShcSession","correct":"from boschshcpy import BoschShcSession"}],"quickstart":{"code":"import asyncio\nimport os\nfrom boschshcpy import BoschShcClient, BoschShcSession\n\nasync def main():\n    # Use environment variables for credentials\n    host = os.environ.get('BOSCH_SHC_HOST', '192.168.1.100')\n    password = os.environ.get('BOSCH_SHC_PASSWORD', '')\n    \n    # For first-time setup, you need to register a client\n    # This example assumes you have already registered and have credentials\n    session = BoschShcSession(host, password)\n    client = BoschShcClient(session)\n    \n    # Connect and retrieve devices\n    await client.initialize()\n    devices = await client.get_devices()\n    for device in devices:\n        print(f\"{device.name}: {device.device_model}\")\n    await client.close()\n\nasyncio.run(main())","lang":"python","description":"Basic async example connecting to Bosch SHC and listing devices."},"warnings":[{"fix":"Use asyncio.run() or an async framework like aiohttp.","message":"The library uses async/await throughout. Synchronous calls will block the event loop. Ensure you run all methods within an async context.","severity":"gotcha","affected_versions":"all"},{"fix":"Use `client.get_scenes()` instead.","message":"The method `get_scenarios()` was deprecated in v0.2.100 and replaced by `get_scenes()`.","severity":"deprecated","affected_versions":">=0.2.100"},{"fix":"Update to latest version and import from `boschshcpy`.","message":"In older versions (<0.2.80), the import path for device classes was inside `boschshcpy.device`. This was changed to `boschshcpy` directly.","severity":"broken","affected_versions":"<0.2.80"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run `pip install boschshcpy` in your Python environment.","cause":"Library not installed or installed in wrong environment.","error":"ModuleNotFoundError: No module named 'boschshcpy'"},{"fix":"Verify the IP/hostname and password. Ensure the SHC is on the same network and TLS is not blocked.","cause":"Host address or password is incorrect, or the SHC is not reachable.","error":"boschshcpy.exceptions.ShcConnectionException: Connection to Bosch SHC failed"},{"fix":"Upgrade to latest: `pip install --upgrade boschshcpy`","cause":"Older version of the library where the class was named differently or not exported.","error":"ImportError: cannot import name 'BoschShcClient' from 'boschshcpy'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}