🍳 Foodlang

Appliance Automation

Foodlang compiles a recipe's appliance_targets into mappings for smart appliances and protocols: OPC UA, Home Connect, MQTT, and Matter.

Honesty first. These targets produce mapping payloads, not live device execution. Foodlang does not open a device session, write to real OPC UA nodes, or call a vendor cloud. The mapping is the hand-off point to a driver you control.

OPC UA

foodlang compile examples/simple-latte.food.yaml --target opcua
opcua:
  profile: CoffeeMachineRecipeParameterType
  write:
    BeverageSize: 300
    GroundsAmount: 18
    GroundsWater: 40
    CoffeeType: espresso
    MilkAmount: 220
    FoamAmount: 40
    PowderAmount: 0
  call:
    method: StartRecipe
    args:
      - Simple Latte

Node IDs are intentionally unspecified — you bind them in your driver.

MQTT

foodlang compile examples/simple-latte.food.yaml --target mqtt
{
  "topic": "coffee_machine/command",
  "payload": {
    "drink": "latte",
    "grounds_g": 18,
    "water_ml": 40,
    "milk_ml": 220,
    "foam_ml": 40
  }
}

Home Connect & Matter

Both are illustrative: program and option keys vary by appliance, and Matter has no standard recipe cluster. They show how Foodlang stays future-compatible without pretending to be a certified integration.

Authoring appliance targets

X-foodlang:
  appliance_targets:
    opcua:
      profile: CoffeeMachineRecipeParameterType
      parameters: { BeverageSize: 300, GroundsAmount: 18 }
    mqtt:
      topic: coffee_machine/command
      payload: { drink: latte, milk_ml: 220 }