co2meter icon indicating copy to clipboard operation
co2meter copied to clipboard

TFA Dostmann AIRCO2NTROL Coach

Open alpxp opened this issue 4 years ago • 6 comments

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'}

alpxp avatar Mar 07 '20 21:03 alpxp

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: Screenshot 2020-03-08 at 14 58 50 Screenshot 2020-03-08 at 14 58 37 Screenshot 2020-03-08 at 14 58 58

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.

alpxp avatar Mar 08 '20 14:03 alpxp

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

vfilimonov avatar Apr 04 '20 13:04 vfilimonov

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

vfilimonov avatar Jan 04 '21 13:01 vfilimonov

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 avatar Aug 04 '21 08:08 alpxp

@alpxp Could you discribe how to use your fork for MQTT Output? I woul integrate it in Home Assistant. Thank you in Advice

Major2828 avatar Dec 07 '21 15:12 Major2828

@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.

hurricup avatar Dec 07 '21 16:12 hurricup