esphome / issues

Issue Tracker for ESPHome
https://esphome.io/
290 stars 35 forks source link

2023 Mopeka Devices & esp32_ble_tracker #5035

Closed TelecomRob closed 10 months ago

TelecomRob commented 11 months ago

The problem

Hello, I'm having issues with the esp32_ble_tracker not picking up all ble devices when scanning. It is pick up other bluetooth devices but not a 2023 Model Mopeka Pro check Universal M1017 Sensor. I'm wondering if Mopeka changes the chipset on the boards or encrypted it as if I run a scan using Arduino BLE scanner can see the device.

I have poked around other threads and it seems other people have been having issues with the 2023 Model Mopeka Pro check Universal M1017 Sensor in regards to esp32_ble_tracker not seeing them.

Screenshot of CLI: image

Screenshot of HA proving esp32_ble_tracker is detecting other devices: Screenshot 2023-10-26 093134

Which version of ESPHome has the issue?

2023.10.3

What type of installation are you using?

Docker

Which version of Home Assistant has the issue?

No response

What platform are you using?

ESP32

Board

No response

Component causing the issue

No response

Example YAML snippet

esphome:
name: mopeka

esp32:
board: esp32dev
framework:
type: arduino

Enable logging
logger:

Enable Home Assistant API
api:
password: ""

ota:
password: ""

wifi:
ssid: "abc12345"
password: "abc12345"

Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Mopeka Fallback Hotspot"
password: "abc12345"

captive_portal:

Enable Bluetooth Proxy Components
esp32_ble_tracker:
scan_parameters:
interval: 320ms
window: 120ms
duration: 60s
active: true

bluetooth_proxy:
active: true

mqtt:
broker: 192.168.1.94
username: ""
password: ""
client_id: "mopeka"

sensor:

platform: mopeka_pro_check
mac_address: 4c:3c:19:88:3f:4c
tank_type: 20LB_V
temperature:
name: "Propane test temp"
level:
name: "Propane test level"
distance:
name: "Propane test distance"
battery_level:
name: "Propane test battery level"

Anything in the logs that might be useful for us?

No response

Additional information

How Arduino BLE see device when scan: Advertised Device: Name: , Address: 4c:3c:19:88:3f:4c, manufacturer data: 4c0010061b1940e8a878, txPower: 12, rssi: -10

spbrogan commented 11 months ago

I might suggest a couple of things to try first.

  1. Drop the ble proxy
  2. drop the mqtt stuff.

My guess is the esp32 is not able to handle all the activity generated by the proxy and is having to minimize its ble scanning time and missing stuff. I have seen this on a number of devices and in busy ble environments.

spbrogan commented 11 months ago

You may also want to press the green sync button a bunch of times (like 10+) to see if for some reason it is in mfg mode.

TelecomRob commented 11 months ago

I’ve been doing some digging and it’s looking like the 2023 “universal models” are not supported for now.

runjmc commented 11 months ago

There looks to be a change in the sensor. I see a unsupported sensor type in the logs.

[15:10:50][I][mopeka_ble:081]: MOPEKA PRO (NRF52) SENSOR FOUND: F5:5A:E4:8A:AA:2C [15:10:50][E][mopeka_pro_check:058]: Unsupported Sensor Type (0xC) [15:10:58][I][mopeka_ble:081]: MOPEKA PRO (NRF52) SENSOR FOUND: F5:5A:E4:8A:AA:2C [15:10:58][E][mopeka_pro_check:058]: Unsupported Sensor Type (0xC)

Let me know if I should open up another issue for this.

TelecomRob commented 11 months ago

Update: I have officially confirmed that the Universal Mopeka Pro Check is not compatible. I bought a non universal and everything works fine.

TelecomRob commented 10 months ago

Another update: The core integration for Mopeka has been updated apparently to support the unsupported sensor. When can we see this with esp?

reference: https://github.com/home-assistant/core/pull/104186

spbrogan commented 10 months ago

Looks like they just added another sensor type. Seems trivial. I can add that but will need @TelecomRob or someone else to test it on real hardware. Is that possible?

TelecomRob commented 10 months ago

Looks like they just added another sensor type. Seems trivial. I can add that but will need @TelecomRob or someone else to test it on real hardware. Is that possible?

I can test it.

TelecomRob commented 10 months ago

Looks like they just added another sensor type. Seems trivial. I can add that but will need @TelecomRob or someone else to test it on real hardware. Is that possible?

I can test it.

I'm having issues with esphome-docs at them moment so I can not test. Can someone else possibly. Cheers image

TelecomRob commented 10 months ago

I’m unable to install docs on my end of things but running esphome-beta it is not working for me still. Apparently core has updated and it’s working for that type of installation. Reference: https://github.com/home-assistant/core/issues/98323#issuecomment-1848667178

TelecomRob commented 10 months ago

@spbrogan It now works using the current ESP Home Beta version. Both my universal and pro check sensors are detecting. I’ll monitor for stability. IMG_3631

smai86 commented 7 months ago

Hey Guys, today I get my Mopeka Pro Check Water Level Sensor. Unfortunately I get the message:

_[20:26:36][E][mopeka_procheck:059]: Unsupported Sensor Type (0x5)

The "normal" integration of Mopeka is working... Is it possible to integrate this sensor, too? (I could help out if some testing is needed)

Best regards, Steffen

TelecomRob commented 7 months ago

Hey Guys, today I get my Mopeka Pro Check Water Level Sensor. Unfortunately I get the message:

_[20:26:36][E][mopeka_procheck:059]: Unsupported Sensor Type (0x5)

The "normal" integration of Mopeka is working... Is it possible to integrate this sensor, too? (I could help out if some testing is needed)

Best regards, Steffen

@spbrogan

Would this be the same situation as the Pro Check where another sensor Type needs to be added?

spbrogan commented 7 months ago

@smai86 could you open a new issue/feature request. Adding the sensor id is easy but i would guess the distance measurement is different for water (or water like). The calculation I used for propane came from documentation mopeka shared with me and I have been unable to get mopeka to respond to any email since to get updated documentation.

Does the main integration have support for water? Is their sensor reading accurate compared to the app?

thanks Sean

smai86 commented 7 months ago

@spbrogan Yes of course I could open a new feature request. If I could help out with some data, let me know.

The main integration doesn´t work very well... The bluetooth connection is pretty unstable and the reading shows a different distance than the app shows. Pls let me know if I could help u out. Would be pretty cool, to get it with ESPHome like the sensors for butane/propane.

thanks a lot, Steffen

kevinhoogdorp commented 5 months ago

@spbrogan It now works using the current ESP Home Beta version. Both my universal and pro check sensors are detecting. I’ll monitor for stability. IMG_3631

This worked for me.. I'm running supervisor 2024.05.1 on Ubuntu I installed the ESPHome Beta and did a restart and the sensor popped up