A server for the HausNet protocol
Project description
hausnet-server
Server-side HausNet protocol implementation.
Architecture
A HausNet system consists of an integration with a management system (e.g. Home Assistant), this server software, and a network of devices running the protocol.
Protocol
Module / Device Configuration
Each module, or device, can have a set of one or more configuration items. Each configuration value consists of a name, and an implementation-dependent value. The value may have an internal structure, which is module / device dependent.
Node devices typically contain modules, each of which has its own configuration with multiple items. This can be modeled as nested dictionaries. Each device implementation takes care of managing the configuration structure.
Devices embedded in nodes typically don't have complex configuration values, just one or more key/value pairs. It is possible to have devices with a more complex config, though.
The point is that the config item value is up to the module or device, while modules and devices themselves fit into a formal higher-level structure not up to them.
An example of a structure containing configuration (in YAML) :
hausnode/48A8F0:
config:
network: # Multi-valued item
wifi_ap: "My access point"
wifi_pw: "mypassword"
flash_files: # Module that has no config items
heartbeat: # Module that has one item
period: 60
devices:
switch: # No configuration
thermo: # Multiple config items
units: "F"
period: 600
Development notes
Building & uploading PyPi package
- First, edit
setup.py
and update the version number. - Remove the old distribution, build the distribution, and push it to PyPi:
rm dist/* python setup.py sdist bdist_wheel twine upload dist/*
- Check in the final changes, and tag the release with "v1.2.3"
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for hausnet_server-0.0.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 99bf4828f86142d88571a4db477c7439bbca3b1f13f4152b21087d99fb98952f |
|
MD5 | f07743f9240e3c78def44f80ca5b1e7e |
|
BLAKE2b-256 | 060354e11b21d7f04bbf2e0caf9e02c5075bf654af146c1ea91567418b761746 |