Coder Social home page Coder Social logo

hacomfoairmqtt's People

Contributors

adorobis avatar jschanz avatar mogwai2 avatar mweimerskirch avatar pimdoos avatar timweyand avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hacomfoairmqtt's Issues

Trouble installing

Hi, I came across your repo and I'm trying to install it to Home Assistant on a Pi4b.
I have the MQTT broker already running in HA but I'm struggling with the instructions from the readme.me
file (please forgive my noob knowledge). I also happen to have a seperate Pi3b with Pi OS which can be used
to connect to my Storkair WHR930 (same as comfoair).

When I run "source /usr/local/share/ca350/bin/activate.csh", I get this:

pi@raspberrypi:/usr/local/share/ca350/bin $ source /usr/local/share/ca350/bin/activate.csh
-bash: alias: deactivate: niet gevonden
-bash: alias: 'test $?_OLD_VIRTUAL_PATH !': ongeldige naam voor alias
-bash: deactivate: opdracht niet gevonden
-bash: setenv: opdracht niet gevonden
-bash: setenv: opdracht niet gevonden
-bash: /usr/local/share/ca350/bin/activate.csh: regel 26: syntaxfout: onverwacht bestandseinde

Sorry for Dutch, but it basically says:

_-bash: alias: deactivate: not found
-bash: alias: 'test $?OLD_VIRTUAL_PATH !': invalid name for alias
-bash: deactivate: command not found
-bash: setenv: command not found
-bash: setenv: command not found
-bash: /usr/local/share/ca350/bin/activate.csh: regel 26: syntaxerror: unexpected fileend

Is this because I'm not running FreeBSD (e.g. TrueNAS)?

Enable/disable ETW

I am new here. I’ve been busy setting up my home assistant for a few days now. This thread was very helpful, thank you all!

We have a WHR930 (1 print version with only rj45 connector).
This is connected as indicated in this topic via a serial - usb adapter on a raspberry pi.

As a software I try the adorobis/hacomfoairmqtt, first no connection to serial but after flipping tx/rx the script continues but stops with the error:

26-08-2023 06:14:42 DEBUG: Sending autodiscover for homeassistant/binary_sensor/ca350_bypass_valve/config
Traceback (most recent call last):
File "/home/pi/ca350/ca350.py", line 1110, in
get_temp()
File "/home/pi/ca350/ca350.py", line 374, in get_temp
EWTTemp = data[6] / 2.0 - 20
IndexError: index out of range

I suspect this is because our WHR930 does not have the ETW.
In the config I don’t see an option to turn it off, does anyone know how to solve this?

ca350 sensor name deprecated

