Home-Is-Where-You-Hang-Your-Hack / sensor.goveetemp_bt_hci

Govee Temperature/Humidity BLE Home Assistant Component
MIT License
161 stars 29 forks source link

Govee Temp Sensor #9

Closed dturgel closed 4 years ago

dturgel commented 4 years ago

Would you consider adding this third govee temp sensor to the integration?

dturgel commented 4 years ago

https://www.amazon.com/Bluetooth-Temperature-Thermometer-Hygrometer-Calibration/dp/B07DWMJKP5/ref=sr_1_3_sspa?dchild=1&keywords=temperature+sensor&qid=1591922835&sr=8-3-spons&psc=1&spLa=ZW5jcnlwdGVkUXVhbGlmaWVyPUEySzVIVEROU0JaVDQwJmVuY3J5cHRlZElkPUEwODIzNTY4M1ZCQlhYWVAyRkRaSSZlbmNyeXB0ZWRBZElkPUEwNDMwMTM1S0laWVFRU01JNlY4JndpZGdldE5hbWU9c3BfYXRmJmFjdGlvbj1jbGlja1JlZGlyZWN0JmRvTm90TG9nQ2xpY2s9dHJ1ZQ==

Thrilleratplay commented 4 years ago

From what I am reading, I believe the H5052 is bluetooth and not bluetooth LE. This component works by reading the broadcast signal the H5074 and H5075 emit roughly every second but no way to retrieve the historical data stored in the device. The H5052 would require connecting/pairing to read this data.

It is unlikely the H5052 will be added as I do not own one and the development to reverse engineer the protocol the would be more involved. Sorry.

diogosalazar commented 4 years ago

Hi there, I have purchased that sensor last year (through that same product link). The item I received seems to be broadcasting a payload as a BLE device. It is listed in my BLE scanner as GVH5072.

Please let me know if I can help add support to this item.

Thrilleratplay commented 4 years ago

@diogosalazar @dturgel Oy! The Amazon link has a product number of H5052 but the H5072 looks almost identical and is the "pro", whatever that means.

@dturgel Which model do you have?

@diogosalazar The H5072 appears to be similar to the H5075. Could you try to add your H5072 and comment out lines 157-159 from sensor.py? You may also need to comment out lines 162-164. If broadcasts are similar, that should be enough to work.

diogosalazar commented 4 years ago

Happy to report that after commenting out lines 157-159 from sensor.py my Govee Hygrometer was added to HA:

Govee Sensor

:thumbsup:

dturgel commented 4 years ago

Woohoo - nice one @diogosalazar and @Thrilleratplay !!

dturgel commented 4 years ago

@Thrilleratplay do you think you should update the repo front page to add H5072 or not necessary? Totally up to you just noticed that when I jumped on the repo again.

Thrilleratplay commented 4 years ago

@diogosalazar Thanks for testing that. I'll make a change that will check for GVH5072 or GVH5075_.

@dturgel It seems that the only difference between the H5072 and H5075 BLE broadcast is the name of the device. They likely share the same electronic components and have different screens and cases. I will include the H5072 as a supported device but as I do not own one will need help debugging issues if there are any deviations from the H5075.

diogosalazar commented 4 years ago

@Thrilleratplay Please let me know how I can be of assistance in debugging issues or even providing more information about the device itself, the payload, etc.

Thrilleratplay commented 4 years ago

@diogosalazar @dturgel Could one of you either checkout the branch GVH5072 or modify the changed sensor lines to confirm that the change works?

enarik commented 4 years ago

@Thrilleratplay I have this device as well, I can confirm that the changes you made (I just copied them directly into sensor.py from your changelog you linked in the post above) adds this device and adds the readings to the main HA page. Thanks!!

Thrilleratplay commented 4 years ago

@enarik Thank you testing it. To prevent any late night dumb mistakes, I'll merge it in tomorrow.

Thrilleratplay commented 4 years ago

I released V0.5, thank you @dturgel @diogosalazar and @enarik for input and testing.