e13e8c598f
Quickly hacked in is_on function on devices in lua
...
Build and deploy automation_rs / Build automation_rs (push) Successful in 4m45s
Build and deploy automation_rs / Build Docker image (push) Successful in 50s
Build and deploy automation_rs / Deploy Docker container (push) Has been skipped
In order to get feature parity with pre-lua the is_on function is
manually implemented on all wrapped devices in lua
This implementation will need to be improved in the future.
2024-05-07 00:02:11 +02:00
8a0805156d
Fix: Scheduled function can not run async functions
...
Build and deploy automation_rs / Build automation_rs (push) Successful in 7m20s
Build and deploy automation_rs / Build Docker image (push) Successful in 1m0s
Build and deploy automation_rs / Deploy Docker container (push) Has been skipped
Since Lua is not Send, this turned out to be a bit more complicated.
In order to make it work the async function needs to be pinned to a
single thread.
It works now, but the implementation looks a bit messy. Not sure it can
be improved through.
2024-05-06 23:43:59 +02:00
808549bcba
Added lua function to get the current hostname
...
Build and deploy automation_rs / Build automation_rs (push) Successful in 4m30s
Build and deploy automation_rs / Build Docker image (push) Successful in 39s
Build and deploy automation_rs / Deploy Docker container (push) Has been skipped
This makes it possible to set options depending on what machine we are
running
2024-05-05 02:05:04 +02:00
7e152599a1
Fixed typo in README.md and added mosquitto as word
2024-05-05 02:05:04 +02:00
8bc529cc1a
Started work on reimplementing schedules
2024-05-05 02:05:04 +02:00
aafdfcba1f
Fixed spelling mistakes
2024-05-05 02:05:03 +02:00
3dbc14ccac
Moved last config items to lua + small cleanup
2024-05-05 02:05:03 +02:00
55025a67fc
Fixed visibility of device configs
2024-05-05 02:05:03 +02:00
742e3bd62a
LuaDevice macro now uses LuaDeviceCreate trait to create devices from configs
2024-05-05 02:05:02 +02:00
430355bb40
mqtt client is now created in lua
2024-05-05 02:05:02 +02:00
870da3eea9
DeviceManager no longer handles subscribing and filtering topics, each device has to do this themselves now
2024-05-05 02:05:01 +02:00
c4978ab9ca
Improved how devices are created, ntfy and presence are now treated like any other device
2024-05-05 02:04:45 +02:00
e43bd4ea2a
Moved schedule config from yml to lua
2024-05-05 02:02:37 +02:00
68b9676616
Set lua warning function
2024-05-05 02:02:37 +02:00
8377e1d696
Slight macro cleanup
2024-05-05 02:02:36 +02:00
c6b9005d1e
Improved the internals of the LuaDeviceConfig macro and improve the
...
usability of the macro
2024-05-05 02:02:36 +02:00
4273a25acd
Use helper types to process config input into the right type
2024-05-05 02:02:36 +02:00
92b7a2830a
Added helper type to convert from ip addr to socketaddr with the correct port
2024-05-05 02:02:36 +02:00
dec08fe0a2
Added rename option to macro
2024-05-05 02:02:35 +02:00
f115e0e6e8
Everything needed to construct a new device is passed in through lua
2024-05-05 02:02:35 +02:00
e79787561d
Device config is now done through lua
2024-05-05 02:02:35 +02:00
668f13863a
Replaced impl_cast with a new and improved trait
...
With this trait the impl_cast macros are no longer needed, simplifying
everything.
This commit also improved how the actual casting itself is handled.
2024-05-05 02:01:13 +02:00