Commit Graph

187 Commits

Author SHA1 Message Date
Dreaded_X d1e7988117 feat: Receive devices through config return 2025-10-19 03:40:15 +02:00
Dreaded_X 7bb5e65c1c feat: Generate definitions for config 2025-10-19 03:40:15 +02:00
Dreaded_X a0ed373971 refactor: Move definition writing into separate function
Build and deploy / Deploy container (push) Blocked by required conditions
Build and deploy / build (push) Has been cancelled
2025-10-17 03:12:40 +02:00
Dreaded_X 5e13dff2b5 chore: Move main.rs to bin/automation.rs 2025-10-17 03:08:37 +02:00
Dreaded_X ba818c6b60 refactor(config)!: Setup for expanding lua config return
Moves the application config out of automation_lib and sets up the
config return type for further expansion.
2025-10-17 03:08:21 +02:00
Dreaded_X 6fc3783d7a feat: Added lua definition files
Also added a pre-commit hook to ensure that the definitions files are
up-to-date.
2025-10-15 04:23:12 +02:00
Dreaded_X df64804b00 feat: Add bin to automatically generate lua definitions 2025-10-15 04:01:15 +02:00
Dreaded_X be1602d0e2 feat(config)!: Move mqtt module to actual separate module
The automation:mqtt module now gets loaded in a similar way as the
automation:devices and automation:utils modules.
This leads to a breaking change where instantiating a new mqtt client
the device manager needs to be explicitly passed in.
2025-10-15 03:53:55 +02:00
Dreaded_X 518abd169d chore: Removed dotenvy
Since secrets can now be set from automation.toml the .env file was no
longer used, so dotenvy can be removed.
2025-10-15 03:44:17 +02:00
Dreaded_X 8982e9c165 feat(config)!: Put automation modules in namespace
Build and deploy / build (push) Successful in 13m33s
Build and deploy / Deploy container (push) Successful in 39s
All lua modules that originate from automation_rs are now prefixed with
`automation:`.
2025-09-11 04:12:15 +02:00
Dreaded_X 5271e5ad81 refactor(config)!: Moved Timeout into utils module and moved module
Build and deploy / build (push) Successful in 10m43s
Build and deploy / Deploy container (push) Successful in 39s
The module is now setup in automation_lib::lua::utils.
2025-09-10 02:11:11 +02:00
Dreaded_X 1d28b43264 refactor: Move module load code into separate function 2025-09-10 02:11:11 +02:00
Dreaded_X 84e4b30b6a feat!: Improve lua module registration
Instead of having to call all the module registration functions in one
place it is possible for each module to register itself in a global registry.
During startup all the all the modules will be registered
automatically.

This does currently have one weakness, to need to ensure that the crate
is linked.
2025-09-10 02:10:45 +02:00
Dreaded_X e2fb680cd6 feat: Log version string during startup 2025-09-08 04:02:40 +02:00
Dreaded_X 8bb17e1440 feat(config)!: Reworked how configuration is loaded
The environment variable `AUTOMATION_CONFIG` has been renamed to
`AUTOMATION__ENTRYPOINT` and can now also be set in `automation.toml` by
specifying:
```
automation = "<path>"
```

Directly accessing the environment variables in lua in no longer
possible. To pass in configuration or secrets you can now instead make
use of the `variables` and `secrets` modules.

To set values in these modules you can either specify them in
`automation.toml`:
```
[variables]
<name> = <value>

[secrets]
<name> = <value>
```
Note that these values will get converted to a string.

You can also specify the environment variables
`AUTOMATION__VARIABLES__<name>` and `AUTOMATION__SECRETS__<name>` to
set variables and secrets respectively. By adding the suffix `__FILE` to
the environment variable name the contents of a file can be loaded into
the variable or secret.

