Switchbot Outdoor Thermometer / Hygrometer

HI,
I have bought the new outdoor theremometer from Switchbot (SwitchBot Indoor/Outdoor Thermo-Hygrometer – SwitchBot EU)

Unfortunately it is not detected from Home Assistant cia Bluetooth.
Will this be supported soon from the add-on or is there anything I can do manually ?

Thanks, Oliver

2 Likes

Hi @Oliver_Simon,

would you mind installing the Theengs Gateway addon and monitor the undecoded output from the outdoor Thermo-Hygrometer with MQTT Explorer for investigating the encoding and inclusion?

Thanks

Hi,

I also have an outdoor meter and be interested in the support in the HA integration.

I have set up the Theengs Gateway on my laptop and observed if I can find data from the new sensor. Here is what I got:

{
  "servicedatauuid": "fd3d",
  "servicedata": "770064",
  "manufacturerdata": "6909f9666b959ceabe0307973900",
  "id": "F9:66:6B:95:9C:EA",
  "rssi": -29,
  "mfr": "Woan Technology (Shenzhen) Co., Ltd."
}

@DigiH if there is a way I can collect more data just let me know and I try to deliver what is needed.

Thanks

Hi @kaizoor,

This is exactly the data required to see if and how the data might be encoded in the broadcast servicedata or manufacturerdata.

If you could also post the temperature and humidity, as shown in the Switchbot app, at the same time of the readings, and possibly give a few more examples with the relating data as above?

Thanks

P.S.: were the conditions for the above data 19.5°C / 67°F and 57% humidity and a brand new full battery by any chance?

Hi, I integrated the Outdoor Thermometer successfully.

  1. Install Homebridge Addon (custom Repository)
  2. Open Homebridge in Browser
  3. Install Switchbot Plugin for Homebridge
  4. If you want to use the Outdoor sensor local, use BLE, otherwise OpenAPI from Switchbot, enter the MAC Adresse and choose Indoor/Outdoor Sensor
  5. Home Assitant discovers Homekit Homebridge automatically and you should see now the Outdoor meter with temperature and humidity

I hope the Outdoor meter will be integrated in the office Home Assistant Switchbot Integration soon, it would be easier to add the new outdoor meter.

David

Hi,

here are some more data samples:

{
  "servicedatauuid": "fd3d",
  "servicedata": "770064",
  "manufacturerdata": "6909f9666b959cea8b0305993200",
  "id": "F9:66:6B:95:9C:EA",
  "rssi": -64,
  "mfr": "Woan Technology (Shenzhen) Co., Ltd."
}

The switchbot app show the following data:

  • temperature: 25.5°C
  • relative humidity: 50%
  • dew point: 14.4°C
  • absolute humidity: 11.84 g/m³
  • vapor-pressure Deficit: 1.63 kPa

Here is a second example:

{
  "servicedatauuid": "fd3d",
  "servicedata": "770064",
  "manufacturerdata": "6909f9666b959cea940b039a5000",
  "id": "F9:66:6B:95:9C:EA",
  "rssi": -71,
  "mfr": "Woan Technology (Shenzhen) Co., Ltd."
}

The switchbot app show the following data:

  • temperature: 26.3°C
  • relative humidity: 83%
  • dew point: 23.2°C
  • absolute humidity: 20.55 g/m³
  • vapor-pressure Deficit: 0.59 kPa

For both example I waited for a stable state that I can capture the data without changes between MQTT and the app.

@DigiH For the data from the first post. I don’t know the temperature any more.

1 Like

Hi @kaizoor,

Thanks a lot, these helped in getting the temperature and humidity from the freely broadcast advertising data.

{
  "servicedatauuid": "fd3d",
  "servicedata": "770064",
  "manufacturerdata": "6909f9666b959cea8b0305993200",
  "id": "F9:66:6B:95:9C:EA",
  "rssi": -64,
  "mfr": "Woan Technology (Shenzhen) Co., Ltd."
}

Your app results

  • temperature: 25.5°C
  • relative humidity: 50%

Decoded results with my current test decoder

{"brand":"SwitchBot","model":"Outdoor Meter","model_id":"W340001X","type":"THB","acts":true,"tempc":25.5,"tempf":77.9,"hum":50,"batt":100}

{
  "servicedatauuid": "fd3d",
  "servicedata": "770064",
  "manufacturerdata": "6909f9666b959cea940b039a5000",
  "id": "F9:66:6B:95:9C:EA",
  "rssi": -71,
  "mfr": "Woan Technology (Shenzhen) Co., Ltd."
}
  • temperature: 26.3°C
  • relative humidity: 83%

{"brand":"SwitchBot","model":"Outdoor Meter","model_id":"W340001X","type":"THB","acts":true,"tempc":26.3,"tempf":79.34,"hum":80,"batt":100}

Slight difference on the humidity with 83% vs. 80%, but I really put that down to some slight capture changes.

The dew point, absolute humidity and vapour-pressure deficit I assume to be calculated in the actual app from the temperature and humidity, as seen in calculators like

https://www.calctool.org/atmospheric-thermodynamics/absolute-humidity

Although there is still some broadcast data, which might indicate one of these, but nothing which indicates an obvious encoding so far. So for these additional calculated values to be directly accessible a solution like @david1994’s above, which accesses the app values though a SwitchBot account would be necessary. For a direct local broadcast solution these other values should/could be calculated in HA with the temperature and humidity.

Also for the battery I assumed the encoded data indicating a 100% charge, this might be confirmed at a later stage once the battery is lower and/or if confirmed with some older batteries in the device.

Submitting the new Decoder, so it will be included in the next Theengs Gateway/OpenMQTTGateway releases.

