Nope
Yeah, just one more small fix str
instead of int
in the line:
publish_message(msg=str(FilterStatusBinary), mqtt_path='comfoair/filterstatus_binary')
I tried both the conditions
the filter status remains OK all the time
Bingo
To summarize
if data[8] == 0:
FilterStatus = 'Ok'
FilterStatusBinary = 'OFF'
elif data[8] == 1:
FilterStatus = 'Full'
FilterStatusBinary = 'ON'
and
publish_message(msg=str(FilterStatusBinary), mqtt_path='comfoair/filterstatus_binary')
So the full function will look like that:
def get_filter_status():
data = send_command(b'\x00\xD9', None)
if data is None:
warning_msg('get_filter_status function could not get serial data')
else:
if len(data) > 16:
info_msg('Filter query data: {0}'.format(data))
if data[8] == 0:
FilterStatus = 'Ok'
FilterStatusBinary = 'OFF'
elif data[8] == 1:
FilterStatus = 'Full'
FilterStatusBinary = 'ON'
else:
FilterStatus = 'Unknown'
FilterStatusBinary = 'OFF'
publish_message(msg=str(FilterStatus), mqtt_path='comfoair/filterstatus')
publish_message(msg=str(FilterStatusBinary), mqtt_path='comfoair/filterstatus_binary')
debug_msg('FilterStatus: {0}'.format(FilterStatus))
else:
warning_msg('get_filter_status data array too short')
Works ok for me. Just can’t check if indeed the filter needs replacement as I don’t use the display anymore.
Great. Now would be good if you could reset the filter status and confirm that HA will show it Ok again. How do you reset the filter state?
Sure, IIRC it should be enough to press OK on the display
BTW, I will do it tomorrow; I can’t do it now without waking up the entire family :(, that’s why I love sooooo much this integration, being able to get data from remote is priceless
I will keep you posted
If it works, the automation should be
According to the manual the filter status reset procedure is more complicated but I’ve always had problems with it, most of the time displaying the filter message.
Automation trigger should be correct now.
HI,
it works
I pressed the OK button on the display and I changed the filters
Great! I’ve updated the repo with this fix already. One question though:
Are you running this integration and the display at the same time? If yes, how did you connect it and configure it that it works together?
I followed the instructions and I plugged this RS232/USB to the raspberry
then I built the cable as you described
It seams that both are working together
regards
OK, thanks, I’ll give it another try
@adorobis, can I suggest you a new feature?
Add a switch DEBUG (Yes/No), when set to Yes, publish a MQTT text with the raw value of the data attribute
This will help a lot to understand the behavior without debug the python code
regards
Interesting idea Could you open a feature request on github?
And a question: as you still have the display connected maybe you could try to see if there is a way to listen to data returned. We are missing one major feature of the unit which is not documented in the protocol doc: switching mode to intake fan only, exhaust fan only or both.
@adorobis, can you explain me how to do the switch between intake fan only, exhaust fan only or both?
are you referring to these options?
this sounds a perfect case where the MQTT message with the raw data sounds really helpful
feel free to send me some instruction to explain how to do that
Yes, this is for this case. According to the manual this is the way to activate it. Are you using comfosense controller?
- Press OK. The text says SHIFT for 8
seconds. - Press MENU before the text SHIFT
disappears. The text says COMF. - Press once. The text says FAN.
- Press OK to confirm. The text says
IN, OFF. - Press or to choose which fan
to switch on or off. The following
options can be chosen:
■ IN OFF = Switch off the supply
fan;
■ OUT OFF = Switch off the
exhaust fan;
■ BOTH ON = Switch on both fans. - Press OK to confirm. The text says
SAVED for 2 seconds. The menu is
automatically closed. The symbol of
the chosen option is visible.
for the icon 5:
The problem is that I don’t know how to monitor what is being sent by the device So far only commands that have been described in the protocol documentation are implemented in this integration.
Hi @adorobis ,
I don’t have the comfosense controller, I have only the display mounted on the front panel
Here what I see in the manual
Essentially, press for 3 second the button to enable/disable the supply fan
I don’t see any reference to stop the exhaust fan
OK, got it. I think this panel is not communicating with the unit via RS232 but controls it directly. And options here are limited. I guess it won’t send any data on serial interface when you click on those buttons.