The configurable counterpart to the Hoffmation-Base home automation library.
This project is used for configuring rooms and devices to be used with the base library.
- node.js >= 16 and a matching npm version Note for FreeBSD or FreeBSD-based systems users: Make sure, your system or jail is up to date, otherwise node might not work correctly
- git (not needed, but makes things like updating and following the installation steps simpler)
.. should be looked up here.
Note: For security reasons, the project should not be installed and run as root, but as separate user!
- Clone Hoffmation-Express to a local folder:
git clone https://github.com/theimo1221/Hoffmation-Express.git
- Run
npm install
in the cloned folder (by defaultHoffmation-Express
) - Follow the steps described in "Configuration" to create the configuration for your rooms and devices you want to use
Hoffmation is centered about rooms. Many follow certain default behaviour while others have very specific rules. To be modular, rooms within HoffMation should be generated automatically.
To do so,
- Use the
config/private/roomConfig.example.json
as base for the rooms and devices you want to interact with. The resulting file has to be saved toconfig/private/roomConfig.json
- Run
npm run create-rooms
to create the needed source files for your configuration.
- Make sure the devices in ioBroker are named according to the following naming scheme:
00-[HmIP or Zigbee]-[Room name]-[DeviceType]-[RoomIndex]
- Download your whole object tree from within the ioBroker -> objects page.
The resulting.json
should be placed in theconfig/private
folder, renamed todevices.json
- Place a
mainConfig.json
in theconfig/private
folder with the correct ioBroker URL. You can use the mainConfig.json.example as template and overview of which settings currently are available. Room specific settings are also listed near the end of this file.
Main behaviour settings of the library can be placed/changed in the mainConfig.json
as mentioned above.
If you want to configure the settings of a room (e.g. turning all lights on if movements are detected),
you can use
- the
..._custom.ts
file of each room.
There, just set up your room settings via code.
If these files exist, they won't get overridden if you runcreate-rooms
again. - the
roomConfig.json
file before (re)generating your rooms.
There, you can override any setting you can set in the roomDefault of your mainConfig.json for any room - just add them under the keysettings
.
The following room-specific settings can currently be set:
Name | Description | Value |
---|---|---|
rolloHeatReduction | Use shutter to reduce warming of rooms on hot days (detected by weather service) | boolean |
lampenBeiBewegung | Turn lamps of this room be turned if movements were recognized here | boolean |
lichtSonnenAufgangAus | Turn lamps off on sunrise | boolean |
sonnenUntergangRollos | Close shutters on sunset (detected by geo location) | boolean |
sonnenUntergangRolloDelay | Offset (positive/negative) in minutes for closing shutters after sunset | number |
sonnenUntergangRolloMaxTime | Close the shutters by this time at the latest (regardless of sunset time) | iTimePair |
sonnenUntergangLampenDelay | Offset in minutes for turning on lamps if movements were recognized | number |
sonnenAufgangRollos | Open shutters on sunrise (detected by geo location) | boolean |
sonnenAufgangRolloDelay | Offset (positive/negative) in minutes for opening shutters after sunrise | number |
sonnenAufgangRolloMinTime | Open the shutters by this time at the latest (regardless of sunrise time) | iTimePair |
sonnenAufgangLampenDelay | Offset in minutes for still turning on lamps if movements after sunrise were recognized | number |
movementResetTimer | Time in seconds after which detected movements are reset (and assumed to not exist anymore) | number |
lightIfNoWindows | Turn lights on during the day if no windows are configured for this room | boolean |
Each setting you can see in iRoomDefaultSettings
, you can specify in the JSON file before you create your rooms.
The same is the case for device specific settings, although there are only settings inheriting from DeviceSettings
supported.
If you want to run the software and are sure you've set the project up correctly, just run npm run start
.
This project has been tested on
- Debian 11
- FreeBSD 12.2-p10
- Windows Server 2019
It is not guaranteed this project will run on different platforms, it should however run on most Unix-based or Windows-based ones.