Skip to content

Commit

Permalink
Fix Vallox object init preventing start
Browse files Browse the repository at this point in the history
  • Loading branch information
kaunderi committed Dec 13, 2023
1 parent 63b9818 commit 5b173e7
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 37 deletions.
4 changes: 0 additions & 4 deletions MQTT_config.py

This file was deleted.

2 changes: 0 additions & 2 deletions Serial_config.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
SERIAL_PORT = "/dev/ttyS0"

SENTENCE_START = b"\x01"

SENTENCE_SYSTEM = b"\x11"
Expand Down
2 changes: 1 addition & 1 deletion Vallox_communicator.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def change_fan_speed(self, value):


if __name__ == "__main__":
vallox = Vallox(MQTT_BROKER, MQTT_TOPIC, MQTT_USERNAME, MQTT_PASSWORD, SERIAL_PORT)
vallox = Vallox()
vallox.subscribe()
monitor = threading.Thread(target=vallox.monitor_values)
monitor.start()
33 changes: 3 additions & 30 deletions vallox_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,12 @@

# MQTT Configuration
MQTT_BROKER = "mqtt://your-mqtt-broker-url" # Replace with your MQTT broker URL
MQTT_TOPIC = "vallox" # Replace with your MQTT topic
MQTT_TOPIC = "homeassistant/sensor/vallox" # Replace with your MQTT topic
MQTT_USERNAME = "your-mqtt-username" # Replace with your MQTT username
MQTT_PASSWORD = "your-mqtt-password" # Replace with your MQTT password

# Serial Port Configuration
SERIAL_PORT = (
"/dev/ttyUSB0" # Replace with the serial port your Vallox device is connected to
"/dev/ttyS0" # Replace with the serial port your Vallox device is connected to
)
BAUD_RATE = 9600

# Define temperature identifiers and lookup values
TEMP_IDENTIFIERS = {
0: "TEMP_0",
1: "TEMP_1",
# Add more temperature identifiers as needed
}

TEMP_LOOKUP = {
0: 20.0,
1: 22.5,
# Add more temperature lookup values as needed
}

# Define fan speed lookup values
FANSPEED_LOOKUP = {
0: "LOW",
1: "MEDIUM",
2: "HIGH",
}

# Define fan speed settings
FANSPEED_SET = {
"LOW": b"\x01",
"MEDIUM": b"\x02",
"HIGH": b"\x03",
}
BAUD_RATE = 9600

0 comments on commit 5b173e7

Please sign in to comment.