co2meter
co2meter copied to clipboard
TFA Dostmann AIRCO2NTROL Coach
For TFA Dostmann AIRCO2NTROL Coach version of co2meter I had to comment out the _decrypt(msg)
in co2meter.py, i.e. this works:
def hid_read(self):
""" Read 8-byte string from HID device """
return self._h.read(8)
Otherwise (None, None) is returned.
Here is the >>> mon.info
{'product_name': u'USB-zyTemp', 'vendor_id': 1241, 'serial_no': u'2.00', 'product_id': 41042, 'manufacturer': u'Holtek'}
Ok, so TFA Dostmann AIRCO2NTROL Coach measures humidity as well. Humidity measurement starts with 0x41
code (learned here).
I made all the necessary changes to output the humidity, with the exception of homekit.py
, which does not work for me at all. Here is the new code:
https://github.com/alpxp/co2meter/commit/e70c36e618d46481a26456de772badf4eaae2c8d
Screenshots with humidity:
I think this code will not work with the Mini
version out of the box, because of the encryption there, which has been commented out in https://github.com/alpxp/co2meter/commit/e70c36e618d46481a26456de772badf4eaae2c8d. May be this is easy to fix by adding some kind of detection of the device version. The rest of the code should be relatively ok, as Mini
returns 0 for 0x41
(humidity) by default.
Hello @alpxp
Thanks for reporting and figuring out how to decode humidity!
Let me have a look and incorporate your code to co2meter. I suspect that I'd need to wrap _decrypt()
with some flag which should be set in the beginning - my model sends encrypted messages
Similar issue: https://github.com/vfilimonov/co2meter/issues/16
It took 8 months (🤦), but the bypass_decrypt
argument has been added to master: https://github.com/vfilimonov/co2meter/commit/5d4187dbd666163911601e0076336e42a4045afc
Cool :) I'm remaining on my fork for now, because I use the Humidity readings as well. I have also implemented MQTT output to be used with the Home Assistant/Influx/Grafana etc... Might do a pull request later if this is interesting.
@alpxp Could you discribe how to use your fork for MQTT Output? I woul integrate it in Home Assistant. Thank you in Advice
@Major2828 you may check https://github.com/devbis/co2mqtt I'm using it for HA integration. Thinking about my own component, but not there yet.