-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No data is returned with read_data() #16
Comments
👍 I get the same issue |
Hello guys, sorry for coming back late to you. Unfortunately I don't have any device with Windows installed anymore, so I suspect that I could not be of a help any time soon here.. But in case you figure out the solution by yourself - could you please let me know about it, so I'll add it to the readme. Many thanks! |
FWIW, this wasn't a Windows issue for me—I got the same problem on MacOS and Raspbian Linux. |
I encountered the same issue with my ZGm053UKA which identified itself as:
I found this document describing the protocol, which matches what a raw hid read was giving me. i.e. it's not encrypted. The following solved the issue for me: def hid_read(self):
""" Read 8-byte string from HID device """
- msg = self._h.read(8)
- return self._decrypt(msg)
+ return self._h.read(8)
@contextmanager
def co2hid(self, send_magic_table=True): Hope that's helpful. |
@a-r-w I can confirm that your fix also worked for me. OS X 10.14.6, Python3, Device: TFA-Dostmann AirControl Mini CO2. Thanks! |
Hello all. I've added an argument to @a-r-w Thanks a lot for the solution! |
New co2meter.py is not working. The hack from a-r-w already works fine. `Olivers-MacMini2018:co2meter Oliver$ ls pycache co2meter.sh log_co2.csv usage.txt
Olivers-MacMini2018:co2meter Oliver$ python3
` |
should do the same as #16 (comment) |
Works perfectly. Sorry for the inconvinience. |
Hi @vfilimonov, glad it was useful. I can also confirm 5d4187d is working fine for me with bypass_decrypt=True. Thank you! |
I tried a-r-w's hack and the new commit's bypass-decrypt approach but I am still getting the hang-up when calling read_data(). Has anyone had this issue with the newer Co2Meters? Is there maybe a new way that the data is encrypted or something? Mine's info is: |
Hi @Pinkers Thank you for your interest in co2meter and I’m sorry about your issues. To be honest there’s little what I can do or suggest about other vendors. I did not find any proper documentation and just hacked myself out looking for boots and pieces in the Internet and other repos (see readme - resources). Where exactly the code hangs? It worth looking at what self._h.read() returns for different message lengths. Perhaps the message is not encrypted but shorter/longer. If encrypted - worth trying different magic words - e.g. your vendor name. That are the obvious things that come to my mind to start with. |
@vfilimonov Thank you so much for the quick reply! After many days of debugging it is now working though I have no idea why. The only thing that has changed is that I ran it with the proprietary software found here. Maybe that configured the HID driver for the device or something, honestly I am stumped. But I really appreciate the help, and I am grateful it is now working |
To update this, read_data() only returns when the ZG.exe (proprietary software mentioned earlier) is running first, then the CO2Meter is connected via USB, then read_data() is called. Any insights into why are welcome. |
I can also confirm this issue, With the device TFA AIRCO2NTROL COACH ({'vendor_id': 1241, 'product_id': 41042, 'manufacturer': 'Holtek', 'product_name': 'USB-zyTemp', 'serial_no': '2.00'}), read_data() only shows values when the ZG.exe was started before. |
Hello,
I have followed the setup instructions for Windows, but when I try to follow the example, I get no data from the read_data() call.
Any ideas?
The text was updated successfully, but these errors were encountered: