Saturday, May 28, 2022

Jupyter container with xgboost, tensorflow, sklearn, and torch etc

Created a docker image for running Jupyter with common ML libraries.

Idea based on De-Mystifying XGBoost. But instead of deploying to cloud, this image focus on running the container locally.

Wednesday, May 25, 2022

Aqara Motion Sensor P1

 A few notes on using the Aqara Motion Sensor P1 with zigbee2mqtt and Home Assistant.

  • Sensitivity can be set within HA. Or, publishing the set message directly to Mosquitto. e.g. (change "the_device_friendly_name", "username", and "password" accordingly. The sensitivity can be "low", "medium", or "high"):

mosquitto_pub -t 'zigbee2mqtt/the_device_friendly_name/set' -m '{"motion_sensitivity": "high"}' -u username -P password

  • Remember to press the button at the back of the sensor once after changing the setting.
  • The sensor has the optional "no_occupancy_since" field that can be set to send out after it no longer detect occupancy. It can even be set to send out at different timeout values. This comes in handy when using it to turn off different devices. It can be set via the zigbee2mqtt UI.

  • To use the payload "no_occupancy_since" in automation condition, choose the "Template" condition type and check the desired value with "trigger.payload_json.no_occupancy_since":