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.dev1677103136

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.dev1677103136
File Size Uploaded Provenance
homie-helpers-0.0.7.dev1677103136.tar.gz 7.7 kB Without provenance Details

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

Download URL homie-helpers-0.0.7.dev1677103136.tar.gz
Size 7.7 kB
Tags Source
SHA-256 checksum
How to use checksums
0ae18af73c3f9da63836b39c1a390bdbf2f467c45e577a8e09707307dc343be7
BLAKE2b-256 checksum
How to use checksums
4c4a3c38e1e2315b14f5266c5d0e18798aab091ae76f3ec335de145260d5916e
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.dev1677103136

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