Hacker Newsnew | past | comments | ask | show | jobs | submit | veeableful's commentslogin

Sorry if it’s off-topic but how does it know if the bathroom window open or not? Did you build some kind of device and connect it to the home assistant?


I'm happy to answer. :)

I'm using a ready-made sensor for this. It's the same system I'm using for temperature and humidty measurement. It's proprietary [0], but someone reverse engineered it [1], so I can send the data via MQTT to home-assistent. I then wrote an automation using Node-RED. It get's triggered when the window opens. After an initial timeout of five minutes, it will compare the inside temperature and humidity with the outside temperature and humidty, and decide if it should wait another five minutes or fire off a notification. If you close the window before, it will stop everything and reset itself.

[0]: https://mobile-alerts.eu/ [1]: https://github.com/sarnau/MMMMobileAlerts


Thanks for the answer! I didn't know there are already ready-made sensors for such use-cases (though I'm not familiar with Home Assistant itself either, only heard of what it is).


You can easily integrate Zigbee devices. The Aqara or Xiaomi door/window sensors for example are cheap and pretty nice.


Thanks! I didn't know Xiaomi made such sensors too. They are definitely one of the brands that I recognize.


Officially, they only work with Mi Home cloud-crap, but there are Zigbee drivers for interfacing with it.


I use a few different devices from them with zigbee2mqtt and it’s working great. It’s perfect for combining devices from different manufacturers and not having to use their individual gateways.


One thing I immediately miss from Python after using Go is building a dict (e.g. for writing JSON values). I had to type map[string]interface{} so many times =P


What VM should I use if I’m on macOS?


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: