Switchbot Outdoor Thermometer / Hygrometer

How do I get from seeing the device on MQTT Explorer using the TheengsGateway to getting the data into HA? I’ve used Node-Red to subscribe for something similar before. Is that they want I should do this too?

The device should be created automaticaly into the Devices section of HA
Settings->Devices & Services-> Devices

1 Like

I toggled my Shelly device’s bluetooth scanning to Active (was on Passive) and the Switchbot outdoor meter was then discovered by Home Assistant.

There are entities for Temperature, Humidity, Battery and Bluetooth signal strength.

1 Like

Did you do anything else?

I have scanning on, on the pi4 and set the Shelly to active scanning.

There is no sign of the sensor in HA, also Shelly logs seem to find a ton of devices, none are created in HA.

Did I forget to do anything?

Also I cannot find the known_devices.yaml

I enabled the active scanning via Home Assistant device configuration, rather than via the Shelly app/portal.

Settings – Home Assistant

@DigiH Can I use an ESP32 running ESPhome decode this meter directly without using openmqttgateway or other addons by examining servicedata or manufacturerdata?

I wouldn’t really know about ESPHome, as I only implemented this for Theengs Decoder, so I know OpenMQTTGateway running on an ESP32 will decode it fine, without requiring any further HA add-ons.

I’m certain sooner or later the SwitchBot Outdoor Meter decoding will also be included in other BLE implementations.

Would you mind pointing me to your code for decoding? I wonder if I can write some C code to do it on the ESP.

Edit: I found it.

1 Like

Hi,

I wonder what your intentions are regarding Home Assistant Container?

I managed to get TheengsGateway running using the docker container, but (a) it doesn’t have a version number, (b) it looks pretty old and (c) I have no idea whether or how the decoder is involved.

I think your stuff looks great and would love to get it working, but the user guides fall a little short on docker implementations.

Thanks!

B.

Incidentally, for information, it appears that all that is needed for the original post is the latest version of Home Assistant for which the Switchbot integration recognises the temp/humidity device via bluetooth.

I’m running 2023.8.4 and all is fine.

Is the sensor data updating for you? For me it grabs a static number when HA was first booted and then never updates

Yes. Have you located it within bluetooth range of the Home Assistant bluetooth gateway or, if you have one, the bluetooth proxy ? I have a dedicated ESP32 Atom as well as having bluetooth enabled on the RPi that runs HA.

If using the proxy, you should see a switchbot device in the MQTT integration as well.

If you can see the correct value with the Android app, you might want to see if you can access the sensor from the bluetooth location of the HA device or BT proxy if you are using one.

B.

Hi DigiH, @DigiH

I’ve just purchsed one of these SwitchBot devices, and the MQTT explorer doesn’t show these 2 values:

“servicedatauuid”: “fd3d”,
“servicedata”: “770064”,

This is what it shows:
{
“manufacturerdata”: “6909d23534382b6903020798b500”,
“id”: “D2:35:34:38:2B:69”,
“rssi”: -80,
“mfr”: “Woan Technology (Shenzhen) Co., Ltd.”
}

The online parser won’t decode this but it will if I insert the missing values. Is this something the device is missing or does the decoder need tweaking?

Many thanks,
Andrew

Hi @planetawylie

The SwitchBot Outdoor Meter doesn’t always broadcast both manufacturerdata and servicedatauuid/servicedata, but the decoder has been updated with the recent 1.8.0 release to also decoder only manufacturerdata, if the broadcast also includes the device broadcast name. We will need to update the web parser with these changes.

Are you only ever getting the manufacturerdata only without the name or servicedatauuid/servicedata at all, as in your example above?

Hi, I was only getting the manufacturerdata and mfr name, as above. So I did what any self respecting software nerd does…I unpaired it from their app, did a reset (hold button for 15s), and kicked it off again without going near their app. Guess what, it works perfectly now :).

1 Like

Perfect! Good to hear things are working as expected again with the decoding, and many thanks for this hint, which is the same for some other devices, or vice versa, where they have to be linked to their apps for proper BLE broadcasting.

Good to know that the SwitchBot Outdoor Meter should not be paired with the app - also for other users who might experience this issue.

1 Like

Hi, am back again. My SwitchBot Meter Pro (CO2) arrived and these things are giving me a migraine.

  • Main HA instance, TheengsGateway, MQTTExplorer shows:
{
  "manufacturerdata": "6909b0e9fe5434a80ce40896280004037d00",
  "id": "B0:E9:FE:54:34:A8",
  "rssi": -82,
  "mfr": "Woan Technology (Shenzhen) Co., Ltd."
}
  • I set up another HA instance on a RPi I had lying around and TheengsGateway, and MQTTExplorer shows:
{
  "manufacturerdata": "6909b0e9fe5434a80ce40896280004037d00",
  "id": "B0:E9:FE:54:34:A8",
  "rssi": -86,
  "servicedatauuid": "fd3d",
  "servicedata": "350064",
  "mfr": "Woan Technology (Shenzhen) Co., Ltd."
}

I’m thinking the BT on my main HA instance is not up to the task.

Info on the SwitchBot unit:
8983ppm, 22.8C, 40%

EDIT: Went the same route as before, made sure the firmware was uptodate, removed it from app, reset it, and it works. Bizarre.

Hi again @planetawylie

As the SwitchBots usually require active scanning, and this usually is activated as default on Theengs Gateway, please make sure it actually is on both in the configuration.

I’m just working on implementing a decoder for the new Meter Pro (CO2), and the temperature, humidity and battery are no issues, but I’m a bit confused about your stated CO2 levels of 8983ppm. Does the device actually go that high up, and if so please do open some windows to get in some fresh air, as these levels would be very unhealthy :wink: Could it have been 893 or something similar?

Could you also verify the model number of your meter Pro CO2, likely written on the back of the device, as W4900010?

Thanks

Lol, I live on Mars :)…yeah that was a typo for CO2.

The Meter Pro (CO2) readings are actually coming into HA…from TheengsG on the RPi.

W4900010 is the model number.

Thanks for the confirmation of the model number.

Did you get my PM with the link to the test decoder?