venta_protocol_v2_device

Venta Protocol V2 Device

GitHub repository Project Status: Active – The project has reached a stable, usable state and is being actively developed. License: MIT Python PyPI Version Ask DeepWiki

venta-protocol-v2-device is a small Python package for controlling Venta air humidifiers and air washers on your local network.

It is made for Venta devices that use protocol version 2 and expose the /datastructure endpoint. You give the package the device IP address, and it lets you read the current status or send simple control commands from Python. If you want to control devices using protocol version 3, you can examine bobiboy/venta_protocol_v3_device.

What This Package Does

This package helps you automate common Venta device actions, including:

The package keeps the interface close to venta_protocol_v3_device, so code written for Venta protocol v3 devices should feel familiar.

Who It Is For

This package is useful if you want to:

Installation

Install the package with pip:

pip install venta-protocol-v2-device

Quick Example

from venta_protocol_v2_device import Venta_Protocol_v2_Device

device = Venta_Protocol_v2_Device("192.168.178.87")

status = device.getStatus()
print(status)

device.setPower(True)
device.setFanSpeed(2)
device.setTargetHum(50)

Replace 192.168.178.87 with the IP address of your own Venta device.

Reading Device Data

After calling getStatus(), the package stores the returned values on the device object.

device.getStatus()

print(device.Power)
print(device.FanSpeed)
print(device.Humidity)
print(device.Temperature)
print(device.WaterLevel)

You can also export the current object state as formatted JSON:

print(device.toJSON())

Supported Commands

The main control methods are:

Each method sends a request to the Venta device and returns True when the requested value is reflected in the device response.

Device Discovery

Protocol version 2 devices do not appear to support the same discovery mechanism used by protocol version 3 devices. Because of that, this package does not include automatic discovery.

Use the device IP address directly:

device = Venta_Protocol_v2_Device("192.168.178.87")

For reliable automation, it is best to reserve a fixed IP address for the Venta device in your router or access point.

Network Security

Use this package only on a trusted local-area network and in a friendly environment. Venta protocol version 2 uses unauthenticated, unencrypted HTTP. It cannot protect commands or telemetry against observation or modification by another party with access to local traffic.

Logging and Privacy

Debug logging records request payloads and complete device responses. Logs can therefore contain control actions, sensor telemetry, device identifiers, and MAC addresses. Enable debug logging only on a trusted LAN and in a friendly environment. Restrict access to log files, retain them only as long as needed, and redact sensitive values before sharing logs publicly.

Notes

Codex Contribution

OpenAI Codex contributed to this project by reviewing the implementation and proposing, implementing, and validating security fixes and code optimizations. This work included hardening device-response processing, restricting connections to trusted LAN addresses, strengthening dependency and CI security, bounding response sizes, and improving security documentation. All Codex-assisted changes were reviewed and regression-tested on a local Venta device by the maintainer before integration.

License

This project is released under the MIT License.