Note that variables and secrets are identical in functionality and the
name difference exists purely to make it clear that secret values are
meant to be kept secret.
2025-09-05 04:48:00 +02:00
Dreaded_X ba37de3939 feat(config)!: Move new_mqtt_client out of global automation table into separate module
The function `new_mqtt_client` was the last remaining entry in the
global `automation` table. The function was renamed to `new` and placed
in the new `mqtt` module. As `automation` is now empty, it has been
removed.
2025-09-05 03:55:04 +02:00
Dreaded_X 22fee0ed77 feat(config)!: Move device_manager out of global automation table into separate module
Moved `automation.device_manager` into a separate module called
`device_manager`
2025-09-05 03:55:03 +02:00
Dreaded_X 5aebab28ed feat(config)!: Move util out of global automation table into separate module
Move `automation.util` into a separate module called `utils`.
2025-09-05 03:55:03 +02:00
Dreaded_X e626caad8a feat(config)!: Fulfillment config is now returned at the end of the config
Previously the fulfillment config was set by setting
`automation.fulfillment`, this will no longer work in the future when
the global automation gets split into modules.
2025-09-05 03:55:03 +02:00
Dreaded_X 77d7881a57 chore: Update/upgrade dependencies
There was a potential vulnerability in tracing-subscriber, so I took
this as an opportunity to update/upgrade all dependencies
2025-09-04 04:28:02 +02:00
Dreaded_X e21ea0f34e Implement custom lua print function that calls info
Build and deploy / build (push) Successful in 11m54s
Build and deploy / Deploy container (push) Successful in 45s
2025-09-01 02:47:47 +02:00
Dreaded_X c362952f7c Feature: Get current ms since unix epoch in lua 2025-08-31 05:41:49 +02:00
Dreaded_X eb36d41f17 Move ntfy and presence to automation_devices 2025-08-31 04:57:31 +02:00
Dreaded_X c5262dcf35 Update to rust 1.89 and edition 2024 2025-08-31 00:38:58 +02:00
Dreaded_X e8d5698835 Updated dependencies 2024-12-08 00:53:31 +01:00
Dreaded_X 8877b24e84 Reorganized project 2024-12-08 00:15:03 +01:00
Dreaded_X 42f391cde6 Removed duplicate OnMqtt entry 2024-12-07 22:33:52 +01:00
Dreaded_X e9f080ef19 Moved and improved hallways logic with lua
Build and deploy / Build application (push) Successful in 4m7s
Build and deploy / Build container (push) Successful in 1m18s
Build and deploy / Deploy container (push) Successful in 21s
2024-12-06 01:27:35 +01:00
Dreaded_X 9d4b52b511 Implemented new timeout mechanism for ikea_outlet
Build and deploy / Build application (push) Successful in 5m24s
Build and deploy / Build container (push) Successful in 1m8s
Build and deploy / Deploy container (push) Successful in 19s
2024-12-04 03:03:53 +01:00
Dreaded_X 03f1790627 Removed spammy debug message 2024-12-04 01:34:46 +01:00
Dreaded_X d39432fa22 ActionCallback can now handle tuples 2024-12-04 01:29:28 +01:00
Dreaded_X 6b8d0b7d56 Added hue wall switches
Build and deploy / Build application (push) Successful in 4m9s
Build and deploy / Build container (push) Successful in 53s
Build and deploy / Deploy container (push) Successful in 32s
2024-11-30 22:17:16 +01:00
Dreaded_X 4bb49a381b Use IkeaRemote to control devices and completely replace AudioSetup
Build and deploy / Build application (push) Successful in 3m24s
Build and deploy / Build container (push) Successful in 43s
Build and deploy / Deploy container (push) Successful in 18s
2024-11-30 06:06:30 +01:00
Dreaded_X a353ba3d08 Added IkeaRemote 2024-11-30 05:45:03 +01:00
Dreaded_X 157bbf923f Added generic action callback 2024-11-30 05:44:23 +01:00
Dreaded_X 9719c46136 Added deref to impl_device to account for changes in mlua 0.10
Build and deploy / Build application (push) Successful in 3m26s
Build and deploy / Build container (push) Successful in 52s
Build and deploy / Deploy container (push) Successful in 32s
2024-11-30 05:31:38 +01:00
Dreaded_X 8b04435537 No more global LUA
Build and deploy / Build application (push) Successful in 3m45s
Build and deploy / Build container (push) Successful in 54s
Build and deploy / Deploy container (push) Successful in 29s
2024-11-30 05:10:40 +01:00
Dreaded_X ae2c27551f Initial upgrade to mlua 0.10
Build and deploy / Build application (push) Successful in 7m59s
Build and deploy / Build container (push) Successful in 2m54s
Build and deploy / Deploy container (push) Successful in 19s
2024-11-30 04:47:52 +01:00
Dreaded_X d11e79cdfa Devices now keep type in lua
Build and deploy / Build application (push) Successful in 4m5s
Build and deploy / Build container (push) Successful in 1m9s
Build and deploy / Deploy container (push) Successful in 37s
2024-08-08 01:36:11 +02:00
Dreaded_X 23e78fe5a7 Small cleanup
Build and deploy / Build application (push) Successful in 4m43s
Check / Run checks (push) Successful in 2m24s
Build and deploy / Build container (push) Successful in 58s
Build and deploy / Deploy container (push) Has been skipped
2024-07-30 00:06:49 +02:00
Dreaded_X 14e14ca479 No need for Arc<RwLock<_>> inside the device wrapper anymore
Build and deploy / Build application (push) Successful in 4m27s
Check / Run checks (push) Successful in 2m14s
Build and deploy / Build container (push) Successful in 55s
Build and deploy / Deploy container (push) Has been skipped
2024-07-26 01:17:12 +02:00
Dreaded_X 3fd8dddeb2 No more cast_mut() 2024-07-26 00:37:53 +02:00
Dreaded_X 6c797820dc Updated to newest rust nightly 2024-07-26 00:25:49 +02:00
Dreaded_X 2cf4e40ad5 Devices are now clonable 2024-07-26 00:25:30 +02:00
Dreaded_X 98ab265fed Improved Lua macro situation
Build and deploy / Build application (push) Successful in 6m20s
Check / Run checks (push) Successful in 2m19s
Build and deploy / Build container (push) Successful in 1m16s
Build and deploy / Deploy container (push) Has been skipped
2024-07-25 00:49:10 +02:00
Dreaded_X 006320be18 Added trash light automation
Build and deploy / Build application (push) Successful in 3m49s
Check / Run checks (push) Successful in 2m16s
Build and deploy / Build container (push) Successful in 49s
Build and deploy / Deploy container (push) Successful in 32s
2024-07-15 00:37:24 +02:00
Dreaded_X 3b8f15eb88 Fixed activating scene
Build and deploy / Build application (push) Successful in 3m51s
Check / Run checks (push) Successful in 2m37s
Build and deploy / Build container (push) Successful in 1m8s
Build and deploy / Deploy container (push) Successful in 36s
2024-07-10 02:02:43 +02:00
Dreaded_X f7b709a2c7 Added temperature to air_filter
Build and deploy / Build application (push) Successful in 3m49s
Check / Run checks (push) Successful in 2m11s
Build and deploy / Build container (push) Successful in 56s
Build and deploy / Deploy container (push) Successful in 37s
2024-07-09 02:37:33 +02:00
Dreaded_X bab85a092e SpeedValues -> SpeedValue 2024-07-09 02:36:39 +02:00
Dreaded_X 758500a071 Cleanup 2024-07-09 00:00:00 +02:00