Download PDF
        SAMOVAR 
×
Menu
  • Extending capabilities

Extending Capabilities

 
Samovar's capabilities can be extended significantly with additional modules connected over the I2C bus and with additional scripts:
 
Programming of additional functions is implemented on the basis of the scripting language Lua. 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.
 
The basic Samovar functionality does not change.