pydevccu


Namepydevccu JSON
Version 0.1.14 PyPI version JSON
download
home_pagehttps://github.com/sukramj/pydevccu
SummaryVirtual HomeMatic CCU XML-RPC backend.
upload_time2025-07-23 17:54:50
maintainerNone
docs_urlNone
authorNone
requires_python>=3.13.0
licenseMIT License
keywords homematic ccu xml-rpc
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # pydevccu
Virtual HomeMatic CCU XML-RPC Server with fake devices for development.

If you develop applications that communicate with a CCU (or Homegear) via XML-RPC, you can use this server instead of a real CCU. It currently provides all HomeMatic Wired and HomeMatic Wireless devices (allthough some devices with multiple similar channels with just a single channel). HomeMatic IP devices will follow.  

The main objective is to provide you access to all available devices without owning them, as well as not stressing your CCU / messing with your devices while testing your work. It should also be possible to use this for automated testing / CI.  

The `init` method used to subscribe to events is available and functional. Events will be fired when you use the `setValue` or `putParamset` methods to change parameters of a device.  

When adding the `logic` argument while creating the server-object, modules found in _device\_logic_ will be loaded depending on which devices are enabled. For example: the module [HM_Sec_SC_2.py](https://github.com/sukramj/pydevccu/blob/master/pydevccu/device_logic/HM_Sec_SC_2.py) fires two events at the specified _interval_. The `STATE` toggles with every event, and `LOWBAT` gets toggled every 5 events.  
The _startupdelay_ randomizes when the eventloop will initially start from 0 to _startupdelay_ seconds. This is to prevent multiple devices from firing their events at the same time.

## Methods
- `setValue(address, value_key, value, force=False)`
- `getValue(address, value_key)`
- `getDeviceDescription(address)`
- `getParamsetDesctiption(address, paramset_key)`
- `getParamset(address, paramset_key)` (The `mode` argument of a real CCU is not supported)
- `putParamset(address, paramset_key, paramset, force=False)` (The `rx_mode` argument of a real CCU is not supported)
- `listDevices()`
- `init(url, interface_id)`
- `getServiceMessages()` (Returns dummy-error)
- `supportedDevices()` (Proprietary, `dict` of supported devices)
- `addDevices(devices)` (Proprietary, add additional devices during runtime. `devices` is a list of device names, like when initializing the server)
- `removeDevices(devices)` (Proprietary, remove devices during runtime. `devices` is a list of device names, like when initializing the server)

For more information about the methods refer to the official [HomeMatic XML-RPC API](https://www.eq-3.de/Downloads/eq3/download%20bereich/hm_web_ui_doku/HM_XmlRpc_API.pdf) (german).

## Usage

```python
import pydevccu
# Create server that listens on 127.0.0.1:2001
# To listen on another address initialize with ("1.2.3.4", 1234) as first argument
# Add optional list of device names to only load these devices
# Enable paramset persistance (will be saved to paramset_db.json)
# Enable automated device logic (only if module for device is available), firing events at intervals of 30 seconds
s = pydevccu.Server(devices=['HM-Sec-WDS', 'HM-Sen-MDIR-WM55', 'HM-Sec-SC-2'], persistance=True, logic={"startupdelay": 5, "interval": 30})
# Start server
s.start()
# Get address for a HM-Sec-WDS device
s.supportedDevices()['HM-Sec-WDS']
# Get device description
s.getDeviceDescription('VCU0000348')
# Get VALUES paramset for channel 1
s.getParamsetDescription('VCU0000348:1', 'VALUES')
# Get current state
s.getValue('VCU0000348:1', 'STATE')
# Set state to 2
# Set force=True because parameter does not allow write operations (it's a sensor updated by hardware in real life)
s.setValue('VCU0000348:1', 'STATE', 2, force=True)
# Set state to 1 using the putParamset method
s.putParamset('VCU0000348:1', 'VALUES', {'STATE': 1}, force=True)
# Trigger PRESS_SHORT event for HM-Sen-MDIR-WM55 on channel 2
s.setValue("VCU0000274:2", "PRESS_SHORT", True)
# Add a HM-CC-RT-DN device during runtime
s.addDevices(devices=['HM-CC-RT-DN'])
# Remove the HM-Sec-SC-2
s.removeDevices(devices=['HM-Sec-SC-2'])
# Stop server
s.stop()
```

## Installation

`pip install pydevccu`

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/sukramj/pydevccu",
    "name": "pydevccu",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.13.0",
    "maintainer_email": null,
    "keywords": "homematic, ccu, xml-rpc",
    "author": null,
    "author_email": "Daniel Perna <danielperna84@gmail.com>, SukramJ <sukramj@icloud.com>",
    "download_url": "https://files.pythonhosted.org/packages/29/f5/54b8dcbce605565f083af7eb6147b3be52b4890814cd3f0c1b5401ed0530/pydevccu-0.1.14.tar.gz",
    "platform": null,
    "description": "# pydevccu\nVirtual HomeMatic CCU XML-RPC Server with fake devices for development.\n\nIf you develop applications that communicate with a CCU (or Homegear) via XML-RPC, you can use this server instead of a real CCU. It currently provides all HomeMatic Wired and HomeMatic Wireless devices (allthough some devices with multiple similar channels with just a single channel). HomeMatic IP devices will follow.  \n\nThe main objective is to provide you access to all available devices without owning them, as well as not stressing your CCU / messing with your devices while testing your work. It should also be possible to use this for automated testing / CI.  \n\nThe `init` method used to subscribe to events is available and functional. Events will be fired when you use the `setValue` or `putParamset` methods to change parameters of a device.  \n\nWhen adding the `logic` argument while creating the server-object, modules found in _device\\_logic_ will be loaded depending on which devices are enabled. For example: the module [HM_Sec_SC_2.py](https://github.com/sukramj/pydevccu/blob/master/pydevccu/device_logic/HM_Sec_SC_2.py) fires two events at the specified _interval_. The `STATE` toggles with every event, and `LOWBAT` gets toggled every 5 events.  \nThe _startupdelay_ randomizes when the eventloop will initially start from 0 to _startupdelay_ seconds. This is to prevent multiple devices from firing their events at the same time.\n\n## Methods\n- `setValue(address, value_key, value, force=False)`\n- `getValue(address, value_key)`\n- `getDeviceDescription(address)`\n- `getParamsetDesctiption(address, paramset_key)`\n- `getParamset(address, paramset_key)` (The `mode` argument of a real CCU is not supported)\n- `putParamset(address, paramset_key, paramset, force=False)` (The `rx_mode` argument of a real CCU is not supported)\n- `listDevices()`\n- `init(url, interface_id)`\n- `getServiceMessages()` (Returns dummy-error)\n- `supportedDevices()` (Proprietary, `dict` of supported devices)\n- `addDevices(devices)` (Proprietary, add additional devices during runtime. `devices` is a list of device names, like when initializing the server)\n- `removeDevices(devices)` (Proprietary, remove devices during runtime. `devices` is a list of device names, like when initializing the server)\n\nFor more information about the methods refer to the official [HomeMatic XML-RPC API](https://www.eq-3.de/Downloads/eq3/download%20bereich/hm_web_ui_doku/HM_XmlRpc_API.pdf) (german).\n\n## Usage\n\n```python\nimport pydevccu\n# Create server that listens on 127.0.0.1:2001\n# To listen on another address initialize with (\"1.2.3.4\", 1234) as first argument\n# Add optional list of device names to only load these devices\n# Enable paramset persistance (will be saved to paramset_db.json)\n# Enable automated device logic (only if module for device is available), firing events at intervals of 30 seconds\ns = pydevccu.Server(devices=['HM-Sec-WDS', 'HM-Sen-MDIR-WM55', 'HM-Sec-SC-2'], persistance=True, logic={\"startupdelay\": 5, \"interval\": 30})\n# Start server\ns.start()\n# Get address for a HM-Sec-WDS device\ns.supportedDevices()['HM-Sec-WDS']\n# Get device description\ns.getDeviceDescription('VCU0000348')\n# Get VALUES paramset for channel 1\ns.getParamsetDescription('VCU0000348:1', 'VALUES')\n# Get current state\ns.getValue('VCU0000348:1', 'STATE')\n# Set state to 2\n# Set force=True because parameter does not allow write operations (it's a sensor updated by hardware in real life)\ns.setValue('VCU0000348:1', 'STATE', 2, force=True)\n# Set state to 1 using the putParamset method\ns.putParamset('VCU0000348:1', 'VALUES', {'STATE': 1}, force=True)\n# Trigger PRESS_SHORT event for HM-Sen-MDIR-WM55 on channel 2\ns.setValue(\"VCU0000274:2\", \"PRESS_SHORT\", True)\n# Add a HM-CC-RT-DN device during runtime\ns.addDevices(devices=['HM-CC-RT-DN'])\n# Remove the HM-Sec-SC-2\ns.removeDevices(devices=['HM-Sec-SC-2'])\n# Stop server\ns.stop()\n```\n\n## Installation\n\n`pip install pydevccu`\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "Virtual HomeMatic CCU XML-RPC backend.",
    "version": "0.1.14",
    "project_urls": {
        "Bug Reports": "https://github.com/sukramj/pydevccu/issues",
        "Homepage": "https://github.com/sukramj/pydevccu",
        "Source Code": "https://github.com/sukramj/pydevccu"
    },
    "split_keywords": [
        "homematic",
        " ccu",
        " xml-rpc"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "64ee8092b741e48426837f9db9e4c86f30846e5fbedd12728d51bfa1399411d9",
                "md5": "f8ee68c37a7fdd5973c8372192b7537d",
                "sha256": "fb1fa8f27ca8220fc39bc4d743e049db43c5df9bfc989a603a333d28b1679c96"
            },
            "downloads": -1,
            "filename": "pydevccu-0.1.14-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f8ee68c37a7fdd5973c8372192b7537d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.13.0",
            "size": 1807895,
            "upload_time": "2025-07-23T17:54:49",
            "upload_time_iso_8601": "2025-07-23T17:54:49.255246Z",
            "url": "https://files.pythonhosted.org/packages/64/ee/8092b741e48426837f9db9e4c86f30846e5fbedd12728d51bfa1399411d9/pydevccu-0.1.14-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "29f554b8dcbce605565f083af7eb6147b3be52b4890814cd3f0c1b5401ed0530",
                "md5": "7af7d382e51cf08aa6f7f5e3976e68fa",
                "sha256": "08aac79db32fbc8787f090609923696aa8b4bacc0c5cdad7530de129444c5d88"
            },
            "downloads": -1,
            "filename": "pydevccu-0.1.14.tar.gz",
            "has_sig": false,
            "md5_digest": "7af7d382e51cf08aa6f7f5e3976e68fa",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.13.0",
            "size": 1255621,
            "upload_time": "2025-07-23T17:54:50",
            "upload_time_iso_8601": "2025-07-23T17:54:50.675660Z",
            "url": "https://files.pythonhosted.org/packages/29/f5/54b8dcbce605565f083af7eb6147b3be52b4890814cd3f0c1b5401ed0530/pydevccu-0.1.14.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-23 17:54:50",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "sukramj",
    "github_project": "pydevccu",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pydevccu"
}
        
Elapsed time: 1.31818s