Email me at [email protected]
ozzyczech / mho-c401 Goto Github PK
View Code? Open in Web Editor NEWRead Temperature and Huminidy from MHO-C401 with Python3
Read Temperature and Huminidy from MHO-C401 with Python3
Email me at [email protected]
Hello OzzyCzech,
I have tried to use your Python scripts to connect to my MHO-C401 device, but without success. The scripts have been started from a Raspberry Pi with Python 3.7.3 according to your guide https://ozzyczech.cz/iot/read-temperature-and-huminidy-from-mho-c401. Here is the output of the script list-services.py with corrected MAC address of my device:
pi@xxxxxxxx:~/BT $ python3 list-services.py
Connecting to device...
Traceback (most recent call last):
File "list-services.py", line 6, in <module>
for service in device.getServices():
File "/usr/local/lib/python3.7/dist-packages/bluepy/btle.py", line 481, in getServices
return self.services
File "/usr/local/lib/python3.7/dist-packages/bluepy/btle.py", line 477, in services
self._serviceMap = self.discoverServices()
File "/usr/local/lib/python3.7/dist-packages/bluepy/btle.py", line 459, in discoverServices
rsp = self._getResp('find')
File "/usr/local/lib/python3.7/dist-packages/bluepy/btle.py", line 407, in _getResp
resp = self._waitResp(wantType + ['ntfy', 'ind'], timeout)
File "/usr/local/lib/python3.7/dist-packages/bluepy/btle.py", line 368, in _waitResp
raise BTLEGattError("Bluetooth command failed", resp)
bluepy.btle.BTLEGattError: Bluetooth command failed (code: 14, error: Request attribute has encountered an unlikely error)
pi@xxxxxxxx:~/BT $
Do you have an idea why it is not working? My MHO-C401 seems to work properly. I can read the temperature and the humidity using an ESP32 with Tasmota 9.1.0 without any issues.
Second question: I have seen, that you don't need the encryption key to read the temperature and the humidity. How is it possible? I think, the connection is encrypted.
Thank you in advance!
Kind regards
Flugente-19
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.