{"id":21481,"library":"jeedomdaemon","title":"Jeedom Daemon Python","description":"A base library to implement Jeedom daemons in Python using asyncio and aiohttp. It handles WebSocket communication with Jeedom core, automatic reconnection, and JSON-RPC style commands. Current version is 1.2.9, requiring Python >=3.9. Release cadence is irregular with several updates in 2024-2025.","status":"active","version":"1.2.9","language":"python","source_language":"en","source_url":"https://github.com/Mips2648/jeedom-daemon-py","tags":["jeedom","daemon","websocket","automation"],"install":[{"cmd":"pip install jeedomdaemon","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Core dependency for async HTTP/WebSocket communication with Jeedom.","package":"aiohttp","optional":false}],"imports":[{"note":"Main class to subclass for your daemon.","symbol":"JeedomDaemon","correct":"from jeedomdaemon import JeedomDaemon"},{"note":"JeedomSocket is re-exported from the top-level package.","wrong":"from jeedomdaemon.jeedom_socket import JeedomSocket","symbol":"JeedomSocket","correct":"from jeedomdaemon import JeedomSocket"}],"quickstart":{"code":"import asyncio\nfrom jeedomdaemon import JeedomDaemon\n\nclass MyDaemon(JeedomDaemon):\n    async def on_message(self, message):\n        print('Received:', message)\n\nasync def main():\n    daemon = MyDaemon(\n        apikey=os.environ.get('JEEDOM_APIKEY', ''),\n        url=os.environ.get('JEEDOM_URL', 'ws://localhost:8080'),\n        callback=lambda x: print('Callback:', x)\n    )\n    await daemon.start()\n\nif __name__ == '__main__':\n    asyncio.run(main())","lang":"python","description":"Basic daemon subclass and startup."},"warnings":[{"fix":"Provide a callback function (e.g., lambda x: None) or implement a proper reply handler.","message":"JeedomDaemon now requires an explicit callback parameter in the constructor. In older versions (<1.0.0) the callback was optional. If omitted, the daemon will not process replies and may hang.","severity":"breaking","affected_versions":"<1.0.0 vs >=1.0.0"},{"fix":"Use 'from jeedomdaemon import JeedomSocket' instead.","message":"The old import path 'from jeedomdaemon.jeedom_socket import JeedomSocket' is deprecated. All public classes are now exposed at the top-level package.","severity":"deprecated","affected_versions":">=1.2.0"},{"fix":"Always define on_message with 'async def'.","message":"The daemon's on_message method must be a coroutine. If you define it as a regular function, the library will not await it and the message will be silently dropped.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Run 'pip install jeedomdaemon' in the correct environment.","cause":"The package is not installed or installed in a different Python environment.","error":"ModuleNotFoundError: No module named 'jeedomdaemon'"},{"fix":"Pass a valid callback function, even if it's a no-op: callback=lambda x: None.","cause":"The callback parameter was not provided or is not a callable (e.g., None).","error":"TypeError: object NoneType can't be used in 'await' expression"},{"fix":"Check the 'url' parameter (should be ws:// or wss://) and ensure Jeedom is accessible.","cause":"The WebSocket URL is wrong or the Jeedom core is not running.","error":"aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host ..."}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}