@g3t4w4y

6 Followers
36 Following
3 Posts
And I am supposed to focus on inadequate decorum at a corporate pseudo-event? https://apnews.com/article/israel-palestinians-ai-technology-737bc17af7b03e98c29cec4e15d0f108
How US tech giants' AI is changing the face of warfare in Gaza and Lebanon

U.S. tech giants have quietly empowered Israel to track and kill many more alleged militants more quickly in Gaza and Lebanon through a sharp spike in artificial intelligence and computing services. But as the number of civilians killed has also soared, so have fears that these tools are contributing to the deaths of innocent people. The Israeli military uses AI to sift through vast troves of intelligence, intercepted communications and surveillance to find suspicious speech or behavior and learn its enemies' movements. An Associated Press investigation found after the surprise attack by Hamas militants on Oct. 7, 2023, its use of Microsoft and OpenAI technology skyrocketed.

AP News
**Bathroom dehumidifying using a floating humidity threshold**

Blog: Bathroom dehumidifying using two sensors and a floating humidity threshold.

Link to the original blog post with a nice text/pictures layout.

The problem:

The bathroom fan is running too long if it’s raining outside.

A year ago I automated the dehumidifying of the bathroom using an extraction fan, Sonoff mini switch, Xiaomi Mi BLE thermometer/humidity sensor and HomeAssistant.

It works great, except in humid and rainy weather. In such cases, the fan runs too long, because it can not reach the manually set humidity threshold.

The solution:

A moving humidity threshold using a second humidity sensor.

HW parts:

SW:

The process:

1. I resolved how to connect Sonoff ZBMINI to the fan. The fan has 4 connectors: 1. ground, 2. neutral, 3. Phase 1 (power), 4. Phase 2 (a signal to turn it on). Until I connected the Sonoff switch, I used a physical switch to turn the fan on.

I connected the Sonoff switch in parallel to the physical switch. This way I can still use the physical switch to turn the fan on (in case Home Assistant is not working).

The schematics/doodles:

The fan enclosure (without Sonoff):

The Sonoff switch is so small it nicely fits the fan enclosure:

3. I connected Sonoff to my Zigbee network. I had some issues with the range because the bathroom is 10m away from the Zigbee router. Then I added some zigbee smart plugs (routers) nearby to strengthen the mesh.

4. Then I set up Xiaomi Mi BLE sensors (one in the bathroom, one in the hallway) and ESP32 BLE proxy. Will skip the steps here, maybe this will be another blog post. Nevertheless, any humidity sensor connected to Home Assistant would work.

Home Assistant

5. I’ve set up a generic hygrostat entity:

 The code for it (it should be defined manually in configuration.yaml):

generic_hygrostat: - name: Kopalnica unique_id: kopalnica_dehumidifier01 humidifier: switch.kopalnica_stikalo_vent target_sensor: sensor.atc_kopalnica1_humidity min_humidity: 30 max_humidity: 80 target_humidity: 65 dry_tolerance: 2 wet_tolerance: 2 device_class: "dehumidifier" min_cycle_duration: seconds: 5 keep_alive: minutes: 3 initial_state: true away_humidity: 65 away_fixed: True sensor_stale_duration: 00:15:00

6. I’ve added the automation for setting a floating humidity threshold:

The automation works like this: It has 2 triggers. The 1st trigger fires if the state of the humidity sensor located in the hallway changes. The 2nd trigger (which is probably not needed) fires every 30 minutes (just to be sure).

Then the target humidity in generic hygrostat (HA) is set to: hallway humidity + 8%.

Why 8% difference? Don’t know, I set it using trial-and-error and it works ok.

The code for target humidity needs to be added manually to the automation yaml:

"{{ float(states('sensor.atc_hodnik1_humidity')) + float(8) }}"

Traces

Here’s the example of automation in action. The left trigger (humidity sensor state change) fired:

The result:

The result: a comparison of the fixed vs. floating humidity threshold can be observed on the chart below.

If the generic hygrostat entity in HA is set to a fixed value (e. g. 60%), the fan runs unnecessarily long and it can’t reach the target humidity, see red (1) on the chart below.

If the target humidity adjusts according to the general humidity in the house, it runs less time (2).

The chart below shows the switch from the fixed humidity threshold to floating threshold (21 May around 18:00). See the blue horizontal line (threshold) and purple line (current bathroom humidity). Light blue vertical bars represent when the fan is running:

Conclusions/Key takeaways

  • it took me more than a year to fix this annoying issue of the fan running at night,
  • at the end it was easier to set up the automation than I thought.

Disclaimer

The links to the products are not affiliate links and I don’t receive any compensation for linking.

The code and the ideas are mostly from HomeAssistant and ESPHome community forums.

Hashtags: #esphome #esp32 #homeassistant #diy #humidity #bathroom

https://blog.rozman.info/bathroom-dehumidifying-using-a-moving-humidity-threshold/ #bathroom #humidity