Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

homie-helpers

Yet another python implementation of Homie Convection

In fact, it's a wrapper around another library Homie4 - just with changed API

Quick start

There are two possible approaches - choose one that suits you more!

Approach 1: setting properties using device object

# Let's create settings first...
SETTINGS = HomieSettings('mqtt.eclipseprojects.io', port=1883, username='...' password='...')

# Callback for 'ison' property
def set_enabled(value):
    print('Turning %s' % ('on' if value else 'off'))

# Create Homie object
# At this moment the MQTT messages will be sent!
homie = Homie(SETTINGS, "my-thermometer", nodes=[
    Node("status", properties=[
        FloatProperty("temperature", unit="C"),             # client cannot modify this property
        BooleanProperty('ison', set_handler=set_enabled)    # client CAN modify this property - will call callback
    ])
])

homie['temperature'] = 20.0

Approach 2: setting properties using property objects

# Let's create settings first...
SETTINGS = HomieSettings('mqtt.eclipseprojects.io', port=1883, username='...' password='...')

# Callback for 'ison' property
def set_enabled(value):
    print('Turning %s' % ('on' if value else 'off'))

property_temperature = FloatProperty("temperature", unit="C"),      # client cannot modify this property
property_ison = BooleanProperty('ison', set_handler=set_enabled)    # client CAN modify this property - will call callback 
    
# Create Homie object
# At this moment the MQTT messages will be sent!
homie = Homie(SETTINGS, "my-thermometer", nodes=[
    Node("status", properties=[property_temperature, property_ison])

property_temperature.value = 20.0

Metadata

Release files for homie-helpers 0.0.7.dev1677103353

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for homie-helpers 0.0.7.dev1677103353
File Size Uploaded Provenance
homie-helpers-0.0.7.dev1677103353.tar.gz 7.8 kB Without provenance Details

Release files / homie-helpers-0.0.7.dev1677103353.tar.gz

Download URL homie-helpers-0.0.7.dev1677103353.tar.gz
Size 7.8 kB
Tags Source
SHA-256 checksum
How to use checksums
0c1678932dcdc643dc15a161372f10760ef38685132ec10481c7b3fde3a3591c
BLAKE2b-256 checksum
How to use checksums
248a4c6235a94437373d76f75b23214292d7ec90bc993c8fad2b3216bd56f52b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Security for homie-helpers 0.0.7.dev1677103353

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page