Skip to main content

A push gateway sending webthing properties updates to a openhab server

Project description

OpenhabWebThingPushGateway

A push gateway sending webthing properties updates to a openhab server

This project provides a background service connecting webthing API-based devices such as windsensors or motion detector to the Openhab automation system.

Internally, the service uses the web socket notification capability of the webthing api to listen for changes. If a webthing property is updated, the service will use the REST api of the Openhab installation to update the assoiciated Openhab item.

For each link (webthing property <-> openhab item association) an entry in a gateway config file has to be placed. E.g. a concrete config file may look like

# webthing_root_uri, webthing_property_name, openhab_root_uri, openhab_item_name
http://192.168.1.21:9131/, temperature, http://192.168.1.12:8080, TempCurrent
http://192.168.1.21:9132/, windspeed, http://192.168.1.12:8080, WindspeedCurrent
http://192.168.1.187:9045/, motion, http://192.168.1.12:8080, MotionGroundfloor

The first entry is the webthing endpoint uri, the second the property name to be linked. The third parameter is the endpoint uri of the openhab installation, and the fourth parameter is the item name (which may differ from the webthing property name)

To service can be started manually via command line using

sudo pushgateway --command listen --filename /etc/pushgateway/gateway.conf

Alternatively to the listen command, you can use the register command to register and start the service as systemd unit. By doing this the service will be started automatically on boot. Starting the server manually using the listen command is no longer necessary.

sudo pushgateway --command register --filename /etc/pushgateway/gateway.conf

To install this software you may use PIP package manager such as shown below

sudo pip install pushgateway

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

pushgateway-0.1.13.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pushgateway-0.1.13-py3-none-any.whl (12.5 kB view details)

Uploaded Python 3

File details

Details for the file pushgateway-0.1.13.tar.gz.

File metadata

  • Download URL: pushgateway-0.1.13.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6

File hashes

Hashes for pushgateway-0.1.13.tar.gz
Algorithm Hash digest
SHA256 41ce0e5ed96e7bf1ff52795e49b3c8013b3c90cd33960da99079992527473443
MD5 2fb7b81860fef7f91257dd4c5c6db71a
BLAKE2b-256 1647ea8692e61e73762be68aa08ea5b6340e0c7149a2e9b7e237f43fdc11cbfb

See more details on using hashes here.

File details

Details for the file pushgateway-0.1.13-py3-none-any.whl.

File metadata

  • Download URL: pushgateway-0.1.13-py3-none-any.whl
  • Upload date:
  • Size: 12.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6

File hashes

Hashes for pushgateway-0.1.13-py3-none-any.whl
Algorithm Hash digest
SHA256 af0fa331a45bbc0fc3f7206ac64fda7e0b916d52570b9d1c08b88f1192bb92a1
MD5 2c7b792c8b5b56a458e41e55477062a2
BLAKE2b-256 882925cc00b60abaadf3aedaaf7ddb926d078e1aac1b38ddede80cafe69a88fc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page