custom-components / ble_monitor

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

[New Sensor]: Garnet SeeLevel holding tank level monitors #1320

Closed JBLoven closed 4 months ago

JBLoven commented 4 months ago

Sensor Description

Garnet SeeLevel

Additional information

https://www.garnetinstruments.com/holding-tanks/

Requesting new sensor for the Garnet SeeLevel tank monitor system. These are an ultrasonic tank monitoring system. In my use case they are for RV/Camper holding tanks (Fresh, Gray, Black, and system battery voltage). These sensors are not affected by the solids in a black tank and are one of the only real solutions for RV black tank monitoring that works. There are other systems for fresh and gray tanks that work but none of them deal with the black solids issue effectively (at least in my experience).

I hacked at the code on my HA instance and the best way to identify the advertisement seems to be to look for comp_id 305 with data len 17. I added a cheesy debug to show that result below right above the regular BLE advertisement INFO logger lines. In my case the mac of the device is 00a0500c464e.

This line is for the "Voltage" being reported on tank "13" (ie \r). The reported voltage is 13.2V shown as the voltage x10 (132). So the encoded string is "\r132" which decodes to tank #13 with a level of 132.

2024-02-25 22:17:17.270 INFO (Thread-104) [custom_components.ble_monitor.ble_parser] manufacturer specific data: b'\x11\xff1\x01\x0cFN\r1320000000'comp_id: 305data_len: 17 2024-02-25 22:17:17.271 INFO (Thread-104) [custom_components.ble_monitor.ble_parser] BLE advertisement received from MAC/UUID 00a0500c464e: service data: []manufacturer specific data: [b'\x11\xff1\x01\x0cFN\r1320000000']local name: 709-BT UUID16: None,UUID128: None

