sbm2mqtt icon indicating copy to clipboard operation
sbm2mqtt copied to clipboard

Doesn't work with firmware 2.7

Open mochigithub opened this issue 3 years ago • 2 comments

After updating the firmware of Switchbot Meter from 2.6 to 2.7, Switchbot Meter is no longer detected by sbm2mqtt scan.

I don't know the cause, but I removed "services and services[0] == service_uuid" and it works now.

https://github.com/ronschaeffer/sbm2mqtt/blob/0fd3fa5e6656b76552fea544cf92559b208c7a1f/sbm2mqtt.py#L41

If you have time, please support firmware 2.7.

Thank you.

mochigithub avatar Feb 28 '22 14:02 mochigithub

Thanks for the heads up. I'll take a look.

ronschaeffer avatar Feb 28 '22 15:02 ronschaeffer

any update on this? I have just debugged my complete setup (it was offline for a while) only to find that this might be the issue ;)

RolandGoud avatar Aug 03 '22 12:08 RolandGoud

After updating the firmware of Switchbot Meter from 2.6 to 2.7, Switchbot Meter is no longer detected by sbm2mqtt scan.

I don't know the cause, but I removed "services and services[0] == service_uuid" and it works now.

https://github.com/ronschaeffer/sbm2mqtt/blob/0fd3fa5e6656b76552fea544cf92559b208c7a1f/sbm2mqtt.py#L41

If you have time, please support firmware 2.7.

Thank you.

How did you remove this line? I've just tried (by removing and commenting out) and the script fails to run. I get an error.

Captain0Kangaroo avatar Oct 31 '23 17:10 Captain0Kangaroo

After updating the firmware of Switchbot Meter from 2.6 to 2.7, Switchbot Meter is no longer detected by sbm2mqtt scan. I don't know the cause, but I removed "services and services[0] == service_uuid" and it works now. https://github.com/ronschaeffer/sbm2mqtt/blob/0fd3fa5e6656b76552fea544cf92559b208c7a1f/sbm2mqtt.py#L41

If you have time, please support firmware 2.7. Thank you.

How did you remove this line? I've just tried (by removing and commenting out) and the script fails to run. I get an error.

This code works: if ( service_data and len(service_data) == 8 and service_data[2] == 0x54 ): Tested with firmware 2.8. I guess this also works with 2.7 So remove line 41 like stated before, and also the "and" before service_data on line 42

kdhoe85 avatar Nov 26 '23 10:11 kdhoe85

Should be working now. Sorry for the slow reply. I'm no longer maintaining this project, because the official Home Assistant Switchbot integration now supports meters, See https://www.home-assistant.io/integrations/switchbot/ if you haven't already.

ronschaeffer avatar Jan 19 '24 09:01 ronschaeffer