custom-components / ble_monitor

BLE monitor for passive BLE sensors
https://community.home-assistant.io/t/passive-ble-monitor-integration/
MIT License
1.9k stars 245 forks source link

govee 5051 connected, but not passing temp/humidity date #467

Closed fancybeachsnake closed 3 years ago

fancybeachsnake commented 3 years ago

in response to a q/a session with @Thrilleratplay, was advised to open an issue on this.

have a govee 5051, device appears to be connected, but is not providing temp/humidity data.

home-assistant.log with ble_monitor in debug, and hcidump attached.

home-assistant.log hcidump.txt

Ernst79 commented 3 years ago

Could you try it with temperature set to Celsius in the BLE monitor options?. I think the sensor sends temperature data in C, HA will convert it to F if your user setting is F in HA. Setting it to F is only needed if the sensor is sending data in F.

I also see 'temperature_unit': '°F', in the log, this should be 'temperature_unit': 'F' or ‘C’, without the degree symbol and without the Â

and is the Mac of the sensor in the devices option? You have turned of discovery, so you will have to define the Mac.

Ernst79 commented 3 years ago

@Thrilleratplay I see messages in the HCI dump with length 13 (0C) with FF 88 EC in stead of 11 (0A). We might have to use these, but I’m unable to look into that coming 1.5 week. Perhaps you can have a look, otherwise I can do it later

Thrilleratplay commented 3 years ago

@fancybeachsnake @Ernst79 I tried looking into this last night and noticed the size dependency but after repeatedly confusing myself trying to map this along with H5074 information, I called it a night. I'll take a look later today.

Thrilleratplay commented 3 years ago

@fancybeachsnake just to make sure I am parsing the correct packet, when you created hcidump.txt, would the values for temperature 27.4C/81.F and humidity 40% seem correct?

fancybeachsnake commented 3 years ago

Could you try it with temperature set to Celsius in the BLE monitor options?. I think the sensor sends temperature data in C, HA will convert it to F if your user setting is F in HA. Setting it to F is only needed if the sensor is sending data in F.

I also see 'temperature_unit': '°F', in the log, this should be 'temperature_unit': 'F' or ‘C’, without the degree symbol and without the Â

and is the Mac of the sensor in the devices option? You have turned of discovery, so you will have to define the Mac.

reset it to C.

the mac addr was in the devices option this whole time, but re-enabled discovery.

no change in attributes being returned/parsed, at least from ha's perspective. i am unclear how to read the output from hcidump, i presume it's hex.

the weird formatting in from of the 'F' i believe is strange encoding from copy/paste on a mac, my local log does not reflect that character.

fancybeachsnake commented 3 years ago

@fancybeachsnake just to make sure I am parsing the correct packet, when you created hcidump.txt, would the values for temperature 27.4C/81.F and humidity 40% seem correct?

cross-referenced the timestamp of hcidump with the timestamp in the govee app, 27.4C / 40% are correct for that time.

Ernst79 commented 3 years ago

Please try 4.6.0-beta

fancybeachsnake commented 3 years ago

@Ernst79 @Thrilleratplay - 4.6.0-beta working, thank you kindly.

nota bene', i discovered a typo in sensor.py, RRENAMED_MODEL_DICT not referenced in const.py. removed the offending leading "R", and all is fine.

thank you for looking into this, sure appreciate the efforts.

Ernst79 commented 3 years ago

The double RR is already fixed in 4.6.1-beta

Ernst79 commented 3 years ago

Fixed in 4.6.2 as final version