NixOS Home Automation | 506 Members | |
| Declarative Home Automation and other Sidequests | https://wiki.nixos.org/wiki/Home_Assistant | 132 Servers |
| Sender | Message | Time |
|---|---|---|
| 19 Jun 2021 | ||
| But it's getting slightly off track here - we're far from doing anything frontend, I think. And the frontend is something that'll be probably relatively easy to swap out | 14:16:26 | |
| Thanks for the link, I'll read that :) Agreed, we are a long way off frontend, and I actually want a goal to be that the frontend is optional, and new frontends are easy to build. As long as we follow a sensible architecture for our API (whether REST or something else) then we might just get this for free :) | 14:19:39 | |
| Yes, "API first" sounds good to me 😀 | 14:20:56 | |
In reply to @instantepiphany:matrix.orgI would kind of love this to be Haskell, but core in Rust sounds reasonable. And if you use something like wasm+wasmer for "plugins", they could be built in almost any language! | 14:58:52 | |
| 17:25:52 | ||
| 17:25:59 | ||
| instantepiphany: If you want to move the discussion to a new matrix room, feel free to invite me 🙂 (Although it's likely that it will fit into this channel for some time, given that it does not seem that high traffic) | 18:13:32 | |
| yes, the traffic sounds ok, we are probably all interested parties | 18:52:25 | |
| 20 Jun 2021 | ||
| Hmm, I like the ideas here, just want to pitch in another name idea: homeix :) I'm also very interested in zwave (both lights and temperature sensor), a bit less in zigbee (I have a Hue strip but don't use the gateway), then xiaomi (robot vacuum), kodi and chromecast things | 02:51:59 | |
| I'll create a github repository soon where we can add issues as requests for support for various targets. Just to set expectations, I expect the MVP to take 2-4 weeks, and the soonest we will have a plug and play solution for just one target is likely to be 2 months. This is my only side project but I'm working full time and starting a new job in a couple weeks. | 02:55:29 | |
| My rust knowledge is limited to going through the learning rust book one and a half year ago and not touching it since. But I liked what I did back then and wouldn't mind learning more by actually doing some rust. Currently I'm a bit consumed by family though. I have a 3 weeks old human next to me :) | 02:59:57 | |
| Well, if I do a good job architecting the service and plugin architecture, you would have some examples in rust and maybe other languages to work from - in a couple months. I can't speak to the time requirements of the young human though - an essential and time consuming task on their own ❤️ | 03:03:06 | |
In reply to @instantepiphany:matrix.orgpalo also build a smarter mqtt light control with rust: https://git.ingolf-wagner.de/palo/light-control as he was not happy with home-assistant state machine | 06:09:15 | |
| RE language choices | 09:17:29 | |
| Both Rust and Haskell are great languages and have a powerful type system. Haskell is rather performant as well, though I don't think an application like this will be really performance critical. I don't know the Haskell ecosystem w.r.t. bindings and integrations libraries, but I suppose the Rust community is larger at the moment. | 09:19:35 | |
| Either way, we also need to talk about scripting. The project will need a scripting language, whatever it may be. There are a few custom languages for this purpose, but there is also Python that works great together with Rust. I have no idea how scripting looks like in the Haskell ecosystem (I think Haskell can be interpreted too?) | 09:23:18 | |
| 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 | |