From HA 2024.2.0 ca350 sensors will stop to work... here you are the warning that i get upgrading to latest home assistant (sorry it's in italian)...

Alcune entità MQTT hanno un nome di entità che inizia con il nome del dispositivo. Questo non è previsto. Per evitare un nome duplicato, il prefisso del nome del dispositivo viene privato del nome dell'entità come soluzione alternativa. Si prega di informare il manutentore dell'applicazione software che fornisce le entità interessate per risolvere questo problema.

Elenco delle entità interessate:

binary_sensor.ca350_preheating_status
binary_sensor.ca350_summer_mode
sensor.ca350_supply_temperature
number.ca350_filter_weeks
sensor.ca350_summer_mode
sensor.ca350_analog_sensor_4
binary_sensor.ca350_filter_status
climate.ca350_climate
sensor.ca350_filter_hours
sensor.ca350_ewt_temperature
sensor.ca350_exhaust_temperature
sensor.ca350_analog_sensor_2
number.ca350_ewt_high_temperature
sensor.ca350_return_air_level
sensor.ca350_bypass_valve
sensor.ca350_analog_sensor_1
sensor.ca350_return_temperature
sensor.ca350_exhaust_fan_speed
sensor.ca350_analog_sensor_3
sensor.ca350_supply_fan_speed
button.ca350_reset_filter
number.ca350_ewt_low_temperature
binary_sensor.ca350_bypass_valve
sensor.ca350_supply_air_level
sensor.ca350_outside_temperature
number.ca350_ewt_speed_up

measure internal API break

image

I just publish a small "pull request" that fix a little issue: i'm developing a nice card that using internal Home Assistant API make a graph of external home temperature that i get from CA350 sensor... without this patch i cannot use ca350_outside_temperature

Feature request: Add support for RS485 communication to WHR950

Would you consider adding support for the WHR950 based on the RS485 communication protocol:
https://matsab.de/de/heimautomatisierung/comfoair

Attached a modified version of your script that I made and tested.

What is working:

  • Reading temperatures (only 3 sensors are supported, supply temperature to the house is not measured)
  • Fan % and RPM

Not yet working:

  • Reading comfort temperature (should be possible)
  • Controlling fan level (cannot get it to work, not sure why)
  • Some status stuff I still need to figure out

My modified version of the script. I see that quite some changes have been made in the meantime, I could merge my changes in the new version and test if that would help you...
whr950.zip

Feature request: Add a debug switch to publish the raw data

It can be really helpful during the troubleshooting if we can have a debug switch, when the switch is set to TRUE, we publish a new MQTT message that contains the row data
I'm not sure if a single message is enough or we need a message for every different value
the goal is to see the raw returned value in MQTT/HA without the need to debug the python script itself

Summer/Winter status

According to the documentation http://www.see-solutions.de/sonstiges/Protokollbeschreibung_ComfoAir.pdf, you may want to update the bypass_status by swapping summer with winter status.

######## PROTOCOL ########
Kommando: 0x00 0xDF Status Bypassregelung abrufen
Daten: -
Antwort: 0x00 0xE0
Daten:
Byte[1] 0x00
Byte[2] 0x00
Byte[3] Bypass Faktor
Byte[4] Bypass Stufe
Byte[5] Bypass korrektur
Byte[6] 0x00
Byte[7] Sommermodus (1 = ja / 0 = nein (Winter))
######## END ########

######## CA350 ########
def get_bypass_status():
# 0x07 0xF0 0x00 0x0B 0x00 0xB8 0x07 0x0F
# Checksum: 0xB8 (0x00 0x0B) = 0 + 11 + 0 + 173 = 184
# End: 0x07 0x0F

data = serial_command(b'\x07\xF0\x00\xDF\x00\x8C\x07\x0F')

if data == None:
    warning_msg('function get_bypass_status could not get serial data')
else:
    if len(data) > 8:
        BypassStatus = int(data[10], 16)
        SummerMode = int(data[13],16)
        publish_message(msg=str(BypassStatus), mqtt_path='comfoair/bypassstatus')
        if SummerMode==1:
            publish_message(msg='Summer', mqtt_path='comfoair/bypassmode')
        else:
            publish_message(msg='Winter', mqtt_path='comfoair/bypassmode')
    else:
        warning_msg('function get_bypass_status data array too short')

######## END ########

HA 2021.4 breaking change in mqtt fan integration

Need to update the fan component due to breaking change in the MQTT fan integration.
https://www.home-assistant.io/blog/2021/04/07/release-20214/#breaking-changes

The following messages are in the logs now:

2021-04-08 09:33:21 WARNING (MainThread) [homeassistant.components.mqtt.fan] The 'payload_high_speed' option is deprecated, please remove it from your configuration
2021-04-08 09:33:21 WARNING (MainThread) [homeassistant.components.mqtt.fan] The 'payload_low_speed' option is deprecated, please remove it from your configuration
2021-04-08 09:33:21 WARNING (MainThread) [homeassistant.components.mqtt.fan] The 'payload_medium_speed' option is deprecated, please remove it from your configuration
2021-04-08 09:33:21 WARNING (MainThread) [homeassistant.components.mqtt.fan] The 'speeds' option is deprecated, please remove it from your configuration
2021-04-08 09:33:21 WARNING (MainThread) [homeassistant.components.mqtt.fan] The 'speed_command_topic' option is deprecated, please remove it from your configuration
2021-04-08 09:33:21 WARNING (MainThread) [homeassistant.components.mqtt.fan] The 'speed_state_topic' option is deprecated, please remove it from your configuration

Preheating status publishes wrong value

The preheatingstatus is discovered as a binary sensor, but publishes it's state as 1 or 0.
Home Assistant expects ON or OFF for binary sensors, so it shows the sensor as 'Unknown' in the latest release.

image
image

Discovered entities with a name that starts with the device name

We currently do not follow Home Assistant's entity naming best practices. This causes an error in HA 2023.08 and will break in HA 2024.2.

Some MQTT entities have an entity name that starts with the device name. This is not expected. To avoid a duplicate name the device name prefix is stripped of the entity name as a work-a-round. Please inform the maintainer of the software application that supplies the affected entities to fix this issue.
List of affected entities:
sensor.comfoair_exhaust_temperature
sensor.comfoair_ewt_temperature
sensor.comfoair_supply_fan_speed
button.comfoair_reset_filter
(continued)

unit_of_measurement="�C",

The new version of the phyton script can no longer be started.

Various errors occur from....

root@ComfoAir:/opt/ca350/bin# python3 ca350.py
File "/opt/ca350/bin/ca350.py", line 934
state_topic="comfoair/outsidetemp", device_class="temperature", unit_of_measurement="�C",
^
SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xb0 in position 0: invalid start byte
root@ComfoAir:/opt/ca350/bin# ^C
root@ComfoAir:/opt/ca350/bin# python3 ca350.py
File "/opt/ca350/bin/ca350.py", line 934
state_topic="comfoair/outsidetemp", device_class="temperature", unit_of_measurement="�C",
^
SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xb0 in position 0: invalid start byte
root@ComfoAir:/opt/ca350/bin# python3 ca350.py
File "/opt/ca350/bin/ca350.py", line 934
state_topic="comfoair/outsidetemp", device_class="temperature", unit_of_measurement="�C",
^
SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xb0 in position 0: invalid start byte
root@ComfoAir:/opt/ca350/bin# python3 ca350.py
File "/opt/ca350/bin/ca350.py", line 939
state_topic="comfoair/supplytemp", device_class="temperature", unit_of_measurement="�C",
^
SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xb0 in position 0: invalid start byte
root@ComfoAir:/opt/ca350/bin# python3 ca350.py
File "/opt/ca350/bin/ca350.py", line 1045
state_topic="comfoair/ewttemp", device_class="temperature", unit_of_measurement="�C",
^
SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xb0 in position 0: invalid start byte
root@ComfoAir:/opt/ca350/bin# python3 ca350.py
File "/opt/ca350/bin/ca350.py", line 1050
command_topic="comfoair/ewtlowtemp", unit_of_measurement="�C", icon="mdi:thermometer-low",
^
SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xb0 in position 0: invalid start byte
root@ComfoAir:/opt/ca350/bin# python3 ca350.py
File "/opt/ca350/bin/ca350.py", line 1050
command_topic="comfoair/ewtlowtemp", unit_of_measurement="�C", icon="mdi:thermometer-low",

The solution was...

to change unit_of_measurement="°C" to unit_of_measurement="°C".

Feedback: running rootless container with podman & usb-serial

Just some feedback on running the container rootless with podman and usb-serial adapter attached.

Installation was easy and it runs smooth, good job 😎

Last time I tried to mount the serial adapter for another project failed with compose because of rootless. For now I'm just going with podman run.

My variables are in a file called config.env and this is my run command: podman run -d --name comfoair350 --restart=unless-stopped --env-file config.env --device /dev/ttyUSB0 --group-add keep-groups -e TZ=Europe/Berlin --network=host k42sde/hassioaddon-comfoair350:latest

It would be an improvement for your docker-compose.yml to externalize the variables as well and to include them via "env_file".

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.