Automatically turns off devices when not in use.
Designed to work with taatta device logger.
In addition, you will need taata's collector
, athom-smart-plug
and athom-presence-sensor
modules running at the
minimum in order to receive smart plug and motion sensor states. See taatta documentation
for details.
- Clone the repository
- Copy your sites configuration at
config.json
in the repo root- Alternatively, pass
SITES_CONFIG
environment variable to specify the location of your sites config - A symlink of
config.json
toconfig.example.json
has been provided as a fallback
- Alternatively, pass
- Run
./gradlew build
to build
Note: The docker-compose.yml
file in this repo only launches the idle device management container. In order to
deploy the full set of containers required, use the docker-compose.yml
file on taatta
instead.
- Clone the taatta repo
git clone https://github.com/MonashSmartCityLivingLab/taatta.git
cd taatta
- Place your
config.json
atconfiguration/idle-device-management/config.json
of taatta repo. - Follow the taatta documentation deployment guide, and launch the containers (Note: the following command below is example only. Adjust it to your needs):
docker compose up --force-recreate postgresql mosquitto collector athom-smart-plug athom-presence-sensor idle-device-management device-control-interface
In order for the system to run, you'll need to supply a sites configuration which lists rooms, smart plugs and motion sensors.
In general, it is a JSON file which contains an array of sites, which contain an array of rooms, which itself contain an array of appliances and motion sensors.
For each appliance, it has a standard use times which are the typical times that the appliance is used.
An example sites configuration can be found at sites.example.json
startTime
andendTime
must be specified as 24-hour format, inHH:mm
format- If the hour or minute is 0 to 9, they need to be zero padded, i.e.
09:00
instead of9:00
- If the hour or minute is 0 to 9, they need to be zero padded, i.e.
- All attributes must be present on each item. If there are no motion sensors in a room, put an empty array (
[]
) instead - If you want to have some device controlled by motion sensors and others not controlled by one, then you need to split the room into 2
- When a standard use time spans across days, break it up on midnight, i.e.
start -> 23:59
and00:00 -> end
Licensed under Apache License 2.0.