- first decision is to stick with yaml or go to toml or ron or another format.
- second is which bits to knick from esphome format.
- use matter terminology for abstractions.
- espforge, pins, peripherals(gpio, i2c, spi, uart), abstractions, devices
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 4. Concept Specifications | |
| Our specification language is mostly informal, except for the definition of state components and action signatures. Here, for example, is a specification for a Password authentication concept. | |
| concept Password [U] | |
| purpose | |
| to securely store and validate user credentials | |
| state | |
| password: U -> string | |
| salt: U -> string |
This document describes the type-safe template configuration system for espforge. The system enables templates to declare their configuration requirements through Rust structs, ensuring compile-time type safety and preventing runtime errors.
- Type Safety: Template-specific configuration in the
examplesection validated against Rust structs at compile time - Zero Runtime Overhead: Template discovery happens during build, not execution
https://github.com/ya7010/serde_valid
serde valid rust looks promising.
Of course. Based on the Rust code you're working with, the parser expects a specific structure for the binary_sensor configuration.
Here is the minimal, well-formed YAML file that will work with the Rust parsing example from our previous conversation.
binary_sensor:
- platform: gpio
name: "Desk Button"
id: desk_button
pin:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Config { | |
| binary_sensor: [ | |
| BinarySensorComponent { | |
| name: "Desk Button", | |
| id: "desk_button", | |
| platform: Gpio( | |
| GpioPlatformConfig { | |
| pin: PinConfig { | |
| number: 23, | |
| mode: InputPullup, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| crate: esp-hal | |
| options: | |
| - name: place-spi-master-driver-in-ram | |
| description: Places the SPI master driver in RAM for better performance | |
| default: | |
| - value: false | |
| - name: place-switch-tables-in-ram | |
| description: "Places switch-tables, some lookup tables and constants related to |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| rule! { | |
| name: "door_alert", | |
| on: rising(door_sensor), | |
| if: wake_hours, | |
| then: | |
| buzzer = on, | |
| wait: 5s, | |
| buzzer = off; | |
| } |
NewerOlder