This line is for the fresh water tank (tank #0) and is currently reporting a level of 0%. The encoded string is "\x00 0" with the which decodes to tank \x00 (fresh water) with a current volume of " 0" or 0%. 17% would be " 17" and 100% would be "100" or in total "\x00100".

2024-02-25 22:17:17.909 INFO (Thread-104) [custom_components.ble_monitor.ble_parser] manufacturer specific data: b'\x11\xff1\x01\x0cFN\x00 00000000'comp_id: 305data_len: 17 2024-02-25 22:17:17.909 INFO (Thread-104) [custom_components.ble_monitor.ble_parser] BLE advertisement received from MAC/UUID 00a0500c464e: service data: []manufacturer specific data: [b'\x11\xff1\x01\x0cFN\x00 00000000']local name: 709-BT UUID16: None,UUID128: None

This line is for the black water tank (tank #1) and is currently reporting a level of 0%. The encoded string is "\x00 0" with the which decodes to tank \x00 (black water) with a current volume of " 0" or 0%. 17% would be " 17" and 100% would be "100" or in total "\x00100".

2024-02-25 22:17:18.560 INFO (Thread-104) [custom_components.ble_monitor.ble_parser] manufacturer specific data: b'\x11\xff1\x01\x0cFN\x01 710000000'comp_id: 305data_len: 17 2024-02-25 22:17:18.561 INFO (Thread-104) [custom_components.ble_monitor.ble_parser] BLE advertisement received from MAC/UUID 00a0500c464e: service data: []manufacturer specific data: [b'\x11\xff1\x01\x0cFN\x01 710000000']local name: 709-BT UUID16: None,UUID128: None

The current SeeLevel panel with BLE capability can only report Fresh,Gray,Black and Battery although the below docs list the other tanks/capabilities.

The above debug/info lines are taken from my live HA instance. I started decoding but I'm a neophyte at working with HA add-ons and integrations and couldn't get the decoded data into an entity (yet). I figured I'd pass this along the normal "please add this device" channel as well.

The Garnet SeeLevel tech docs are as follows on the subject of BLE broadcasts...

Garnet 709BT BLE Technical Document

The Garnet 709BT hardware supports Bluetooth Low Energy (BLE), and is configured as a Broadcaster transmitting advertisement packets. It continuously cycles through its connected sensors sending out sensor data. No BLE connection is required to read the data, instead the smartphone application implements Receiver functionality to receive these packets. When the application receives these packets it must decode the Manufacturer Specific Data to determine the Garnet Sensor Data. The first 2 bytes represent a company identifier code. Company ID 305 Cypress Semiconductor The following bytes represent the Garnet Sensor Data payload: Byte 0, 1, 2 Coach ID Unique number – hardware assigned Byte 3 Sensor Number 0-255 0 = Fresh 1 = Black 2 = Gray 3 = LPG 4 = LPG 2 5 = Galley 6 = Galley 2 7 = Temp 8 = Temp 2 9 = Temp 3 10 = Temp 4 11 = Chemical 12 = Chemical 2 13 = Battery x 10 Byte 4, 5, 6 Sensor Data ascii characters representing data value or sensor status Byte 7, 8, 9 Sensor Volume Byte 10, 11, 12 Sensor Total Byte 13 Sensor Alarm

BLE advertisements

2024-02-25 22:17:17.271 INFO (Thread-104) [custom_components.ble_monitor.ble_parser] BLE advertisement received from MAC/UUID 00a0500c464e: service data: []manufacturer specific data: [b'\x11\xff1\x01\x0cFN\r1320000000']local name: 709-BT  UUID16: None,UUID128: None

2024-02-25 22:17:17.909 INFO (Thread-104) [custom_components.ble_monitor.ble_parser] BLE advertisement received from MAC/UUID 00a0500c464e: service data: []manufacturer specific data: [b'\x11\xff1\x01\x0cFN\x00  00000000']local name: 709-BT  UUID16: None,UUID128: None

2024-02-25 22:17:18.561 INFO (Thread-104) [custom_components.ble_monitor.ble_parser] BLE advertisement received from MAC/UUID 00a0500c464e: service data: []manufacturer specific data: [b'\x11\xff1\x01\x0cFN\x01 710000000']local name: 709-BT  UUID16: None,UUID128: None

2024-02-25 22:17:26.760 INFO (Thread-104) [custom_components.ble_monitor.ble_parser] BLE advertisement received from MAC/UUID 00a0500c464e: service data: []manufacturer specific data: [b'\x11\xff1\x01\x0cFN\x02 810000000']local name: 709-BT  UUID16: None,UUID128: None

So in the above lines, line #1 is a battery (\r = tank 13) with current level of 13.2 (132 is 13.2x10)
Line 2 is a fresh tank (tank 0) with a level of 0%
Line 3 is a black tank (tank 1) with a level of 71%
Line 4 is a gray tank (tank 2) with a level of 81%

To the best of my knowledge the BLE transmitter board only supports those 4 "tanks" on the 709-BT board which is what is available for RV usage in the USA. Perhaps the other options are for another device in commercial use? The 709-BT in the advertisements may not always be guaranteed to be there as I think there's a way to rename it so I'm not sure that would be a great way to identify the device. Not sure on that though.
JBLoven commented 4 months ago

Additional advertisements following an update that came in today. I also removed/reinstalled to eradicate anything that I could have potentially polluted by fiddling with the code directly...

2024-02-26 08:48:00.135 INFO (Thread-2) [custom_components.ble_monitor.ble_parser] BLE advertisement received from MAC/UUID 00a0500c464e: service data: []manufacturer specific data: [b'\x11\xff1\x01\x0cFN\r1290000000']local name: 709-BT UUID16: None,UUID128: None 2024-02-26 08:48:00.269 INFO (Thread-2) [custom_components.ble_monitor.ble_parser] BLE advertisement received from MAC/UUID 00a0500c464e: service data: []manufacturer specific data: [b'\x11\xff1\x01\x0cFN\x00 00000000']local name: 709-BT UUID16: None,UUID128: None 2024-02-26 08:48:00.396 INFO (Thread-2) [custom_components.ble_monitor.ble_parser] BLE advertisement received from MAC/UUID 00a0500c464e: service data: []manufacturer specific data: [b'\x11\xff1\x01\x0cFN\x01 790000000']local name: 709-BT UUID16: None,UUID128: None 2024-02-26 08:48:00.521 INFO (Thread-2) [custom_components.ble_monitor.ble_parser] BLE advertisement received from MAC/UUID 00a0500c464e: service data: []manufacturer specific data: [b'\x11\xff1\x01\x0cFN\x02 810000000']local name: 709-BT UUID16: None,UUID128: None 2024-02-26 08:48:00.656 INFO (Thread-2) [custom_components.ble_monitor.ble_parser] BLE advertisement received from MAC/UUID 00a0500c464e: service data: []manufacturer specific data: [b'\x11\xff1\x01\x0cFN\r1290000000']local name: 709-BT UUID16: None,UUID128: None 2024-02-26 08:48:00.913 INFO (Thread-2) [custom_components.ble_monitor.ble_parser] BLE advertisement received from MAC/UUID 00a0500c464e: service data: []manufacturer specific data: [b'\x11\xff1\x01\x0cFN\x01 790000000']local name: 709-BT UUID16: None,UUID128: None

Ernst79 commented 4 months ago

Looks like it is possible to add this. The manufacturer id is also used by Oras, so we can add our code to the oras.py file in the parser folder. As a proof of concept, adding the following to oras.py will give the battery data (note that we also have to add the device type to the AUTO_MANUFACTURER_DICT in const.py, before it will show up in HA).

    if msg_length == 18:
        device_type = "Garnet 709BT"
        sensor_id = data[7]
        byte_string = data[8:11]
        ascii_string = byte_string.decode("ASCII")
        if sensor_id == 13:
            result.update({"battery": int(ascii_string) / 10})
    elif msg_length == 22:
        device_type = "Electra Washbasin Faucet"
       ...

result

result  ({'firmware': 'Oras', 'battery': 13.2, 'rssi': -52, 'mac': 'A4C138A5B9AD', 'type': 'Garnet 709BT', 'packet': 'no packet id', 'data': True}, None)

I'll add the other sensors asap.

JBLoven commented 4 months ago

Thanks so much. I'll drop that code in and see what happens. I appreciate your prompt response!

On Mon, Feb 26, 2024 at 10:12 AM Ernst Klamer @.***> wrote:

Looks like it is possible to add this. The UUID is also used by Oras, so we can add our code to the oras.py file in the parser folder. As a proof of concept, adding the following to oras.py will give the battery data (note that we also have to add the device type to AUTO_MANUFACTURER_DICT in const.py.

if msg_length == 18:
    device_type = "Garnet 709BT"
    sensor_id = data[7]
    byte_string = data[8:11]
    ascii_string = byte_string.decode("ASCII")
    if sensor_id == 13:
        result.update({"battery": int(ascii_string) / 10})
elif msg_length == 22:
    device_type = "Electra Washbasin Faucet"
   ...

result

result ({'firmware': 'Oras', 'battery': 13.2, 'rssi': -52, 'mac': 'A4C138A5B9AD', 'type': 'Garnet 709BT', 'packet': 'no packet id', 'data': True}, None)

— Reply to this email directly, view it on GitHub https://github.com/custom-components/ble_monitor/issues/1320#issuecomment-1964377036, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXAUG6HRI7IB65QEPJWYK5LYVSQ47AVCNFSM6AAAAABDZO2QF6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRUGM3TOMBTGY . You are receiving this because you authored the thread.Message ID: @.***>

JBLoven commented 4 months ago

Basic proof seems to get somewhere. I added a chunk of debug to the log so I could see what it was decoding...

result = {"firmware": firmware}
if msg_length == 18:
    device_type = "Garnet 709BT"
    sensor_id = data[7]
    byte_string = data[8:11]
    ascii_string = byte_string.decode("ASCII")
    if sensor_id == 13:
        result.update({"battery": int(ascii_string) / 10})
    _LOGGER.info(
        "BLE ADV from Oras DEVICE: %s, SENSOR: %s, BYTES: %s, MAC: %s, ADV: %s",
        device_type,
        sensor_id,
        ascii_string,
        to_mac(mac),
        data.hex()
    )
elif msg_length == 22:
    device_type = "Electra Washbasin Fauce

This resulted in the following log output so the basic parsing seems to be OK. But as you mentioned I'm not seeing it anywhere in the HA UI.

2024-02-26 12:25:15.511 INFO (Thread-2) [custom_components.ble_monitor.ble_parser.oras] BLE ADV from Oras DEVICE: Garnet 709BT, SENSOR: 13, BYTES: 143, MAC: 00:A0:50:0C:46:4E, ADV: 11ff31010c464e0d31343330303030303030 2024-02-26 12:25:16.025 INFO (Thread-2) [custom_components.ble_monitor.ble_parser.oras] BLE ADV from Oras DEVICE: Garnet 709BT, SENSOR: 13, BYTES: 143, MAC: 00:A0:50:0C:46:4E, ADV: 11ff31010c464e0d31343330303030303030 2024-02-26 12:25:16.804 INFO (Thread-2) [custom_components.ble_monitor.ble_parser.oras] BLE ADV from Oras DEVICE: Garnet 709BT, SENSOR: 1, BYTES: 83, MAC: 00:A0:50:0C:46:4E, ADV: 11ff31010c464e0120383330303030303030 2024-02-26 12:25:17.193 INFO (Thread-2) [custom_components.ble_monitor.ble_parser.oras] BLE ADV from Oras DEVICE: Garnet 709BT, SENSOR: 0, BYTES: 0, MAC: 00:A0:50:0C:46:4E, ADV: 11ff31010c464e0020203030303030303030 2024-02-26 12:25:17.461 INFO (Thread-2) [custom_components.ble_monitor.ble_parser.oras] BLE ADV from Oras DEVICE: Garnet 709BT, SENSOR: 2, BYTES: 81, MAC: 00:A0:50:0C:46:4E, ADV: 11ff31010c464e0220383130303030303030 2024-02-26 12:25:17.975 INFO (Thread-2) [custom_components.ble_monitor.ble_parser.oras] BLE ADV from Oras DEVICE: Garnet 709BT, SENSOR: 2, BYTES: 81, MAC: 00:A0:50:0C:46:4E, ADV: 11ff31010c464e0220383130303030303030 2024-02-26 12:25:18.360 INFO (Thread-2) [custom_components.ble_monitor.ble_parser.oras] BLE ADV from Oras DEVICE: Garnet 709BT, SENSOR: 1, BYTES: 83, MAC: 00:A0:50:0C:46:4E, ADV: 11ff31010c464e0120383330303030303030 2024-02-26 12:25:18.489 INFO (Thread-2) [custom_components.ble_monitor.ble_parser.oras] BLE ADV from Oras DEVICE: Garnet 709BT, SENSOR: 2, BYTES: 81, MAC: 00:A0:50:0C:46:4E, ADV: 11ff31010c464e0220383130303030303030

This corresponds correctly to my current tank readings of: Fresh (tank 0): 0% (empty) Black (tank 1): 88% (time to empty that one!) Gray (tank 2): 81% (gotta empty that one too) Battery (tank 13): 14.3volts

Ernst79 commented 4 months ago

To see the battery sensor in the HA UI, just add the device type to AUTO_MANUFACTURER_DICT in const.py in the ble_monitor folder.

I’ll probably have to create some new sensors for the tanks.

Edit, I see battery is in volt, I’ll change it to a voltage sensor.

JBLoven commented 4 months ago

It now shows up...

2024-02-26_132048
Ernst79 commented 4 months ago

Work in progress is in #1321

JBLoven commented 4 months ago

It occurs to me that I should clarify because I may have not accurately describe mfg and sensor name. Corrected...

Manufacturer: Garnet Instruments Ltd. Sensor/Device: SeeLevel II 709-BTP3

Apologies for not providing the exact right details.

Ernst79 commented 4 months ago

no problem, just changed it.

https://github.com/custom-components/ble_monitor/pull/1321/commits/83dc355a153b3a434e7fdb9bece3de6b994328c4

Any idea what to do with the other data? They seem to be 0. Can they change?

Byte 7, 8, 9 Sensor Volume
Byte 10, 11, 12 Sensor Total
Byte 13 Sensor Alarm
JBLoven commented 4 months ago

I have never seen them be anything other than 0 in the RV/camper sensor. The alarm may in fact be non-zero but I do not have alarm(s) enabled on my panel. I'll look at how to do that to see if I can show/illustrate them becoming non-zero and what value they would have. It will be a day before I can do so. As to Sensor Volume and Total I don't know if they would ever be non-zero because as far as I know the programming/setup for the BT panel does not offer a way to configure tank total capacity. The sensors only show percentage of tank full that adheres vertically to the outside of the tank. As the tank fills the sensor detects overall fluid height within the tank from the outside.

Ernst79 commented 4 months ago

I just added 3 HA tank sensors (fresh/grey/black) for testing in the PR. I can add the other sensors later, but, as you have said, you didn't see these on your setup. But let add these just to be sure (for other setups/tanks/users).

I'll do that later, I call it a day today.

BTW. You can see the value of the alarm in the logging, which I have added in the current draft. I expect it to become 1 if the alarm fires.

       # remove later
        result.update({
            "sensor_id": sensor_id,
            "sensor_data": sensor_data,
            "sensor_volume": sensor_volume,
            "sensor_total": sensor_total,
            "sensor_alarm": sensor_alarm,
        })
        _LOGGER.info(
            "BLE ADV from Oras DEVICE: %s, result: %s",
            device_type,
            result
        )
JBLoven commented 4 months ago

Thanks so much for adding this! It will be a significant improvement and much appreciated.

On Mon, Feb 26, 2024 at 2:28 PM Ernst Klamer @.***> wrote:

I just added 3 HA tank sensors (fresh/grey/black) for testing in the PR. I can add the other sensors later, but, as you have said, you didn't see these on your setup. But let add these just to be sure (for other setups/tanks/users).

I'll do that later, I call it a day today.

BTW. You can see the value of the alarm in the logging, which I have added in the current draft. I expect it to become 1 if the alarm fires.

   # remove later
    result.update({
        "sensor_id": sensor_id,
        "sensor_data": sensor_data,
        "sensor_volume": sensor_volume,
        "sensor_total": sensor_total,
        "sensor_alarm": sensor_alarm,
    })
    _LOGGER.info(
        "BLE ADV from Oras DEVICE: %s, result: %s",
        device_type,
        result
    )

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

JBLoven commented 4 months ago

I pulled down the 3 updated files and put them in my HA instance. Here's the output of the log (at least the last part of it) (see below). This device is very spammy and is constantly announcing this info so hopefully throttling to only update on a reasonable interval is possible or automatic? As you can see from the timestamps it's generating a huge amount of log traffic as it stands when debug is enabled. I suppose that will quiet down when no debug is on. But all that being said it does appear to be decoding the sensors properly! VERY exciting! I have it displaying the battery voltage as that's the only one visible in HA right now so I'm excited to see the rest of them when they are ready. I'm re-reading the setup docs for the controller to see about enabling alarms so I can test that as well.

Thanks again! Here's the excerpt from the log...

2024-02-26 15:05:13.621 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Data measuring sensor received: {'mac': '00A0500C464E', 'sensor_id': 1, 'sensor_data': ' 8', 'sensor_volume': '000', 'sensor_total': '000', 'sensor_alarm': '0', 'black tank': 8, 'type': 'SeeLevel II 709-BTP3', 'packet': 'no packet id', 'firmware': 'Garnet', 'data': True, 'rssi': -90, 'local_name': '709-BT '} 2024-02-26 15:05:13.877 INFO (Thread-103) [custom_components.ble_monitor.ble_parser.oras] BLE ADV from Oras DEVICE: SeeLevel II 709-BTP3, result: {'mac': '00A0500C464E', 'sensor_id': 13, 'sensor_data': '134', 'sensor_volume': '000', 'sensor_total': '000', 'sensor_alarm': '0'} 2024-02-26 15:05:13.881 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Data measuring sensor received: {'mac': '00A0500C464E', 'sensor_id': 13, 'sensor_data': '134', 'sensor_volume': '000', 'sensor_total': '000', 'sensor_alarm': '0', 'voltage': 13.4, 'type': 'SeeLevel II 709-BTP3', 'packet': 'no packet id', 'firmware': 'Garnet', 'data': True, 'rssi': -78, 'local_name': '709-BT '} 2024-02-26 15:05:14.133 INFO (Thread-103) [custom_components.ble_monitor.ble_parser.oras] BLE ADV from Oras DEVICE: SeeLevel II 709-BTP3, result: {'mac': '00A0500C464E', 'sensor_id': 1, 'sensor_data': ' 8', 'sensor_volume': '000', 'sensor_total': '000', 'sensor_alarm': '0'} 2024-02-26 15:05:14.136 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Data measuring sensor received: {'mac': '00A0500C464E', 'sensor_id': 1, 'sensor_data': ' 8', 'sensor_volume': '000', 'sensor_total': '000', 'sensor_alarm': '0', 'black tank': 8, 'type': 'SeeLevel II 709-BTP3', 'packet': 'no packet id', 'firmware': 'Garnet', 'data': True, 'rssi': -86, 'local_name': '709-BT '} 2024-02-26 15:05:14.387 INFO (Thread-103) [custom_components.ble_monitor.ble_parser.oras] BLE ADV from Oras DEVICE: SeeLevel II 709-BTP3, result: {'mac': '00A0500C464E', 'sensor_id': 13, 'sensor_data': '134', 'sensor_volume': '000', 'sensor_total': '000', 'sensor_alarm': '0'} 2024-02-26 15:05:14.391 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Data measuring sensor received: {'mac': '00A0500C464E', 'sensor_id': 13, 'sensor_data': '134', 'sensor_volume': '000', 'sensor_total': '000', 'sensor_alarm': '0', 'voltage': 13.4, 'type': 'SeeLevel II 709-BTP3', 'packet': 'no packet id', 'firmware': 'Garnet', 'data': True, 'rssi': -78, 'local_name': '709-BT '} 2024-02-26 15:05:14.646 INFO (Thread-103) [custom_components.ble_monitor.ble_parser.oras] BLE ADV from Oras DEVICE: SeeLevel II 709-BTP3, result: {'mac': '00A0500C464E', 'sensor_id': 1, 'sensor_data': ' 8', 'sensor_volume': '000', 'sensor_total': '000', 'sensor_alarm': '0'} 2024-02-26 15:05:14.650 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Data measuring sensor received: {'mac': '00A0500C464E', 'sensor_id': 1, 'sensor_data': ' 8', 'sensor_volume': '000', 'sensor_total': '000', 'sensor_alarm': '0', 'black tank': 8, 'type': 'SeeLevel II 709-BTP3', 'packet': 'no packet id', 'firmware': 'Garnet', 'data': True, 'rssi': -86, 'local_name': '709-BT '} 2024-02-26 15:05:14.776 INFO (Thread-103) [custom_components.ble_monitor.ble_parser.oras] BLE ADV from Oras DEVICE: SeeLevel II 709-BTP3, result: {'mac': '00A0500C464E', 'sensor_id': 2, 'sensor_data': ' 6', 'sensor_volume': '000', 'sensor_total': '000', 'sensor_alarm': '0'} 2024-02-26 15:05:14.780 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Data measuring sensor received: {'mac': '00A0500C464E', 'sensor_id': 2, 'sensor_data': ' 6', 'sensor_volume': '000', 'sensor_total': '000', 'sensor_alarm': '0', 'grey tank': 6, 'type': 'SeeLevel II 709-BTP3', 'packet': 'no packet id', 'firmware': 'Garnet', 'data': True, 'rssi': -78, 'local_name': '709-BT '} 2024-02-26 15:05:14.909 INFO (Thread-103) [custom_components.ble_monitor.ble_parser.oras] BLE ADV from Oras DEVICE: SeeLevel II 709-BTP3, result: {'mac': '00A0500C464E', 'sensor_id': 13, 'sensor_data': '134', 'sensor_volume': '000', 'sensor_total': '000', 'sensor_alarm': '0'} 2024-02-26 15:05:14.914 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Data measuring sensor received: {'mac': '00A0500C464E', 'sensor_id': 13, 'sensor_data': '134', 'sensor_volume': '000', 'sensor_total': '000', 'sensor_alarm': '0', 'voltage': 13.4, 'type': 'SeeLevel II 709-BTP3', 'packet': 'no packet id', 'firmware': 'Garnet', 'data': True, 'rssi': -75, 'local_name': '709-BT '} 2024-02-26 15:05:15.039 INFO (Thread-103) [custom_components.ble_monitor.ble_parser.oras] BLE ADV from Oras DEVICE: SeeLevel II 709-BTP3, result: {'mac': '00A0500C464E', 'sensor_id': 0, 'sensor_data': ' 0', 'sensor_volume': '000', 'sensor_total': '000', 'sensor_alarm': '0'} 2024-02-26 15:05:15.043 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Data measuring sensor received: {'mac': '00A0500C464E', 'sensor_id': 0, 'sensor_data': ' 0', 'sensor_volume': '000', 'sensor_total': '000', 'sensor_alarm': '0', 'fresh tank': 0, 'type': 'SeeLevel II 709-BTP3', 'packet': 'no packet id', 'firmware': 'Garnet', 'data': True, 'rssi': -73, 'local_name': '709-BT '} 2024-02-26 15:05:15.566 INFO (Thread-103) [custom_components.ble_monitor.ble_parser.oras] BLE ADV from Oras DEVICE: SeeLevel II 709-BTP3, result: {'mac': '00A0500C464E', 'sensor_id': 0, 'sensor_data': ' 0', 'sensor_volume': '000', 'sensor_total': '000', 'sensor_alarm': '0'} 2024-02-26 15:05:15.571 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Data measuring sensor received: {'mac': '00A0500C464E', 'sensor_id': 0, 'sensor_data': ' 0', 'sensor_volume': '000', 'sensor_total': '000', 'sensor_alarm': '0', 'fresh tank': 0, 'type': 'SeeLevel II 709-BTP3', 'packet': 'no packet id', 'firmware': 'Garnet', 'data': True, 'rssi': -86, 'local_name': '709-BT '} 2024-02-26 15:05:15.827 INFO (Thread-103) [custom_components.ble_monitor.ble_parser.oras] BLE ADV from Oras DEVICE: SeeLevel II 709-BTP3, result: {'mac': '00A0500C464E', 'sensor_id': 2, 'sensor_data': ' 6', 'sensor_volume': '000', 'sensor_total': '000', 'sensor_alarm': '0'} 2024-02-26 15:05:15.831 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Data measuring sensor received: {'mac': '00A0500C464E', 'sensor_id': 2, 'sensor_data': ' 6', 'sensor_volume': '000', 'sensor_total': '000', 'sensor_alarm': '0', 'grey tank': 6, 'type': 'SeeLevel II 709-BTP3', 'packet': 'no packet id', 'firmware': 'Garnet', 'data': True, 'rssi': -77, 'local_name': '709-BT '} 2024-02-26 15:05:15.954 INFO (Thread-103) [custom_components.ble_monitor.ble_parser.oras] BLE ADV from Oras DEVICE: SeeLevel II 709-BTP3, result: {'mac': '00A0500C464E', 'sensor_id': 13, 'sensor_data': '133', 'sensor_volume': '000', 'sensor_total': '000', 'sensor_alarm': '0'} 2024-02-26 15:05:15.959 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Data measuring sensor received: {'mac': '00A0500C464E', 'sensor_id': 13, 'sensor_data': '133', 'sensor_volume': '000', 'sensor_total': '000', 'sensor_alarm': '0', 'voltage': 13.3, 'type': 'SeeLevel II 709-BTP3', 'packet': 'no packet id', 'firmware': 'Garnet', 'data': True, 'rssi': -84, 'local_name': '709-BT '} 2024-02-26 15:05:16.083 INFO (Thread-103) [custom_components.ble_monitor.ble_parser.oras] BLE ADV from Oras DEVICE: SeeLevel II 709-BTP3, result: {'mac': '00A0500C464E', 'sensor_id': 0, 'sensor_data': ' 0', 'sensor_volume': '000', 'sensor_total': '000', 'sensor_alarm': '0'} 2024-02-26 15:05:16.087 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Data measuring sensor received: {'mac': '00A0500C464E', 'sensor_id': 0, 'sensor_data': ' 0', 'sensor_volume': '000', 'sensor_total': '000', 'sensor_alarm': '0', 'fresh tank': 0, 'type': 'SeeLevel II 709-BTP3', 'packet': 'no packet id', 'firmware': 'Garnet', 'data': True, 'rssi': -88, 'local_name': '709-BT '} 2024-02-26 15:05:16.337 INFO (Thread-103) [custom_components.ble_monitor.ble_parser.oras] BLE ADV from Oras DEVICE: SeeLevel II 709-BTP3, result: {'mac': '00A0500C464E', 'sensor_id': 2, 'sensor_data': ' 6', 'sensor_volume': '000', 'sensor_total': '000', 'sensor_alarm': '0'} 2024-02-26 15:05:16.341 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Data measuring sensor received: {'mac': '00A0500C464E', 'sensor_id': 2, 'sensor_data': ' 6', 'sensor_volume': '000', 'sensor_total': '000', 'sensor_alarm': '0', 'grey tank': 6, 'type': 'SeeLevel II 709-BTP3', 'packet': 'no packet id', 'firmware': 'Garnet', 'data': True, 'rssi': -78, 'local_name': '709-BT '} 2024-02-26 15:05:16.596 INFO (Thread-103) [custom_components.ble_monitor.ble_parser.oras] BLE ADV from Oras DEVICE: SeeLevel II 709-BTP3, result: {'mac': '00A0500C464E', 'sensor_id': 0, 'sensor_data': ' 0', 'sensor_volume': '000', 'sensor_total': '000', 'sensor_alarm': '0'} 2024-02-26 15:05:16.600 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Data measuring sensor received: {'mac': '00A0500C464E', 'sensor_id': 0, 'sensor_data': ' 0', 'sensor_volume': '000', 'sensor_total': '000', 'sensor_alarm': '0', 'fresh tank': 0, 'type': 'SeeLevel II 709-BTP3', 'packet': 'no packet id', 'firmware': 'Garnet', 'data': True, 'rssi': -88, 'local_name': '709-BT '} 2024-02-26 15:05:16.726 INFO (Thread-103) [custom_components.ble_monitor.ble_parser.oras] BLE ADV from Oras DEVICE: SeeLevel II 709-BTP3, result: {'mac': '00A0500C464E', 'sensor_id': 1, 'sensor_data': ' 8', 'sensor_volume': '000', 'sensor_total': '000', 'sensor_alarm': '0'} 2024-02-26 15:05:16.730 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Data measuring sensor received: {'mac': '00A0500C464E', 'sensor_id': 1, 'sensor_data': ' 8', 'sensor_volume': '000', 'sensor_total': '000', 'sensor_alarm': '0', 'black tank': 8, 'type': 'SeeLevel II 709-BTP3', 'packet': 'no packet id', 'firmware': 'Garnet', 'data': True, 'rssi': -76, 'local_name': '709-BT '} 2024-02-26 15:05:16.751 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] Data binary sensor received: {'firmware': 'Govee', 'temperature': 25.6, 'humidity': 34.2, 'battery': 89, 'mac': 'D03736396271', 'type': 'H5101/H5102/H5177', 'packet': 'no packet id', 'data': True, 'rssi': -70, 'local_name': 'GVH5103_6271'} 2024-02-26 15:05:16.756 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Data measuring sensor received: {'firmware': 'Govee', 'temperature': 25.6, 'humidity': 34.2, 'battery': 89, 'mac': 'D03736396271', 'type': 'H5101/H5102/H5177', 'packet': 'no packet id', 'data': True, 'rssi': -70, 'local_name': 'GVH5103_6271'}

On Mon, Feb 26, 2024 at 2:32 PM Jason Loven @.***> wrote:

Thanks so much for adding this! It will be a significant improvement and much appreciated.

On Mon, Feb 26, 2024 at 2:28 PM Ernst Klamer @.***> wrote:

I just added 3 HA tank sensors (fresh/grey/black) for testing in the PR. I can add the other sensors later, but, as you have said, you didn't see these on your setup. But let add these just to be sure (for other setups/tanks/users).

I'll do that later, I call it a day today.

BTW. You can see the value of the alarm in the logging, which I have added in the current draft. I expect it to become 1 if the alarm fires.

   # remove later
    result.update({
        "sensor_id": sensor_id,
        "sensor_data": sensor_data,
        "sensor_volume": sensor_volume,
        "sensor_total": sensor_total,
        "sensor_alarm": sensor_alarm,
    })
    _LOGGER.info(
        "BLE ADV from Oras DEVICE: %s, result: %s",
        device_type,
        result
    )

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

JBLoven commented 4 months ago

You might want to consider some level of filtering of the inputs. There was an error on my console when I reconfigured it for testing the alarms and it was displaying "STA" instead of the actual Gray tank value. That's causing the following errors. Perhaps ensure that the number is actually a number and just drop/fail-out if it's not? There are a variety of error codes that could be present due to configuration and of course errors in the sensor.

2024-02-26 17:35:42.619 ERROR (Thread-103) [homeassistant] Error doing job: Fatal error: protocol.data_received() call failed. Traceback (most recent call last): File "/usr/local/lib/python3.12/asyncio/selector_events.py", line 1013, in _read_readydata_received self._protocol.data_received(data) File "/usr/local/lib/python3.12/site-packages/aioblescan/aioblescan.py", line 1855, in data_received self.process(packet) File "/config/custom_components/ble_monitor/init.py", line 586, in process_hci_events sensor_msg, tracker_msg = self.ble_parser.parse_raw_data(data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/ble_monitor/ble_parser/init.py", line 167, in parse_raw_data sensor_data, tracker_data = self.parse_advertisement( ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/ble_monitor/ble_parser/init__.py", line 325, in parse_advertisement sensor_data = parse_oras(self, man_spec_data, mac) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/ble_monitor/ble_parser/oras.py", line 55, in parse_oras result.update({SENSOR_TYPE[sensor_id]: int(sensor_data)}) ^^^^^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: 'STA'

On Mon, Feb 26, 2024 at 3:10 PM Jason Loven @.***> wrote:

I pulled down the 3 updated files and put them in my HA instance. Here's the output of the log (at least the last part of it) (see below). This device is very spammy and is constantly announcing this info so hopefully throttling to only update on a reasonable interval is possible or automatic? As you can see from the timestamps it's generating a huge amount of log traffic as it stands when debug is enabled. I suppose that will quiet down when no debug is on. But all that being said it does appear to be decoding the sensors properly! VERY exciting! I have it displaying the battery voltage as that's the only one visible in HA right now so I'm excited to see the rest of them when they are ready. I'm re-reading the setup docs for the controller to see about enabling alarms so I can test that as well.

Thanks again! Here's the excerpt from the log...

2024-02-26 15:05:13.621 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Data measuring sensor received: {'mac': '00A0500C464E', 'sensor_id': 1, 'sensor_data': ' 8', 'sensor_volume': '000', 'sensor_total': '000', 'sensor_alarm': '0', 'black tank': 8, 'type': 'SeeLevel II 709-BTP3', 'packet': 'no packet id', 'firmware': 'Garnet', 'data': True, 'rssi': -90, 'local_name': '709-BT '} 2024-02-26 15:05:13.877 INFO (Thread-103) [custom_components.ble_monitor.ble_parser.oras] BLE ADV from Oras DEVICE: SeeLevel II 709-BTP3, result: {'mac': '00A0500C464E', 'sensor_id': 13, 'sensor_data': '134', 'sensor_volume': '000', 'sensor_total': '000', 'sensor_alarm': '0'} 2024-02-26 15:05:13.881 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Data measuring sensor received: {'mac': '00A0500C464E', 'sensor_id': 13, 'sensor_data': '134', 'sensor_volume': '000', 'sensor_total': '000', 'sensor_alarm': '0', 'voltage': 13.4, 'type': 'SeeLevel II 709-BTP3', 'packet': 'no packet id', 'firmware': 'Garnet', 'data': True, 'rssi': -78, 'local_name': '709-BT '} 2024-02-26 15:05:14.133 INFO (Thread-103) [custom_components.ble_monitor.ble_parser.oras] BLE ADV from Oras DEVICE: SeeLevel II 709-BTP3, result: {'mac': '00A0500C464E', 'sensor_id': 1, 'sensor_data': ' 8', 'sensor_volume': '000', 'sensor_total': '000', 'sensor_alarm': '0'} 2024-02-26 15:05:14.136 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Data measuring sensor received: {'mac': '00A0500C464E', 'sensor_id': 1, 'sensor_data': ' 8', 'sensor_volume': '000', 'sensor_total': '000', 'sensor_alarm': '0', 'black tank': 8, 'type': 'SeeLevel II 709-BTP3', 'packet': 'no packet id', 'firmware': 'Garnet', 'data': True, 'rssi': -86, 'local_name': '709-BT '} 2024-02-26 15:05:14.387 INFO (Thread-103) [custom_components.ble_monitor.ble_parser.oras] BLE ADV from Oras DEVICE: SeeLevel II 709-BTP3, result: {'mac': '00A0500C464E', 'sensor_id': 13, 'sensor_data': '134', 'sensor_volume': '000', 'sensor_total': '000', 'sensor_alarm': '0'} 2024-02-26 15:05:14.391 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Data measuring sensor received: {'mac': '00A0500C464E', 'sensor_id': 13, 'sensor_data': '134', 'sensor_volume': '000', 'sensor_total': '000', 'sensor_alarm': '0', 'voltage': 13.4, 'type': 'SeeLevel II 709-BTP3', 'packet': 'no packet id', 'firmware': 'Garnet', 'data': True, 'rssi': -78, 'local_name': '709-BT '} 2024-02-26 15:05:14.646 INFO (Thread-103) [custom_components.ble_monitor.ble_parser.oras] BLE ADV from Oras DEVICE: SeeLevel II 709-BTP3, result: {'mac': '00A0500C464E', 'sensor_id': 1, 'sensor_data': ' 8', 'sensor_volume': '000', 'sensor_total': '000', 'sensor_alarm': '0'} 2024-02-26 15:05:14.650 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Data measuring sensor received: {'mac': '00A0500C464E', 'sensor_id': 1, 'sensor_data': ' 8', 'sensor_volume': '000', 'sensor_total': '000', 'sensor_alarm': '0', 'black tank': 8, 'type': 'SeeLevel II 709-BTP3', 'packet': 'no packet id', 'firmware': 'Garnet', 'data': True, 'rssi': -86, 'local_name': '709-BT '} 2024-02-26 15:05:14.776 INFO (Thread-103) [custom_components.ble_monitor.ble_parser.oras] BLE ADV from Oras DEVICE: SeeLevel II 709-BTP3, result: {'mac': '00A0500C464E', 'sensor_id': 2, 'sensor_data': ' 6', 'sensor_volume': '000', 'sensor_total': '000', 'sensor_alarm': '0'} 2024-02-26 15:05:14.780 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Data measuring sensor received: {'mac': '00A0500C464E', 'sensor_id': 2, 'sensor_data': ' 6', 'sensor_volume': '000', 'sensor_total': '000', 'sensor_alarm': '0', 'grey tank': 6, 'type': 'SeeLevel II 709-BTP3', 'packet': 'no packet id', 'firmware': 'Garnet', 'data': True, 'rssi': -78, 'local_name': '709-BT '} 2024-02-26 15:05:14.909 INFO (Thread-103) [custom_components.ble_monitor.ble_parser.oras] BLE ADV from Oras DEVICE: SeeLevel II 709-BTP3, result: {'mac': '00A0500C464E', 'sensor_id': 13, 'sensor_data': '134', 'sensor_volume': '000', 'sensor_total': '000', 'sensor_alarm': '0'} 2024-02-26 15:05:14.914 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Data measuring sensor received: {'mac': '00A0500C464E', 'sensor_id': 13, 'sensor_data': '134', 'sensor_volume': '000', 'sensor_total': '000', 'sensor_alarm': '0', 'voltage': 13.4, 'type': 'SeeLevel II 709-BTP3', 'packet': 'no packet id', 'firmware': 'Garnet', 'data': True, 'rssi': -75, 'local_name': '709-BT '} 2024-02-26 15:05:15.039 INFO (Thread-103) [custom_components.ble_monitor.ble_parser.oras] BLE ADV from Oras DEVICE: SeeLevel II 709-BTP3, result: {'mac': '00A0500C464E', 'sensor_id': 0, 'sensor_data': ' 0', 'sensor_volume': '000', 'sensor_total': '000', 'sensor_alarm': '0'} 2024-02-26 15:05:15.043 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Data measuring sensor received: {'mac': '00A0500C464E', 'sensor_id': 0, 'sensor_data': ' 0', 'sensor_volume': '000', 'sensor_total': '000', 'sensor_alarm': '0', 'fresh tank': 0, 'type': 'SeeLevel II 709-BTP3', 'packet': 'no packet id', 'firmware': 'Garnet', 'data': True, 'rssi': -73, 'local_name': '709-BT '} 2024-02-26 15:05:15.566 INFO (Thread-103) [custom_components.ble_monitor.ble_parser.oras] BLE ADV from Oras DEVICE: SeeLevel II 709-BTP3, result: {'mac': '00A0500C464E', 'sensor_id': 0, 'sensor_data': ' 0', 'sensor_volume': '000', 'sensor_total': '000', 'sensor_alarm': '0'} 2024-02-26 15:05:15.571 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Data measuring sensor received: {'mac': '00A0500C464E', 'sensor_id': 0, 'sensor_data': ' 0', 'sensor_volume': '000', 'sensor_total': '000', 'sensor_alarm': '0', 'fresh tank': 0, 'type': 'SeeLevel II 709-BTP3', 'packet': 'no packet id', 'firmware': 'Garnet', 'data': True, 'rssi': -86, 'local_name': '709-BT '} 2024-02-26 15:05:15.827 INFO (Thread-103) [custom_components.ble_monitor.ble_parser.oras] BLE ADV from Oras DEVICE: SeeLevel II 709-BTP3, result: {'mac': '00A0500C464E', 'sensor_id': 2, 'sensor_data': ' 6', 'sensor_volume': '000', 'sensor_total': '000', 'sensor_alarm': '0'} 2024-02-26 15:05:15.831 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Data measuring sensor received: {'mac': '00A0500C464E', 'sensor_id': 2, 'sensor_data': ' 6', 'sensor_volume': '000', 'sensor_total': '000', 'sensor_alarm': '0', 'grey tank': 6, 'type': 'SeeLevel II 709-BTP3', 'packet': 'no packet id', 'firmware': 'Garnet', 'data': True, 'rssi': -77, 'local_name': '709-BT '} 2024-02-26 15:05:15.954 INFO (Thread-103) [custom_components.ble_monitor.ble_parser.oras] BLE ADV from Oras DEVICE: SeeLevel II 709-BTP3, result: {'mac': '00A0500C464E', 'sensor_id': 13, 'sensor_data': '133', 'sensor_volume': '000', 'sensor_total': '000', 'sensor_alarm': '0'} 2024-02-26 15:05:15.959 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Data measuring sensor received: {'mac': '00A0500C464E', 'sensor_id': 13, 'sensor_data': '133', 'sensor_volume': '000', 'sensor_total': '000', 'sensor_alarm': '0', 'voltage': 13.3, 'type': 'SeeLevel II 709-BTP3', 'packet': 'no packet id', 'firmware': 'Garnet', 'data': True, 'rssi': -84, 'local_name': '709-BT '} 2024-02-26 15:05:16.083 INFO (Thread-103) [custom_components.ble_monitor.ble_parser.oras] BLE ADV from Oras DEVICE: SeeLevel II 709-BTP3, result: {'mac': '00A0500C464E', 'sensor_id': 0, 'sensor_data': ' 0', 'sensor_volume': '000', 'sensor_total': '000', 'sensor_alarm': '0'} 2024-02-26 15:05:16.087 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Data measuring sensor received: {'mac': '00A0500C464E', 'sensor_id': 0, 'sensor_data': ' 0', 'sensor_volume': '000', 'sensor_total': '000', 'sensor_alarm': '0', 'fresh tank': 0, 'type': 'SeeLevel II 709-BTP3', 'packet': 'no packet id', 'firmware': 'Garnet', 'data': True, 'rssi': -88, 'local_name': '709-BT '} 2024-02-26 15:05:16.337 INFO (Thread-103) [custom_components.ble_monitor.ble_parser.oras] BLE ADV from Oras DEVICE: SeeLevel II 709-BTP3, result: {'mac': '00A0500C464E', 'sensor_id': 2, 'sensor_data': ' 6', 'sensor_volume': '000', 'sensor_total': '000', 'sensor_alarm': '0'} 2024-02-26 15:05:16.341 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Data measuring sensor received: {'mac': '00A0500C464E', 'sensor_id': 2, 'sensor_data': ' 6', 'sensor_volume': '000', 'sensor_total': '000', 'sensor_alarm': '0', 'grey tank': 6, 'type': 'SeeLevel II 709-BTP3', 'packet': 'no packet id', 'firmware': 'Garnet', 'data': True, 'rssi': -78, 'local_name': '709-BT '} 2024-02-26 15:05:16.596 INFO (Thread-103) [custom_components.ble_monitor.ble_parser.oras] BLE ADV from Oras DEVICE: SeeLevel II 709-BTP3, result: {'mac': '00A0500C464E', 'sensor_id': 0, 'sensor_data': ' 0', 'sensor_volume': '000', 'sensor_total': '000', 'sensor_alarm': '0'} 2024-02-26 15:05:16.600 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Data measuring sensor received: {'mac': '00A0500C464E', 'sensor_id': 0, 'sensor_data': ' 0', 'sensor_volume': '000', 'sensor_total': '000', 'sensor_alarm': '0', 'fresh tank': 0, 'type': 'SeeLevel II 709-BTP3', 'packet': 'no packet id', 'firmware': 'Garnet', 'data': True, 'rssi': -88, 'local_name': '709-BT '} 2024-02-26 15:05:16.726 INFO (Thread-103) [custom_components.ble_monitor.ble_parser.oras] BLE ADV from Oras DEVICE: SeeLevel II 709-BTP3, result: {'mac': '00A0500C464E', 'sensor_id': 1, 'sensor_data': ' 8', 'sensor_volume': '000', 'sensor_total': '000', 'sensor_alarm': '0'} 2024-02-26 15:05:16.730 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Data measuring sensor received: {'mac': '00A0500C464E', 'sensor_id': 1, 'sensor_data': ' 8', 'sensor_volume': '000', 'sensor_total': '000', 'sensor_alarm': '0', 'black tank': 8, 'type': 'SeeLevel II 709-BTP3', 'packet': 'no packet id', 'firmware': 'Garnet', 'data': True, 'rssi': -76, 'local_name': '709-BT '} 2024-02-26 15:05:16.751 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] Data binary sensor received: {'firmware': 'Govee', 'temperature': 25.6, 'humidity': 34.2, 'battery': 89, 'mac': 'D03736396271', 'type': 'H5101/H5102/H5177', 'packet': 'no packet id', 'data': True, 'rssi': -70, 'local_name': 'GVH5103_6271'} 2024-02-26 15:05:16.756 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Data measuring sensor received: {'firmware': 'Govee', 'temperature': 25.6, 'humidity': 34.2, 'battery': 89, 'mac': 'D03736396271', 'type': 'H5101/H5102/H5177', 'packet': 'no packet id', 'data': True, 'rssi': -70, 'local_name': 'GVH5103_6271'}

On Mon, Feb 26, 2024 at 2:32 PM Jason Loven @.***> wrote:

Thanks so much for adding this! It will be a significant improvement and much appreciated.

On Mon, Feb 26, 2024 at 2:28 PM Ernst Klamer @.***> wrote:

I just added 3 HA tank sensors (fresh/grey/black) for testing in the PR. I can add the other sensors later, but, as you have said, you didn't see these on your setup. But let add these just to be sure (for other setups/tanks/users).

I'll do that later, I call it a day today.

BTW. You can see the value of the alarm in the logging, which I have added in the current draft. I expect it to become 1 if the alarm fires.

   # remove later
    result.update({
        "sensor_id": sensor_id,
        "sensor_data": sensor_data,
        "sensor_volume": sensor_volume,
        "sensor_total": sensor_total,
        "sensor_alarm": sensor_alarm,
    })
    _LOGGER.info(
        "BLE ADV from Oras DEVICE: %s, result: %s",
        device_type,
        result
    )

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

Ernst79 commented 4 months ago

Added the filtering. Do the tanks sensors show up in HA?

JBLoven commented 4 months ago

I think (know) we're running in to my limited knowledge of HA as I'm still getting up to speed on messing with it under the hood. Is there a way to have the repo automatically pull your changes in to my instance? I've been manually grabbing the code and replacing it with the source files on my system. I'm sure that's totally the wrong way. Of course I'm not here to have you educate me so I'll go and google things a bit more but failing that I'll try to grab things that have changed and manually updating them.

To answer your question, no additional sensors are present. Pretty much because my code probably doesn't contain your most recent changes (yet).

On Tue, Feb 27, 2024 at 4:12 PM Ernst Klamer @.***> wrote:

Added the filtering. Do the tanks sensors show up in HA?

— Reply to this email directly, view it on GitHub https://github.com/custom-components/ble_monitor/issues/1320#issuecomment-1967598008, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXAUG6HGUU5LLOGMXOSK5QTYVZD5BAVCNFSM6AAAAABDZO2QF6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRXGU4TQMBQHA . You are receiving this because you authored the thread.Message ID: @.***>

JBLoven commented 4 months ago

I manually pulled the files locally and updated my instance with the 4 changed files. After a restart the sensors are starting to show up...

I spoke to a tech at Garnet today about another issue and he says they're releasing a new BT module this month that will have up to 7 monitors so when I have more info on that I'll let you know.

And just to say it again...This is great! Thanks so much!

On Tue, Feb 27, 2024 at 4:12 PM Ernst Klamer @.***> wrote:

Added the filtering. Do the tanks sensors show up in HA?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

Ernst79 commented 4 months ago

manually copying and pasting is just fine, but a restart is required. If things go wrong, you can always update in HACS, to get things back to the original code.

But I have now released it as 12.10.0. Added the other tanks and an problem binary sensor (representing the alarm).