Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
danielperna84 committed Dec 30, 2019
1 parent 1d6691b commit 6b5eaef
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ If you develop applications that communicate with a CCU (or Homegear) via XML-RP

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.
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/danielperna84/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)`
Expand All @@ -29,7 +32,8 @@ import pydevccu
# 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)
s = pydevccu.Server(devices=['HM-Sec-WDS', 'HM-CC-RT-DN', 'HM-Sec-SC-2'], persistance=True)
# 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-CC-RT-DN', 'HM-Sec-SC-2'], persistance=True, logic={"startupdelay": 5, "interval": 30})
# Start server
s.start()
# Get address for a HM-Sec-WDS device
Expand Down

0 comments on commit 6b5eaef

Please sign in to comment.