Skip to content

Conversation

@ahrmn
Copy link

@ahrmn ahrmn commented Dec 23, 2025

I reverse-engineered the settings of the Meter Pro (CO2) and implemented them here.
I have no means of testing if this work for the other Meter models.
An example script to fully configure a device using this would be for example

import asyncio

from switchbot.devices.meter import SwitchbotMeter
from switchbot.discovery import GetSwitchbotDevices
from switchbot.const import SwitchbotModel

BLE_MAC='XX:XX:XX:XX:XX:XX'
METER_MODEL=SwitchbotModel.METER_PRO_C

async def main():
    switchbotDevices = await GetSwitchbotDevices().discover()
    meter_advertisement = switchbotDevices[BLE_MAC]
    print(meter_advertisement.data)
    meter = SwitchbotMeter(device=meter_advertisement.device, model=METER_MODEL)
    await meter.sync_time()
    await meter.show_battery_level(False)
    await meter.set_date_format(True)
    await meter.set_time_format(True)
    await meter.set_co2_thresholds(900, 1200)
    await meter.set_comfortlevel(19, 22, 40, 70)
    await meter.set_temperature_update_interval(10)
    await meter.set_co2_update_interval(10)
    await meter.set_button_function(False, False)
    await meter.set_alert_sound(False, 2)
    await meter.set_alert_temperature_humidity(True, 17, 28, False,
                                               True, 40, 70, False)
    await meter.set_alert_co2(True, 400, 1200, False)
    
asyncio.run(main())

Additionally one can trigger a new measurement regardless of the frequency using
await meter.force_new_CO2_measurement() and calibrate the sensor (at fresh air!) using
await meter.calibrate_co2_sensor().

@ahrmn
Copy link
Author

ahrmn commented Dec 23, 2025

This may solve #416.
@jacekowski Can you test if this synchronises time for the Meter Pro (without CO2 sensor)?

@bdraco bdraco requested a review from zerzhang December 24, 2025 00:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant