I did!
Follow updated example for 3 separate ST5 sensors:
You only need to replace the placeholders for your actual sensor serial numbers, and of course the address/ip to your hub
multiscrape:
- resource: 'https://mocreo_hub.reverse_proxy.com/sensors'
scan_interval: 300
verify_ssl: false
form_submit:
resource: 'https://mocreo_hub.reverse_proxy.com/login'
select: 'body > div > div > div > div > div.card-body > form'
input:
passwd: !secret mocreo_password
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 }}'
- name: serialnumber
select_list: 'div:has(>.card-header):-soup-contains("sensor_1_serial")>div>div>div'
value_template: '{{ value.split(",")[1].split(":")[1] | trim }}'
- name: temperature
select_list: 'div:has(>.card-header):-soup-contains("sensor_1_serial")>div>div>div'
value_template: '{{ value.split(",")[2].split("°")[0] | trim }}'
- name: unit_of_measurement
select_list: 'div:has(>.card-header):-soup-contains("sensor_1_serial")>div>div>div'
value_template: '°{{ value.split(",")[2].split("°")[1] | trim}}'
- unique_id: mocreo_sensor_2_serial
name: Mocreo sensor_2_serial
device_class: temperature
state_class: measurement
unit_of_measurement: '°F'
select_list: 'div:has(>.card-header):-soup-contains("sensor_2_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_2_serial")>div>div>div'
value_template: '{{ value.split(",")[0] | trim }}'
- name: serialnumber
select_list: 'div:has(>.card-header):-soup-contains("sensor_2_serial")>div>div>div'
value_template: '{{ value.split(",")[1].split(":")[1] | trim }}'
- name: temperature
select_list: 'div:has(>.card-header):-soup-contains("sensor_2_serial")>div>div>div'
value_template: '{{ value.split(",")[2].split("°")[0] | trim }}'
- name: unit_of_measurement
select_list: 'div:has(>.card-header):-soup-contains("sensor_2_serial")>div>div>div'
value_template: '°{{ value.split(",")[2].split("°")[1] | trim}}'
- unique_id: mocreo_sensor_3_serial
name: Mocreo sensor_3_serial
device_class: temperature
state_class: measurement
unit_of_measurement: '°F'
select_list: 'div:has(>.card-header):-soup-contains("sensor_3_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_3_serial")>div>div>div'
value_template: '{{ value.split(",")[0] | trim }}'
- name: serialnumber
select_list: 'div:has(>.card-header):-soup-contains("sensor_3_serial")>div>div>div'
value_template: '{{ value.split(",")[1].split(":")[1] | trim }}'
- name: temperature
select_list: 'div:has(>.card-header):-soup-contains("sensor_3_serial")>div>div>div'
value_template: '{{ value.split(",")[2].split("°")[0] | trim }}'
- name: unit_of_measurement
select_list: 'div:has(>.card-header):-soup-contains("sensor_3_serial")>div>div>div'
value_template: '°{{ value.split(",")[2].split("°")[1] | trim}}'
- resource: 'https://mocreo_hub.reverse_proxy.com/nodes'
scan_interval: 1000
verify_ssl: false
form_submit:
resource: 'https://mocreo_hub.reverse_proxy.com/login'
select: 'body > div > div > div > div > div.card-body > form'
input:
passwd: !secret mocreo_password
sensor:
- unique_id: mocreo_sensor_1_serial_diagnostic
name: Mocreo sensor_1_serial diagnostic
select_list: 'tr:-soup-contains("sensor_1_serial")>td>span.text-success'
value_template: '{{ iif("" in value,"Online","Offline") }}'
attributes:
- name: type
select_list: 'tr:-soup-contains("sensor_1_serial")>td'
value_template: '{{ value.split(",")[0] | trim }}'
- name: serialnumber
select_list: 'tr:-soup-contains("sensor_1_serial")>td'
value_template: '{{ value.split(",")[1] | trim }}'
- name: battery
select_list: 'tr:-soup-contains("sensor_1_serial")>td'
value_template: '{{ value.split(",")[3] | trim }}'
- name: signal
select_list: 'tr:-soup-contains("sensor_1_serial")>td'
value_template: '{{ value.split(",")[4] | trim }}'
- name: online
select_list: 'tr:-soup-contains("sensor_1_serial")>td>span.text-success'
value_template: '{{ iif("" in value,"Online","Offline") }}'
- name: last_seen
select_list: 'tr:-soup-contains("sensor_1_serial")>td'
value_template: '{{ value.split(",")[6] | trim }}'
- name: version
select_list: 'tr:-soup-contains("sensor_1_serial")>td'
value_template: '{{ value.split(",")[7] | trim }}'
- name: model
select_list: 'tr:-soup-contains("sensor_1_serial")>td'
value_template: '{{ value.split(",")[8] | trim }}'
- unique_id: mocreo_sensor_1_serial_battery
name: Mocreo sensor_1_serial battery
device_class: battery
state_class: measurement
unit_of_measurement: '%'
select_list: 'tr:-soup-contains("sensor_1_serial")>td'
value_template: '{{ value.split(",")[3].split("%")[0] | trim | float }}'
attributes:
- name: type
select_list: 'tr:-soup-contains("sensor_1_serial")>td'
value_template: '{{ value.split(",")[0] | trim }}'
- name: serialnumber
select_list: 'tr:-soup-contains("sensor_1_serial")>td'
value_template: '{{ value.split(",")[1] | trim }}'
- name: battery
select_list: 'tr:-soup-contains("sensor_1_serial")>td'
value_template: '{{ value.split(",")[3] | trim }}'
- name: signal
select_list: 'tr:-soup-contains("sensor_1_serial")>td'
value_template: '{{ value.split(",")[4] | trim }}'
- name: online
select_list: 'tr:-soup-contains("sensor_1_serial")>td>span.text-success'
value_template: '{{ iif("" in value,"Online","Offline") }}'
- name: last_seen
select_list: 'tr:-soup-contains("sensor_1_serial")>td'
value_template: '{{ value.split(",")[6] | trim }}'
- name: version
select_list: 'tr:-soup-contains("sensor_1_serial")>td'
value_template: '{{ value.split(",")[7] | trim }}'
- name: model
select_list: 'tr:-soup-contains("sensor_1_serial")>td'
value_template: '{{ value.split(",")[8] | trim }}'
- unique_id: mocreo_sensor_2_serial_diagnostic
name: Mocreo sensor_2_serial diagnostic
select_list: 'tr:-soup-contains("sensor_2_serial")>td>span.text-success'
value_template: '{{ iif("" in value,"Online","Offline") }}'
attributes:
- name: type
select_list: 'tr:-soup-contains("sensor_2_serial")>td'
value_template: '{{ value.split(",")[0] | trim }}'
- name: serialnumber
select_list: 'tr:-soup-contains("sensor_2_serial")>td'
value_template: '{{ value.split(",")[1] | trim }}'
- name: battery
select_list: 'tr:-soup-contains("sensor_2_serial")>td'
value_template: '{{ value.split(",")[3] | trim }}'
- name: signal
select_list: 'tr:-soup-contains("sensor_2_serial")>td'
value_template: '{{ value.split(",")[4] | trim }}'
- name: online
select_list: 'tr:-soup-contains("sensor_2_serial")>td>span.text-success'
value_template: '{{ iif("" in value,"Online","Offline") }}'
- name: last_seen
select_list: 'tr:-soup-contains("sensor_2_serial")>td'
value_template: '{{ value.split(",")[6] | trim }}'
- name: version
select_list: 'tr:-soup-contains("sensor_2_serial")>td'
value_template: '{{ value.split(",")[7] | trim }}'
- name: model
select_list: 'tr:-soup-contains("sensor_2_serial")>td'
value_template: '{{ value.split(",")[8] | trim }}'
- unique_id: mocreo_sensor_2_serial_battery
name: Mocreo sensor_2_serial battery
device_class: battery
state_class: measurement
unit_of_measurement: '%'
select_list: 'tr:-soup-contains("sensor_2_serial")>td'
value_template: '{{ value.split(",")[3].split("%")[0] | trim | float }}'
attributes:
- name: type
select_list: 'tr:-soup-contains("sensor_2_serial")>td'
value_template: '{{ value.split(",")[0] | trim }}'
- name: serialnumber
select_list: 'tr:-soup-contains("sensor_2_serial")>td'
value_template: '{{ value.split(",")[1] | trim }}'
- name: battery
select_list: 'tr:-soup-contains("sensor_2_serial")>td'
value_template: '{{ value.split(",")[3] | trim }}'
- name: signal
select_list: 'tr:-soup-contains("sensor_2_serial")>td'
value_template: '{{ value.split(",")[4] | trim }}'
- name: online
select_list: 'tr:-soup-contains("sensor_2_serial")>td>span.text-success'
value_template: '{{ iif("" in value,"Online","Offline") }}'
- name: last_seen
select_list: 'tr:-soup-contains("sensor_2_serial")>td'
value_template: '{{ value.split(",")[6] | trim }}'
- name: version
select_list: 'tr:-soup-contains("sensor_2_serial")>td'
value_template: '{{ value.split(",")[7] | trim }}'
- name: model
select_list: 'tr:-soup-contains("sensor_2_serial")>td'
value_template: '{{ value.split(",")[8] | trim }}'
- unique_id: mocreo_sensor_3_serial_diagnostic
name: Mocreo sensor_3_serial diagnostic
select_list: 'tr:-soup-contains("sensor_3_serial")>td>span.text-success'
value_template: '{{ iif("" in value,"Online","Offline") }}'
attributes:
- name: type
select_list: 'tr:-soup-contains("sensor_3_serial")>td'
value_template: '{{ value.split(",")[0] | trim }}'
- name: serialnumber
select_list: 'tr:-soup-contains("sensor_3_serial")>td'
value_template: '{{ value.split(",")[1] | trim }}'
- name: battery
select_list: 'tr:-soup-contains("sensor_3_serial")>td'
value_template: '{{ value.split(",")[3] | trim }}'
- name: signal
select_list: 'tr:-soup-contains("sensor_3_serial")>td'
value_template: '{{ value.split(",")[4] | trim }}'
- name: online
select_list: 'tr:-soup-contains("sensor_3_serial")>td>span.text-success'
value_template: '{{ iif("" in value,"Online","Offline") }}'
- name: last_seen
select_list: 'tr:-soup-contains("sensor_3_serial")>td'
value_template: '{{ value.split(",")[6] | trim }}'
- name: version
select_list: 'tr:-soup-contains("sensor_3_serial")>td'
value_template: '{{ value.split(",")[7] | trim }}'
- name: model
select_list: 'tr:-soup-contains("sensor_3_serial")>td'
value_template: '{{ value.split(",")[8] | trim }}'
- unique_id: mocreo_sensor_3_serial_battery
name: Mocreo sensor_3_serial battery
device_class: battery
state_class: measurement
unit_of_measurement: '%'
select_list: 'tr:-soup-contains("sensor_3_serial")>td'
value_template: '{{ value.split(",")[3].split("%")[0] | trim | float }}'
attributes:
- name: type
select_list: 'tr:-soup-contains("sensor_3_serial")>td'
value_template: '{{ value.split(",")[0] | trim }}'
- name: serialnumber
select_list: 'tr:-soup-contains("sensor_3_serial")>td'
value_template: '{{ value.split(",")[1] | trim }}'
- name: battery
select_list: 'tr:-soup-contains("sensor_3_serial")>td'
value_template: '{{ value.split(",")[3] | trim }}'
- name: signal
select_list: 'tr:-soup-contains("sensor_3_serial")>td'
value_template: '{{ value.split(",")[4] | trim }}'
- name: online
select_list: 'tr:-soup-contains("sensor_3_serial")>td>span.text-success'
value_template: '{{ iif("" in value,"Online","Offline") }}'
- name: last_seen
select_list: 'tr:-soup-contains("sensor_3_serial")>td'
value_template: '{{ value.split(",")[6] | trim }}'
- name: version
select_list: 'tr:-soup-contains("sensor_3_serial")>td'
value_template: '{{ value.split(",")[7] | trim }}'
- name: model
select_list: 'tr:-soup-contains("sensor_3_serial")>td'
value_template: '{{ value.split(",")[8] | trim }}'