-
-
Notifications
You must be signed in to change notification settings - Fork 28
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
Initial support for GVH5074 #21
Conversation
Looks good. Have you tested with a negative temp on your device? By my research on this device, the negative is stored via 2s complement, not the same way it is stored in the GVH5075 (as you've done here just with 2 bytes rather than 3). This code snippet demos the difference between the 2 methods
with output
|
I did throw my GVH5074 in the freezer and was receiving correct negative readings from it (I was also pleasantly surprised with the signal strength for it being inside a metal box). I am not very familiar with bitwise operations and just learned about two's complement today (thanks)! I added my method to yours above...
Output:
I'm not sure if I just got lucky with my method or if the math actually checks out, but I can update mine to use the two's complement. |
Looks like you're super close to a twos_complement but missing the shift by 1 (see here). The function I used is basically this. However, I'm thinking |
I see the commit, but I just want to confirm before I merge that the change gets you good temperature values (positive and negative). |
|
||
`02` - unknown | ||
|
||
## Temperature |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can edit this section now if the .geti
is working appropriately.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Two's complement is so close to what you figured out. It's subtracting the temp value from 0x10000
instead of from 0xFFFF
!
* Initial 5074 testing * Fixed decimal rounding issue * Adding refrence material * Now using geti for two's complement * Updated notes for new temperature method * Fixed internal anchor link Co-authored-by: cornking03 <[email protected]> Co-authored-by: cornking03 <[email protected]> Co-authored-by: cornking03 <[email protected]>
* Start of Blerry 2 Config loading from json files * revert default config as json basic device setup framework * basic handle and active scan loading from driver * basic callback functionality basic classes for advert interp * working callback and advert reading * create attribute and sensor classes * pull in all tasmota settings v1 did webui display trial basic ATCpvvx support * attributes in webui bc why not * enable binary sensors prep for working on discovery "finish" ATCpvvx driver * basic publishing * rename config file, add initial dev driver * fix webui, string_upper func, upper the macs * initial sensor discovery * protect helper functions as static methods * add binary sensor discovery add todo list * add via_pubs support * add general calibration * add dewpoint calcs back into drivers limit driver list to those supported * add general precision support * add driver for GVH5074 add spoofer, notes, config for GVH5074 add some notes to dev driver add twos_complement helper function do not require 'advanced' in user config do not require 'override' in user config * rename to drivers for V2 * rename device_notes to driver_notes * port GVH5075 driver * port IBSTH2 driver (need testers!) * add version numbering * Add support for Xiaomi_LYWSDCGQ This could morph to a more generic Xiaomi driver * Add ThermoPro TP59 Driver todo: verify negative temp * driver loading logs * workaround for some tasmota versions * Fix: Driver: ThermoPro_TP59: fix humidity * first thwack at a v0.2.x README * Support ATC/pvvx on Mi-Like with Xiaomi driver * add "ignored" flag tiny Inkbird change * update readme for ignore flag * beginning of setup script * setup 2 * setup 3 * start some Tasmota Commands * BlerySet/Get/DelDevice and BlerrySet/Get/DelConfig * test auto download driver * some log statements for dl driver * try fix blerry setup delete itself * try again * try again again * move drivers into drivers folder update driver download location change GVH5074 to use geti instead of an extra twos_complement function * update gitignore * Initial support for GVH5074 (#21) (#24) * Initial 5074 testing * Fixed decimal rounding issue * Adding refrence material * Now using geti for two's complement * Updated notes for new temperature method * Fixed internal anchor link Co-authored-by: cornking03 <[email protected]> Co-authored-by: cornking03 <[email protected]> Co-authored-by: cornking03 <[email protected]> * Reorganize for v0.2.x and beyond * rename GVH5075 doc * update URLs and cleanup * missed 1 URL * improve command code a bit. * publish after 5 minutes even if no value change * port switchbot temp and humidity * port switchbot motion sensor (WoPresence) fix readme to represent current devices * port switchbot contact sensor (WoContact) fix binary_sensor publish_available * fix print message prefix in drivers * Add GVH5184 driver and associated blerry.be changes (#26) * Uncommented GVH5184 * Ported over from old dev-blerry2 branch This is driver written by ElksInNC and refactored by Tony-fav. * Create GVH5184.md * Create 5184 fake packet file * Create 4 fake packets - 2 for each sequence * Revised documentation for 5184 driver * Fake MAC for injection of fake p messages * Updated p-strings with fake MAC * Changed alias to match p-faker * Re-arranged fake packets * setup script check for blerry_config.json * Update README * Update README: Tasmota Commands * blerry setup now enables BLE if it is not cleanup todo * setup script as tasmota command * setup script can act as upgrade script * Port GVH5182 * Update README * Port GVH5183. All drivers now ported to v0.2.x * calibration and precision only for numbers * initial switchbot bot support (#29) Switchbot Bot support (WoHand) added concept of BlerryActions, autodiscovered to HA Buttons Discovery Settings Fix * Update README.md * Updated Firmware. See NOTES.md * SetOption8 Support * add discovery override enables using state_class measurement for HA statistics. * firmware updates * firmware fix, update, idk, it broke somehow before * try fix setoption8 behavior on non numeric values * autoexec.be line to load BLErry * publish less often * try web display less * only change webui display every 10s * use built in string.toupper function 🤦 * remove twos_complement function (geti does this) * add GVH5179 support to GVH5074 driver * Update blerry_driver_Xiaomi.be * single purpose blerry script for RadonEye * Add HHCCJCY01 to Xiaomi Driver Co-authored-by: cornking03 <[email protected]> Co-authored-by: cornking03 <[email protected]> Co-authored-by: ElksInNC <[email protected]>
Values reported over MQTT all match expected values. Several features were added following examples from existing drivers, but not tested such as HA discovery, via_pubs, and publish attributes.