Wow never thought about looking into having someone 3d print as a service. Thanks for the pointer!
Thanks!
Is 20 enough for the Infill or should 30 to 40 be used instead?
I’m thinking of the Boot/En buttons.
How long should it take for the esp32 to detect the SmartDry? I’ve left it on scanning for several hours, while shaking the SmartDry periodically, and all of the devices say “unknown”. The SmartDry is transmitting because it’s showing up in Theengs when I shake it.
EDIT: literally as soon as I posted this, it showed up. So, another question would be how do I help the esp32 see the SmartDry and populate those states without waiting several hours?
EDIT2: it seems very delayed in reporting, even when I’m shaking the SmartDry right next to the esp32, whereas the setup with Theengs is almost instantaneous. Is there any way to improve that delay on the esp32 setup?
EDIT3: Ya, it seems stuck now… not sure what I’m doing wrong These are logs from me manually shaking the SmartDry, nothing changes.
[18:33:33][D][text_sensor:067]: 'SmartDry Raw': Sending state 'b3bea5418074594200005607'
[18:33:36][D][sensor:127]: 'SmartDry Humidity': Sending state 54.36377 % with 4 decimals of accuracy
[18:34:07][D][sensor:127]: 'SmartDry Shake': Sending state 0.00000 with 1 decimals of accuracy
[18:34:09][D][sensor:127]: 'SmartDry Battery': Sending state 86.00000 with 1 decimals of accuracy
[18:34:11][D][sensor:127]: 'SmartDry Temperature': Sending state 20.71811 °C with 4 decimals of accuracy
[18:34:31][D][sensor:127]: 'SmartDry Awake': Sending state 7.00000 with 1 decimals of accuracy
[18:34:33][D][text_sensor:067]: 'SmartDry Raw': Sending state 'b3bea5418074594200005607'
[18:34:36][D][sensor:127]: 'SmartDry Humidity': Sending state 54.36377 % with 4 decimals of accuracy
[18:35:07][D][sensor:127]: 'SmartDry Shake': Sending state 0.00000 with 1 decimals of accuracy
[18:35:09][D][sensor:127]: 'SmartDry Battery': Sending state 86.00000 with 1 decimals of accuracy
[18:35:11][D][sensor:127]: 'SmartDry Temperature': Sending state 20.71811 °C with 4 decimals of accuracy
[18:35:31][D][sensor:127]: 'SmartDry Awake': Sending state 7.00000 with 1 decimals of accuracy
[18:35:33][D][text_sensor:067]: 'SmartDry Raw': Sending state 'b3bea5418074594200005607'
[18:35:36][D][sensor:127]: 'SmartDry Humidity': Sending state 54.36377 % with 4 decimals of accuracy
[18:36:07][D][sensor:127]: 'SmartDry Shake': Sending state 0.00000 with 1 decimals of accuracy
[18:36:09][D][sensor:127]: 'SmartDry Battery': Sending state 86.00000 with 1 decimals of accuracy
[18:36:11][D][sensor:127]: 'SmartDry Temperature': Sending state 20.71811 °C with 4 decimals of accuracy
[18:36:31][D][sensor:127]: 'SmartDry Awake': Sending state 7.00000 with 1 decimals of accuracy
[18:36:33][D][text_sensor:067]: 'SmartDry Raw': Sending state 'b3bea5418074594200005607'
The SmartDry is sending data, but the values aren’t changing in this setup, but they are in Theengs. Theengs isn’t a solution to me because it can’t pick up the BLE while it’s in the dryer, I’ve just been testing by shaking it near my hub. Also, it is showing up and sending raw data to my BLE Android app, the esp32 just isn’t seeing it for some time, but it is seeing my Smart Tags and other BLE devices. When it does finally find it, it doesn’t seem like it updates values.
Appreciate the work you’ve all done on this! I got a ESP32 setup and this is working better than expected.
Wish I could do the same with my U-Bolt Pro Z-Wave since the items they share over Z-Wave is lackluster, see the post regarding this here: U-Bolt Pro Z-Wave best lock so far but still a failure
Could this be modified to use active connections / bluetooth proxies with the new esphome release?
What I mean by that is a way to have it check the SmartDry more often? With the SmartDry connected through Theengs/Bluetooth it updates almost instantaneously but it’s out of range of Bluetooth for me. Using the setup above, if sometimes takes hours to update the shake count variable, which would defeat the purpose of using it as a dryer_running sensor. I have tried two different esp32 boards.
Here is what I’m seeing and referring to:
SmartDry Shake, SmartDry Awake, and SmartDry Motion are devices through the esp32. SmartDryTheMoving and SDLS-shake_count are setup using a long range bluetooth adapter and TheengsGateway. You can see with the bottom that it is very quick and accurate, you can see where I started the dryer and stopped it; however, the esp32 devices never registered when the shake was 0. The esp32 is probably 6 inches away from the dryer body and roughly 18 inches away from the moving SmartDry.
I still do not know what I was doing wrong with the above esphome setup and Passive BLE Monitor, but I was able to solve it using OpenMQTTGateway (https://docs.openmqttgateway.com/) and it provides quick updates for the SmartDry using an esp32 board via an MQTT broker. You can flash an esp32 via the web, I chose esp32dev-ble-cont. Interestingly, this option made my blue LED on my esp32 light up for the first time, something that I hadn’t seen before. Anyway, this solution was mentioned by @1technophile and seems to be the best solution for me.
TheengsGateway also worked flawlessly but I was worried about bluetooth adapter range, but this is using my esp32 right next to my dryer.
So for anybody reading this, if you want to use an esp32 (and the above method with esphome isn’t working) you can try OpenMQTTGateway and if you want to try it without an esp32 you can try it with a Bluetooth adapter (or on board) with TheengsGateway. With these methods your SmartDry will be under MQTT.
Now to get a 3d printed case and call it a project. Thanks to everyone else that has helped along the way with this.
EDIT: the issue with esphome might be scan parameters, such as the SmartDry and esp32 being out of sync and the esp32 missing the packets during times of not scanning and then the SmartDry not sending packets when it is scanning. If you want to play with this you can see documentation here. Continuous scanning might help, for example.
Interesting. I ran laundry today and it would appear the data from the ESP32 doesn’t update or change often enough to do anything with it in HA.
I have another board I am going to flash using the method described above with OpenMQTTGateway.
I’ll report back on it soon.
I had these same issues. Using the Bluetooth proxy or esphome from home assistant, it would take forever to update (so long that my smartdry was useless).
When I flashed with openmqttgateway, I saw two things:
-
The blue led on my esp32 lit up. That had never happened before.
-
I got updates via mqtt instantly got smartdry.
Also having trouble with not getting frequent enough readings using the method described earlier in this thread.
I saw this post and figured since I had the same issues as you, maybe MQTT would be worth a shot for me as well. I’m new to it, though. What did you use as a broker? I’m stuck there (every single thing I try to do probably takes me 10 times longer than it should!!).
Thanks.
It looks like interval is 320ms, window is 30ms, and duration is 5min.
More reference regarding:
window must be less than interval
duration is 3 * interval
That said, I’m not sure how that’s added to the esp32_ble_tracker code above.
I flashed esp32dev-ble, not esp32dev-ble-cont. I will try again with esp32dev-ble-cont and see if the behavior is better.
Also with OMG, there’s a blue LED lit. It flashes at times, I presume to indicate traffic.
I was assuming with default scan parameters that the SmartDry and the esp32 weren’t in sync, but that the scan parameters could be tweaked so that the esp32 wasn’t missing packets, or maybe just turn continuous scanning on. I haven’t gone back and played with it, OMG works well enough but if I ever need a Bluetooth proxy on the same board I might go back and try continuous scan on the esphome setup.
Since I couldn’t find that SmartDry sensor anywhere, I simply bought a $18 CAD temperature sensor (as part of my already integrated Weather Station Ecowitt ecosystem), here and stuck the probe right in the dryer vent at the back of the dryer.
Now, I’m able to measure the vent temperature and create an automation based on this temperature.
I had to use the trend sensor to create two sensors for temperature falling and temperature increasing, so that it starts the timer immediately as opposed to temperature thresholds (i.e. above and below).
It works well, now.
Ok so for those using the MQTT setup…how did you set up your automation? Just curious which sensor and value is best for determining the dryer cycle has finished.
Shake > 10 = dryer running. Shake < 10 = dryer stopped. You can also add time checks, like Shake > 10 for one minute etc. The dryness calculation is above as well, if you want to go that route. Both methods use the same sensors and same checks, it’s just how the data is getting to HA.
SmartDry is just a BLE sensor with temperature, humidity, and acceleration capabilities with a magnet (and I assume some moisture shielding) to stay on the dryer bin. Any sensor that can have those senses you could theoretically glue a magnet to and put in your dryer, then get an esp32 to relay the information.
You’re right, if I didn’t have my Ecowitt sensor ecosystem, I’d be going that route.
BUT since you are monitoring humidity, my dryer has the built-in sensors to determine if its dry or not (as most modern dryers do), so, I’m relying on the dryer to tell me if its dry or not, and this automation to tell me that its done.
Just curious in terms of humidity, what is considered dry? less than 10% rH?
I use Mosquitto on Home Assistant Add-on store. See this video: Home Assistant MQTT Install and Setup - A Beginner's Guide - YouTube
Okay so I’ve flashed a EPS32 with esp32dev-ble-cont from OpenMQTTGateway and I’ve got the data in my MQTT Broker.
{"id":"1A:05:00:00:0A:29","mac_type":0,"name":"KMGM2Z","rssi":-62,"brand":"SmartDry","model":"Laundry Sensor","model_id":"SDLS","tempc":37.34202,"tempf":99.21563,"hum":19.93231,"shake":false,"shake_count":84,"volt":2.992,"wake":true}
How did you get this info into HA?
Edit: I think I got it figured out, in case anyone else needs it, see below
Plugged in my ESP32
Went to (Option 1) Upload from the web | OpenMQTTGateway v1.0.0
Selected esp32dev-ble-cont
Then hit Install
Waited for the device to come up
Connected to the OpenMQTTGateway wifi on my phone
Configured the wireless and MQTT settings for the device
See: Wifi and MQTT configuration | OpenMQTTGateway v1.0.0
The device rebooted and started updating on my Broker
Please note, I named the device SmartDry and changed the base topic to OpenMQTT
I started the dryer to have the SmartDry update
Grabbed the MAC for the Smartdry (ID value)
Posted this topic: OpenMQTT/SmartDry/commands/MQTTtoBT/config
This JSON with Retain & QoS 1: {“white-list”:[“1A:05:00:00:0A:29”]}
(In the above put your SmartDry ID/MAC)
Posted this topic: OpenMQTT/SmartDry/commands/MQTTtoSYS/config
With this JSON: {“discovery”:true}
Went to Home Assistant MQTT Integration > Configure > Re-Configure MQTT > Next > make sure “Enable discovery” is on
Then the devices showed up as entities like “SDLS-hum” “SDLS-wake”
Thanks, those steps should be optional. If you don’t add the SmartDry in your white-list the difference will be that OMG will pick up all your BLE devices that can be decoded, the Home Assistant discovery is activated by default.
If I sum up, you should be good with:
- Plugged in my ESP32
- Went to (Option 1) Upload from the web | OpenMQTTGateway v1.0.0
- Selected
esp32dev-ble-cont
- Check Erase flash
- Then hit Install
- Waited for the device to come up
- Connected to the OpenMQTTGateway wifi on my phone
- Configured the wireless and MQTT settings for the device
- See: Wifi and MQTT configuration | OpenMQTTGateway v1.0.0
- The device rebooted and started updating on my Broker
- I started the dryer to have the SmartDry update
- Went to Home Assistant MQTT Integration > Configure > Re-Configure MQTT > Next > make sure “Enable discovery” is on
- Then the device should show up in the “Settings->Devices” and as entities like “SDLS-hum” “SDLS-wake”
Was naming the device in the wifi section for OMG as the gateway name: Wifi and MQTT configuration | OpenMQTTGateway v1.7.0?
The gateway_name
entered into the wifi configuration portal will be the name of the gateway below the topic home into the MQTT broker:
You can put whatever you want, only requirement is that it should be different per esp32
Changing it is not compulsory for your setup to work.