Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion custom_components/ble_monitor/ble_parser/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ def parse_advertisement(
# Inkbird IBS-TH
sensor_data = parse_inkbird(self, man_spec_data, local_name, mac)
break
elif local_name == "MOCREO" and data_len == 0x13:
elif (local_name == "MOCREO" and data_len == 0x13) or (local_name == "ST7" and data_len == 0x11):
# MOCREO
sensor_data = parse_mocreo(self, man_spec_data, local_name, mac)
break
Expand Down
9 changes: 8 additions & 1 deletion custom_components/ble_monitor/ble_parser/mocreo.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
_LOGGER = logging.getLogger(__name__)

MOCREO_TYPE_DICT = {
0x10: "ST7",
0x81: "ST5",
0x82: "SW2",
0x83: "ST6",
Expand All @@ -26,6 +27,9 @@
}

MOCREO_TYPE_DATA_PARSING_FORMAT = {
0x10: {
"temperature": (5, 0, -16, True, lambda x: x / 100),
},
0x81: {
"temperature": (6, 0, -16, True, lambda x: x / 100),
},
Expand Down Expand Up @@ -87,7 +91,10 @@ def _get_value(source, pos):

def parse_mocreo(self, data: bytes, local_name: str, mac: bytes):
"""Parser for MOCREO sensors"""
common_data = data[2:]
if data[0] == 0x11 and data[1] == 0xff and data[2] == 0x4a:
common_data = data[9:] #Mocreo's oddball ST7 format
else:
common_data = data[2:] #Mocreo's "normal" format
firmware = "MOCREO"
result = {"firmware": firmware}

Expand Down
2 changes: 2 additions & 0 deletions custom_components/ble_monitor/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -2199,6 +2199,7 @@ class BLEMonitorBinarySensorEntityDescription(
'ST5' : [["temperature", "battery", "rssi"], [], []],
'SW2' : [["battery", "rssi"], [], ["water leak"]],
'ST6' : [["temperature", "humidity", "battery", "rssi"], [], []],
'ST7' : [["temperature", "battery", "rssi"], [], []],
'ST8' : [["temperature", "battery", "rssi"], [], []],
'ST9' : [["temperature", "humidity", "battery", "rssi"], [], []],
'ST10' : [["temperature", "battery", "rssi"], [], []],
Expand Down Expand Up @@ -2349,6 +2350,7 @@ class BLEMonitorBinarySensorEntityDescription(
'ST5' : 'MOCREO',
'SW2' : 'MOCREO',
'ST6' : 'MOCREO',
'ST7' : 'MOCREO',
'ST8' : 'MOCREO',
'ST9' : 'MOCREO',
'ST10' : 'MOCREO',
Expand Down
24 changes: 24 additions & 0 deletions docs/_devices/MOCREO_ST7.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
manufacturer: MOCREO
name: Temperature Sensor
model: ST7
image: MOCREO_ST7.png
physical_description: Rectangular body, with probe, uses 9V battery, BLE
broadcasted_properties:
- temperature
- battery
- rssi
broadcasted_property_notes:
broadcast_rate:
active_scan: no
encryption_key:
custom_firmware:
notes: >
Key Features:
- Measuring Range: -40 to +221°F
- Accuracy: ±0.9°C (temperature)
- Built-in 120dB loud beeper
- Connects to your phone via BLE directly, or works with a hub for remote monitoring
- Real-time data is available in Home Assistant dashboards
- More information can be found in [MOCREO ST7 Temperature Sensor](https://mocreo.com/products/temperature-sensor/)
---
Binary file added docs/assets/images/MOCREO_ST7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading