Looking for support for Mocreo Environmental Sensors

That might confirm what I was afraid of… there is a firmware upgrade available in my hub for a while, I didn’t upgrade it in fear of breaking the functionality I currrently have.
My yaml still works fine for me to this date, with no change to it, other than better jinja template enhancements to be more resilient against failures, I can post the updated version again if anyone is still interested on that version of the yaml, for the “old firmware”(V1.9.6) .

On another perspective, if you say you got the sensors working fine and reliable, on the latest firmware out there, that might give me the confidence to upgrade my hub.

Regardless of the version of html scraping code, here is an example of the jinja template changes I did to get a more reliable recording and less errors on the log:

from this:

    sensor:
      - unique_id: mocreo_sensor_1_serial
        name: Mocreo sensor_1_serial
        device_class: temperature
        state_class: measurement
        unit_of_measurement: '°F'
        select_list: 'div:has(>.card-header):-soup-contains("sensor_1_serial")>div>div>div'
        value_template: '{{ value.split(",")[2].split("°")[0] | trim | float }}'
        attributes:
          - name: model
            select_list: 'div:has(>.card-header):-soup-contains("sensor_1_serial")>div>div>div'
            value_template: '{{ value.split(",")[0] | trim }}'

to this:

    sensor:
      - unique_id: mocreo_sensor_1_serial
        name: Mocreo sensor_1_serial
        device_class: temperature
        state_class: measurement
        unit_of_measurement: '°F'
        select_list: 'div:has(>.card-header):-soup-contains("sensor_1_serial")>div>div>div'
        on_error:
          log: info
          value: default
          default: "unavailable"  
        value_template: >
              {%- if value %}
                {%- if value.split(",") | length >= 3 -%}
                  {{ value.split(",")[2].split("°")[0] | trim | float(0) }}
                {%- else -%}
                  unavailable
                {%- endif -%}
              {%- else -%}
                unavailable
              {% endif -%}
        attributes:
          - name: model
            select_list: 'div:has(>.card-header):-soup-contains("sensor_1_serial")>div>div>div'
            value_template: >
              {%- if value %}
                {%- if value.split(",") | length >= 3 -%}
                  {{ value.split(",")[0] | trim }}
                {%- endif -%}
              {% endif -%}

Those extra checks helps a lot when the hub goes offline, or my network, or power outages or anything else.

The temperature of MOCREO ST5 Bluetooth can be read using a Bluetooth library. The temperature is transmitted in the “payload” section of the “Advertisement”. All that is needed is to start an advertisement watcher and capture the response. The temperature is in byte 16 (low) and byte 17 (high)
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
Payload: 01-06-09-4D-4F-43-52-45-4F-FF-01-81-96-02-64-B0-21-09-00-00-00-00-04-12-6A-00-00-00