Thanks for your help and input in getting this included.

2 Likes

Hi,

I have a number of Bluetooth connections, but my HA host doesn’t have bluetooth and even if it did its location isn’t ideal. So I’m collecting their data using GitHub - ronschaeffer/sbm2mqtt: Grab SwitchBot Meter data from Bluetooth Low Energy advertisements and publish them to an MQTT topic for use with Home Assistant, etc. to publish the sensors into mqtt.
This is working great for my current switchbot sensors (and via a different route ble_sensor_mqtt_pub for some Xiaomi sensors). Anyway I’ve just got a Switchbot Outdoor sensor (since the Xiaomi that was doing that job broke being outdoors!), so I’m planning on adding it to a fork of sbm2mqtt.
Could you point me where you’ve submitted the decoder so I can copy the logic, please?
I already did a bit of investigation and it looks like the encoding is similar to the original indoor sensors, but tagged on the end of the manufacturer data rather than service data, is that what you found?

I’ll do some additional verification (I’m pretty sure I have some old batteries I can put in, and I’m going to pop it in the freezer to check for negative temperatures!). If I note any problems I can grab the values from blescan or my logs and pop them here.

Hi @qgazq

You could also recognise, decode and publish to MQTT - and control if applicable - the SwitchBot and Xiaomi sensors together with a single ESP32 - as you do now in a more convenient location for you - with OpenMQTTGateway, which will also have the newly submitted decoder through the Theengs Decoder library.

Theengs Decoder is also where I submitted the new outdoor sensor decoder, and you are correct, it is similar to the Meter (Plus) encoding, just this time at the end of the manufacturerdata. You can see the details in the last commit there.

It would be great if you could also verify the battery status (still in the servicedata) and sub-zero temperatures.

By tomorrow the new decoder should also be available to test in our online web parser.

I can confirm the battery was shown as 100% in the switchbot app. If you want I can get new data with other batteries

Thanks for the confirmation @kaizoor!

If you do get a chance and have some older AAA batteries it would be great for the confirmation with a lower battery level and the relating data from the Theengs Gateway addon.

@kaizoor @qgazq

The new SwitchBot Outdoor Meter decoder is also ready for testing in the Theengs web JSON parser now.

Just enter the JSON as you posted above and you will see the decoded values, for further verification.

Please let us know if you find everything working fine also with sub-zero temperatures and battery levels below 100%.

Thanks

http://parser.theengs.io/

Interesting, I’m going to have a read-up now. I don’t have an ESP32 to hand, but presumably, if I publish from the PiW I’m currently using into MQTT in the correct format I could still use the Theengs Decoder (Edit: Looks like what I want is “Theeng Gateway”) It means the logic doesn’t have to be in the “gateway”.

A quick confirmation the battery level does indeed does seem to be the last byte of the service data:
Device (new): c5:65:68:81:84:32 (random), -72 dBm
Flags: <06>
Manufacturer: <6909c565688184320c0306944400>
16b Service Data: <3dfd770041>
So 0x41 = 65 and the app is showing the battery at 65%

The sensor is currently in the freezer and happily still getting a signal out so should have a negative result soon.

Scan with a temperature negative, specifically -6.5C and 35% humidity (and still 65% battery)
Device (new): c5:65:68:81:84:32 (random), -77 dBm
Flags: <06>
Manufacturer: <6909c565688184329d0f05062300>
16b Service Data: <3dfd770041>
I manually formatted it into JSON and tried it with the decoder and it worked, excellent.

My piW is currently (slowly, they aren’t that powerful)) installing TheengsGateway, so hopefully it will all just work and simplify my setup. Thanks.

1 Like

Wow I wish I’d found TheengsGateway earlier, that said I think when I did most of my initial setup last year it was new by the looks of it. But looks like the solution going forward.

For a final example (if you want to add an additional test case)

{
  "servicedatauuid": "fd3d",
  "servicedata": "770041",
  "manufacturerdata": "6909c56568818432e30f090f2a00",
  "id": "C5:65:68:81:84:32",
  "rssi": -89,
  "mfr": "Woan Technology (Shenzhen) Co., Ltd."
}

Temp -15.9C
Humidity 42%
Battery 65%

Which the online tester does decode correctly.
Now I just need to wait for a release with it in, but that’s much easier than the coding and refactoring I was going to do. :slight_smile:

Edit:
And it looks like you’ve dropped 1.4.2.
After a little argument with pip, it’s installed and seems to be working perfectly, thank you again.

2 Likes

@qgazq @kaizoor

I made a release of Theengs Decoder yesterday with the new Switchbot Outdoor Meter included, version 1.4.2

You can just update TheengsDecoder with your current Gateway (addon) install with a Python package update.

To see the current and newly available release you can

pip list --outdated

and then just

pip install --upgrade TheengsDecoder

1 Like

Has anyone been able to determine whether the new meter also provides the temperature and humidity characteristics using an Environmental Sensing Profile/Service as defined in the Bluetooth GATT specs?

I’m guessing by the outputs above, no; but perhaps those are just the unauthenticated/broadcast outputs and it also provides a bonded/paired output using the defined standards? (hopeful)

The above only really looked at and implemented the decoding of the freely braodcast advertising data, without any pairing or connecting to the device and looking at the GATT characteristics necessary.

I’m sure anyone with the device could easily interrogate the possible existence of these tough.

@david1994’s solution might also hold the answer.

1 Like

I’ve bought one to test it and I’ll update this thread

I’m sorry for the questens, when can the TheengsGateway HA Add-on decide the new Switchbot Meter? I use Home Assistant on Raspberry With Home Assistant OS and it’s not possible to use pip install on Home Assistant OS

Thank you