pydevccu


Namepydevccu JSON
Version 0.1.12 PyPI version JSON
download
home_pagehttps://github.com/sukramj/pydevccu
SummaryVirtual HomeMatic CCU XML-RPC backend.
upload_time2025-07-09 05:46:21
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/b4/c8/0cb34ee68785c71cef7d34bad567e2b40b7d9ca2caad4c8fa53f1fbfc1be/pydevccu-0.1.12.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.12",
    "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": "c8cd1f36ea8e605eb3b2b5c8533b3a87b607b509a22be6e8f28160be8965c08a",
                "md5": "f4a5227d19875482b4a46bf67b40e0a4",
                "sha256": "44b774c41f236df4bfc6c54de208dcd2a2f41167d27852c7c12b628adf69db22"
            },
            "downloads": -1,
            "filename": "pydevccu-0.1.12-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f4a5227d19875482b4a46bf67b40e0a4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.13.0",
            "size": 1769476,
            "upload_time": "2025-07-09T05:46:19",
            "upload_time_iso_8601": "2025-07-09T05:46:19.391003Z",
            "url": "https://files.pythonhosted.org/packages/c8/cd/1f36ea8e605eb3b2b5c8533b3a87b607b509a22be6e8f28160be8965c08a/pydevccu-0.1.12-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "b4c80cb34ee68785c71cef7d34bad567e2b40b7d9ca2caad4c8fa53f1fbfc1be",
                "md5": "bc09da25716e91541a9edc841db230b3",
                "sha256": "d22909b38cc50d56dd8616186e137d58ec7d6978850a9ef275b91fe8428d1cc2"
            },
            "downloads": -1,
            "filename": "pydevccu-0.1.12.tar.gz",
            "has_sig": false,
            "md5_digest": "bc09da25716e91541a9edc841db230b3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.13.0",
            "size": 1222466,
            "upload_time": "2025-07-09T05:46:21",
            "upload_time_iso_8601": "2025-07-09T05:46:21.425582Z",
            "url": "https://files.pythonhosted.org/packages/b4/c8/0cb34ee68785c71cef7d34bad567e2b40b7d9ca2caad4c8fa53f1fbfc1be/pydevccu-0.1.12.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-09 05:46:21",
    "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.41702s