NixOS Home Automation | 519 Members | |
| Declarative Home Automation and other Sidequests | https://wiki.nixos.org/wiki/Home_Assistant | 131 Servers |
| Sender | Message | Time |
|---|---|---|
| 20 Jun 2021 | ||
| If you go for Rust, please don't let it be your first serious project. The odds of things getting painful are rather high on that path. | 09:26:01 | |
In reply to @piegames:matrix.orgI'm not disagreeing, just curious - what use case is there for an interpreted language? | 09:28:22 | |
| Probably for high flexibility of the automations. While I prefer a DSL or something structural, the system that HA uses is rather weak and often requires workarounds like template sensors | 09:29:51 | |
In reply to @piegames:matrix.orgNot my first project in Rust. I've written a couple small games and used it professionally, however I'm wanting to push my knowledge and get some more experience with (potentially) more complicated architectures. I'm definitely not an expert, though I have already encountered the common borrow checker errors and have an understanding of passing clones, or references, etc. | 09:30:07 | |
In reply to @schnecfk:ruhr-uni-bochum.deI'm not sure why this is something that needs to be decided in this project though - should we be opinionated on that? Or choose a protocol so that any language/executable can be used as long as it follows the interface? | 09:32:13 | |
In reply to @instantepiphany:matrix.org So a few use cases that you may want to consider that would make good use of a scripting language:
| 09:40:14 | |
In reply to @piegames:matrix.org I think the first might be covered by allowing any executable to be called as long as it follows the API. This could be bash, or python, or whatever. Definitely agree for third. However for plugins, I was thinking we could do that through the config - e.g the config supplied by the user would specify what protocol should be used to communicate with the target, and set various rules for the automation. I would like to keep as much logic in the config as possible. | 09:44:41 | |
| So to create automation behaviour, the user would modify the config, via text at first, maybe a GUI much further down the road. | 09:45:49 | |
| Will the configuration format be a turing complete DSL? Or will it be a simple structured format with inline code blocks in different languages? | 10:11:33 | |
I'm not really sure, but if we go with inline code blocks that might make it difficult to have GUI plugins later - they would have to be able to infer meaning from n supported languages... Though I suppose the code could just be to get or set a state, then we might be able to do that. | 10:28:42 | |
| What other components do they plan to make stateful? | 11:17:08 | |
| In home-assistant? | 11:17:16 | |
In reply to @joerg:bethselamin.deAfaik they want to migrate always from the YAMl configuration completely, making the while configuration of all integrations stateful | 11:20:09 | |
In reply to @schnecfk:ruhr-uni-bochum.deDo you have a source for that? This reads different: https://www.home-assistant.io/blog/2020/04/14/the-future-of-yaml/ | 11:21:37 | |
In reply to @joerg:bethselamin.deThe section about ADR0010 explains that in the long term, YAML will fade out, as new integrations won't be allowed to use of YAML (except in rare cases) | 11:45:03 | |
In reply to @schnecfk:ruhr-uni-bochum.deMhm. I am probably ok with having only my automations in yaml for now. Maintaining a project like home-assistant seems otherwise like a huge effor. | 11:46:26 | |
| At least for some integrations, although the line between "communicates with a service" and "bridges a protocok" seems fairly thin to me | 11:46:57 | |
| Well maybe depends on the integration | 11:47:00 | |
| Mic92: https://github.com/home-assistant/core/pull/37800#issuecomment-657707769 | 11:47:58 | |
| I mean, even esphome does not support yaml anymore | 11:48:04 | |
| huh, what? | 11:48:28 | |
| oh, you mean on the home-assistant side | 11:48:35 | |
| but esphome works great with zeroconf | 11:48:46 | |
In reply to @hexa:lossy.networkhttps://www.home-assistant.io/integrations/esphome/ that one, yes | 11:49:02 | |
| also they're talking about doing this because then they have control over config migration | 11:49:58 | |
In reply to @hexa:lossy.networkWhich did not work very well in the past. I remember I had to delete my icloud storage multiple times in the past. | 11:53:11 | |
| yeah, well. shit happens. | 11:55:35 | |
| but the general arguments they're giving have merit | 11:55:46 | |
| because we are not really the intended target audience | 11:56:39 | |
| I mean, we're using hass inspite of these things | 11:57:06 | |