!QhvgabMQzwEQeWehhZ:lossy.network

NixOS Home Automation

519 Members
Declarative Home Automation and other Sidequests | https://wiki.nixos.org/wiki/Home_Assistant131 Servers

Load older messages


SenderMessageTime
20 Jun 2021
@piegames:matrix.orgpiegamesIf 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
@instantepiphany:matrix.orginstantepiphany
In reply to @piegames:matrix.org
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?)
I'm not disagreeing, just curious - what use case is there for an interpreted language?
09:28:22
@schnecfk:ruhr-uni-bochum.deCRTifiedProbably 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 sensors09:29:51
@instantepiphany:matrix.orginstantepiphany
In reply to @piegames:matrix.org
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.
Not 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
@instantepiphany:matrix.orginstantepiphany
In reply to @schnecfk:ruhr-uni-bochum.de
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
I'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
@piegames:matrix.orgpiegames
In reply to @instantepiphany:matrix.org
I'm not disagreeing, just curious - what use case is there for an interpreted language?

So a few use cases that you may want to consider that would make good use of a scripting language:

  • User can write a few lines of code to create automation behavior
  • Plugin system
  • Dynamically loading modules. Let's be frank, if you want to load Rust code at run time you won't have fun.
09:40:14
@instantepiphany:matrix.orginstantepiphany
In reply to @piegames:matrix.org

So a few use cases that you may want to consider that would make good use of a scripting language:

  • User can write a few lines of code to create automation behavior
  • Plugin system
  • Dynamically loading modules. Let's be frank, if you want to load Rust code at run time you won't have fun.

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
@instantepiphany:matrix.orginstantepiphanySo 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
@piegames:matrix.orgpiegamesWill 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
@instantepiphany:matrix.orginstantepiphany 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
@joerg:bethselamin.deMic92 (Old)What other components do they plan to make stateful?11:17:08
@joerg:bethselamin.deMic92 (Old)In home-assistant?11:17:16
@schnecfk:ruhr-uni-bochum.deCRTified
In reply to @joerg:bethselamin.de
What other components do they plan to make stateful?
Afaik they want to migrate always from the YAMl configuration completely, making the while configuration of all integrations stateful
11:20:09
@joerg:bethselamin.deMic92 (Old)
In reply to @schnecfk:ruhr-uni-bochum.de
Afaik they want to migrate always from the YAMl configuration completely, making the while configuration of all integrations stateful
Do 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
@schnecfk:ruhr-uni-bochum.deCRTified
In reply to @joerg:bethselamin.de
Do you have a source for that? This reads different: https://www.home-assistant.io/blog/2020/04/14/the-future-of-yaml/
The 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
@joerg:bethselamin.deMic92 (Old)
In reply to @schnecfk:ruhr-uni-bochum.de
The 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)
Mhm. 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
@schnecfk:ruhr-uni-bochum.deCRTifiedAt least for some integrations, although the line between "communicates with a service" and "bridges a protocok" seems fairly thin to me11:46:57
@joerg:bethselamin.deMic92 (Old)Well maybe depends on the integration11:47:00
@hexa:lossy.network@hexa:lossy.network Mic92: https://github.com/home-assistant/core/pull/37800#issuecomment-657707769 11:47:58
@schnecfk:ruhr-uni-bochum.deCRTifiedI mean, even esphome does not support yaml anymore11:48:04
@hexa:lossy.network@hexa:lossy.networkhuh, what?11:48:28
@hexa:lossy.network@hexa:lossy.networkoh, you mean on the home-assistant side11:48:35
@hexa:lossy.network@hexa:lossy.networkbut esphome works great with zeroconf11:48:46
@schnecfk:ruhr-uni-bochum.deCRTified
In reply to @hexa:lossy.network
oh, you mean on the home-assistant side
https://www.home-assistant.io/integrations/esphome/ that one, yes
11:49:02
@hexa:lossy.network@hexa:lossy.networkalso they're talking about doing this because then they have control over config migration11:49:58
@joerg:bethselamin.deMic92 (Old)
In reply to @hexa:lossy.network
also they're talking about doing this because then they have control over config migration
Which 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
@hexa:lossy.network@hexa:lossy.networkyeah, well. shit happens.11:55:35
@hexa:lossy.network@hexa:lossy.networkbut the general arguments they're giving have merit11:55:46
@hexa:lossy.network@hexa:lossy.networkbecause we are not really the intended target audience11:56:39
@hexa:lossy.network@hexa:lossy.networkI mean, we're using hass inspite of these things11:57:06

Show newer messages


Back to Room ListRoom Version: 6