Device Name: MOCREO
Device Mac: 30:AE:A4:04:12:6A
Device Address: 30:ae:a4:04:12:6a
Device ID: BluetoothLE#BluetoothLEa8:93:4a:df:da:ca-30:ae:a4:04:12:6a
Service Name: GenericAccess
Service UUID: 00001800-0000-1000-8000-00805f9b34fb
Characteristic Name: DeviceName
Characteristic Properties: Read, Write
Characteristic UUID: 00002a00-0000-1000-8000-00805f9b34fb
Characteristic Short UUID: 0x2A00
Characteristic Service Device ID: \?\BTHLEDevice#{00001800-0000-1000-8000-00805f9b34fb}_Dev_VID&02045e_PID&0040_REV&0300_30aea404126a#9&fe6b697&2&0001#{6e3bb679-4372-40c8-9eaa-4509df260cd8}
Characteristic DisplayType: UTF8
Characteristic Value: 4D-4F-43-52-45-4F-00
Descriptors: None
Service Name: GenericAttribute
Service UUID: 00001801-0000-1000-8000-00805f9b34fb
Characteristic Name: ServiceChanged
Characteristic Properties: Read, Indicate
Characteristic UUID: 00002a05-0000-1000-8000-00805f9b34fb
Characteristic Short UUID: 0x2A05
Characteristic Service Device ID: \?\BTHLEDevice#{00001801-0000-1000-8000-00805f9b34fb}_Dev_VID&02045e_PID&0040_REV&0300_30aea404126a#9&fe6b697&2&0004#{6e3bb679-4372-40c8-9eaa-4509df260cd8}
Characteristic DisplayType: UTF8
Characteristic Value: 01-00-FF-FF
Descriptors: None
Service Name: 65296
Service UUID: 0000ff10-0000-1000-8000-00805f9b34fb
Characteristic Name: 65297
Characteristic Properties: Read, WriteWithoutResponse, Write, Notify
Characteristic UUID: 0000ff11-0000-1000-8000-00805f9b34fb
Characteristic Short UUID: 0xFF11
Characteristic Service Device ID: \?\BTHLEDevice#{0000ff10-0000-1000-8000-00805f9b34fb}_Dev_VID&02045e_PID&0040_REV&0300_30aea404126a#9&fe6b697&2&0008#{6e3bb679-4372-40c8-9eaa-4509df260cd8}
Characteristic DisplayType: UTF8
Characteristic Value: 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
Descriptors: None
Characteristic Name: 65298
Characteristic Properties: Read, WriteWithoutResponse, Write, Notify
Characteristic UUID: 0000ff12-0000-1000-8000-00805f9b34fb
Characteristic Short UUID: 0xFF12
Characteristic Service Device ID: \?\BTHLEDevice#{0000ff10-0000-1000-8000-00805f9b34fb}_Dev_VID&02045e_PID&0040_REV&0300_30aea404126a#9&fe6b697&2&0008#{6e3bb679-4372-40c8-9eaa-4509df260cd8}
Characteristic DisplayType: UTF8
Characteristic Value: 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
Descriptors: None
Characteristic Name: 65299
Characteristic Properties: Read, WriteWithoutResponse, Write, Notify
Characteristic UUID: 0000ff13-0000-1000-8000-00805f9b34fb
Characteristic Short UUID: 0xFF13
Characteristic Service Device ID: \?\BTHLEDevice#{0000ff10-0000-1000-8000-00805f9b34fb}_Dev_VID&02045e_PID&0040_REV&0300_30aea404126a#9&fe6b697&2&0008#{6e3bb679-4372-40c8-9eaa-4509df260cd8}
Characteristic DisplayType: UTF8
Characteristic Value: 06-02-14-00-02-15-00-00-00-00-00-00-00-00-00-00-00-00-00-00
Descriptors: None
Service Name: DeviceInformation
Service UUID: 0000180a-0000-1000-8000-00805f9b34fb
Characteristic Name: ManufacturerNameString
Characteristic Properties: Read
Characteristic UUID: 00002a29-0000-1000-8000-00805f9b34fb
Characteristic Short UUID: 0x2A29
Characteristic Service Device ID: \?\BTHLEDevice#{0000180a-0000-1000-8000-00805f9b34fb}_Dev_VID&02045e_PID&0040_REV&0300_30aea404126a#9&fe6b697&2&0012#{6e3bb679-4372-40c8-9eaa-4509df260cd8}
Characteristic DisplayType: UTF8
Characteristic Value: 4D-4F-43-52-45-4F-20-4C-54-44
Descriptors: None
Characteristic Name: ModelNumberString
Characteristic Properties: Read
Characteristic UUID: 00002a24-0000-1000-8000-00805f9b34fb
Characteristic Short UUID: 0x2A24
Characteristic Service Device ID: \?\BTHLEDevice#{0000180a-0000-1000-8000-00805f9b34fb}_Dev_VID&02045e_PID&0040_REV&0300_30aea404126a#9&fe6b697&2&0012#{6e3bb679-4372-40c8-9eaa-4509df260cd8}
Characteristic DisplayType: UTF8
Characteristic Value: 53-54-35-2D-30-30-30-30
Descriptors: None
Characteristic Name: SerialNumberString
Characteristic Properties: Read
Characteristic UUID: 00002a25-0000-1000-8000-00805f9b34fb
Characteristic Short UUID: 0x2A25
Characteristic Service Device ID: \?\BTHLEDevice#{0000180a-0000-1000-8000-00805f9b34fb}_Dev_VID&02045e_PID&0040_REV&0300_30aea404126a#9&fe6b697&2&0012#{6e3bb679-4372-40c8-9eaa-4509df260cd8}
Characteristic DisplayType: UTF8
Characteristic Value: 31-2E-30-2E-30-2E-30-2D-4C-45
Descriptors: None
Characteristic Name: HardwareRevisionString
Characteristic Properties: Read
Characteristic UUID: 00002a27-0000-1000-8000-00805f9b34fb
Characteristic Short UUID: 0x2A27
Characteristic Service Device ID: \?\BTHLEDevice#{0000180a-0000-1000-8000-00805f9b34fb}_Dev_VID&02045e_PID&0040_REV&0300_30aea404126a#9&fe6b697&2&0012#{6e3bb679-4372-40c8-9eaa-4509df260cd8}
Characteristic DisplayType: UTF8
Characteristic Value: 31-2E-30-2E-30
Descriptors: None
Characteristic Name: FirmwareRevisionString
Characteristic Properties: Read
Characteristic UUID: 00002a26-0000-1000-8000-00805f9b34fb
Characteristic Short UUID: 0x2A26
Characteristic Service Device ID: \?\BTHLEDevice#{0000180a-0000-1000-8000-00805f9b34fb}_Dev_VID&02045e_PID&0040_REV&0300_30aea404126a#9&fe6b697&2&0012#{6e3bb679-4372-40c8-9eaa-4509df260cd8}
Characteristic DisplayType: UTF8
Characteristic Value: 30-2E-33
Descriptors: None
Characteristic Name: SoftwareRevisionString
Characteristic Properties: Read
Characteristic UUID: 00002a28-0000-1000-8000-00805f9b34fb
Characteristic Short UUID: 0x2A28
Characteristic Service Device ID: \?\BTHLEDevice#{0000180a-0000-1000-8000-00805f9b34fb}_Dev_VID&02045e_PID&0040_REV&0300_30aea404126a#9&fe6b697&2&0012#{6e3bb679-4372-40c8-9eaa-4509df260cd8}
Characteristic DisplayType: UTF8
Characteristic Value: 30-2E-33
Descriptors: None
Characteristic Name: SystemId
Characteristic Properties: Read
Characteristic UUID: 00002a23-0000-1000-8000-00805f9b34fb
Characteristic Short UUID: 0x2A23
Characteristic Service Device ID: \?\BTHLEDevice#{0000180a-0000-1000-8000-00805f9b34fb}_Dev_VID&02045e_PID&0040_REV&0300_30aea404126a#9&fe6b697&2&0012#{6e3bb679-4372-40c8-9eaa-4509df260cd8}
Characteristic DisplayType: UTF8
Characteristic Value: 12-34-56-FF-FE-9A-BC-DE
Descriptors: None
Characteristic Name: Ieee11073_20601RegulatoryCertificationDataList
Characteristic Properties: Read
Characteristic UUID: 00002a2a-0000-1000-8000-00805f9b34fb
Characteristic Short UUID: 0x2A2A
Characteristic Service Device ID: \?\BTHLEDevice#{0000180a-0000-1000-8000-00805f9b34fb}_Dev_VID&02045e_PID&0040_REV&0300_30aea404126a#9&fe6b697&2&0012#{6e3bb679-4372-40c8-9eaa-4509df260cd8}
Characteristic DisplayType: UTF8
Characteristic Value: FF-EE-DD-CC-BB-AA
Descriptors: None
Characteristic Name: PnpId
Characteristic Properties: Read
Characteristic UUID: 00002a50-0000-1000-8000-00805f9b34fb
Characteristic Short UUID: 0x2A50
Characteristic Service Device ID: \?\BTHLEDevice#{0000180a-0000-1000-8000-00805f9b34fb}_Dev_VID&02045e_PID&0040_REV&0300_30aea404126a#9&fe6b697&2&0012#{6e3bb679-4372-40c8-9eaa-4509df260cd8}
Characteristic DisplayType: UTF8
Characteristic Value: 02-5E-04-40-00-00-03
Descriptors: None
Service Name: Battery
Service UUID: 0000180f-0000-1000-8000-00805f9b34fb
Characteristic Name: BatteryLevel
Characteristic Properties: Read, Notify
Characteristic UUID: 00002a19-0000-1000-8000-00805f9b34fb
Characteristic Short UUID: 0x2A19
Characteristic Service Device ID: \?\BTHLEDevice#{0000180f-0000-1000-8000-00805f9b34fb}_Dev_VID&02045e_PID&0040_REV&0300_30aea404126a#9&fe6b697&2&0025#{6e3bb679-4372-40c8-9eaa-4509df260cd8}
Characteristic DisplayType: UTF8
Characteristic Value: 00
Descriptors: None
Service Name: f000ffc0-0451-4000-b000-000000000000
Service UUID: f000ffc0-0451-4000-b000-000000000000
Characteristic Name: f000ffc1-0451-4000-b000-000000000000
Characteristic Properties: WriteWithoutResponse, Write, Notify
Characteristic UUID: f000ffc1-0451-4000-b000-000000000000
Characteristic Short UUID:
Characteristic Service Device ID: \?\BTHLEDevice#{f000ffc0-0451-4000-b000-000000000000}_Dev_VID&02045e_PID&0040_REV&0300_30aea404126a#9&fe6b697&2&0029#{6e3bb679-4372-40c8-9eaa-4509df260cd8}
Characteristic DisplayType: NotSet
Characteristic Value: Read Not Permitted
Descriptors: None
Characteristic Name: f000ffc2-0451-4000-b000-000000000000
Characteristic Properties: WriteWithoutResponse, Write, Notify
Characteristic UUID: f000ffc2-0451-4000-b000-000000000000
Characteristic Short UUID:
Characteristic Service Device ID: \?\BTHLEDevice#{f000ffc0-0451-4000-b000-000000000000}_Dev_VID&02045e_PID&0040_REV&0300_30aea404126a#9&fe6b697&2&0029#{6e3bb679-4372-40c8-9eaa-4509df260cd8}
Characteristic DisplayType: NotSet
Characteristic Value: Read Not Permitted
Descriptors: None
Service Name: CurrentTime
Service UUID: 00001805-0000-1000-8000-00805f9b34fb
Characteristic Name: CurrentTime
Characteristic Properties: Read, WriteWithoutResponse, Notify
Characteristic UUID: 00002a2b-0000-1000-8000-00805f9b34fb
Characteristic Short UUID: 0x2A2B
Characteristic Service Device ID: \?\BTHLEDevice#{00001805-0000-1000-8000-00805f9b34fb}_Dev_VID&02045e_PID&0040_REV&0300_30aea404126a#9&fe6b697&2&0032#{6e3bb679-4372-40c8-9eaa-4509df260cd8}
Characteristic DisplayType: UTF8
Characteristic Value: 00-00-00-00-00-00-0E-00-00-00
Descriptors: None
Characteristic Name: LocalTimeInformation
Characteristic Properties: Read
Characteristic UUID: 00002a0f-0000-1000-8000-00805f9b34fb
Characteristic Short UUID: 0x2A0F
Characteristic Service Device ID: \?\BTHLEDevice#{00001805-0000-1000-8000-00805f9b34fb}_Dev_VID&02045e_PID&0040_REV&0300_30aea404126a#9&fe6b697&2&0032#{6e3bb679-4372-40c8-9eaa-4509df260cd8}
Characteristic DisplayType: UTF8
Characteristic Value: 20-00
Descriptors: None
Characteristic Name: ReferenceTimeInformation
Characteristic Properties: Read
Characteristic UUID: 00002a14-0000-1000-8000-00805f9b34fb
Characteristic Short UUID: 0x2A14
Characteristic Service Device ID: \?\BTHLEDevice#{00001805-0000-1000-8000-00805f9b34fb}_Dev_VID&02045e_PID&0040_REV&0300_30aea404126a#9&fe6b697&2&0032#{6e3bb679-4372-40c8-9eaa-4509df260cd8}
Characteristic DisplayType: UTF8
Characteristic Value: 00-FF-01-00
Descriptors: None
Advertisement Address: 30AEA404126A
Address Type: Unspecified
Connectable: True
Anonymous: False
Directed: False
Payload: 01-06-09-4D-4F-43-52-45-4F-FF-01-81-96-02-64-B0-21-09-00-00-00-00-04-12-6A-00-00-00
RSSI: -41
Scan Response: False
Scannable: False
Type: ConnectableUndirected
Service UUID: None
Data Sections: 3
Type: Flags
Data: GeneralDiscoverableMode, ClassicNotSupported
Type: CompleteLocalName
Data: 4D-4F-43-52-45-4F
Type: ManufacturerSpecificData
Data:
Advertisement Address: 30AEA404126A
Address Type: Unspecified
Connectable: False
Anonymous: False
Directed: False
Payload:
RSSI: -41
Scan Response: True
Scannable: False
Type: ScanResponse
Service UUID: None
Data Sections: None