Samovar's capabilities can be extended significantly with additional modules connected over the I2C bus and with additional scripts:
PCF8575 — an expander with 16 digital ports. It is enabled in the firmware with the line #define USE_EXPANDER 0x20 (the module's address on the bus).
PCF8591 — an expander with four analog inputs and one analog output. It is enabled with the line #define USE_ANALOG_EXPANDER 0x48.
I2CStepper — a board with a stepper motor for a stirrer or a dosing pump and four relays. It is detected automatically when Samovar starts.
Programming of additional functions is implemented on the basis of the scripting languageLua. Lua support is enabled when the firmware is built: in the configurator, with the "Use Lua" («Использовать Lua») checkbox (the "Hardware" («Оборудование») section); in PlatformIO, with the Samovar_lua environment; in a manual build, with the #define USE_LUA line in the user_config_override.h file. The script editor is opened with the "Editor" («Редактор») button on the Settings page.
Any actuators or buttons (sensors that work as buttons) can be attached to the port expander, and you can define yourself what should happen at a given moment while Samovar is running.
The initialization script runs when Samovar starts, and after that another script runs once a second. In the first you can describe the devices you need, in the second their behavior. For example, it can check the temperature or the current Samovar status and/or turn a pump on or off, open or close a valve, or control an additional heating element.
You can save variables in Samovar's memory, run up to 10 timers, get the Samovar operating status, control the stirrer, pump and relays of the I2CStepper board, and send HTTP requests. That is, you can connect additional equipment and control it automatically while Samovar is running.
You can check that a safety sensor has not tripped, and if it has, you can turn Samovar off right from the script, or increase or stop the water supply. There can be many scenarios. They are determined by the specific equipment.