Skip to main content
Skip table of contents

Program Your Own Flexa Applications for Barionet with Claude AI

Barionet Flexa Skill for Claude AI

Build your own I/O and control application on the Barix Barionet — guided by Claude AI.

Don't just build it. Build it on Barix. The Barionet M44 has been the Swiss-army knife of Barix automation for years: relays, digital and analog inputs, temperature sensors, counters, RS-232 and an embedded Linux runtime, all on a DIN-rail-friendly device. The Barionet Flexa Skill is a specialised instruction set that teaches Claude how to generate complete, deployable Flexa applications — manifest, configuration form, application code, and ready-to-upload package — for the Barionet M44.

This guide walks you through downloading the skill, importing it into http://Claude.ai, and using it to develop your first Barionet app. An annotated example conversation is included at the end so you can see exactly how a session typically unfolds.

1. What the Skill Does

The Barionet Flexa Skill turns http://Claude.ai into a Barionet-aware code generator. Once loaded, Claude will:

  • Ask a short set of questions to capture what the app should do and which I/O resources it needs.

  • Design the configuration form before writing any code, so you can review and adjust it.

  • Generate the full Flexa package: manifest.json, install.json, main.py (or main.lua), and config/sdf.json.

  • Bundle everything into a ZIP file that is ready to upload to your Barionet — no manual editing required.

Supported I/O resources

The skill knows the complete Barionet M44 I/O address map and will wire any of these into your app on request:

  • Relays 1–4 — read or control onboard relay outputs

  • Digital inputs 1–4 — read contact state, with optional change-notification callbacks

  • Digital input counters 1–4 — pulse counting for flow meters, gate sensors, energy meters

  • Analog inputs 1–4 — millivolt readings for sensors and 0–10 V signals

  • Temperature sensors — millidegrees Celsius, for any connected 1-wire temperature probes

  • Supply current, supply voltage, CPU temperature — built-in housekeeping values

  • UX8 extension — automatic detection of attached Barionet UX8 I/O extensions at runtime

Supported hardware

  • Barionet M44

Programming languages

  • Python (default)

  • Lua

Claude will use Python unless you ask for Lua. The generated code uses the Barionet's pre-installed iomapping library — no pip install, no external dependencies, no manual library packaging.

Optional features the skill can wire in

  • Remote syslog forwarding

  • Change-notification callbacks on digital inputs, so the app reacts to state transitions instead of polling

  • Configurable thresholds, hysteresis, polling intervals, and any other parameter you want to expose

  • Multi-section configuration tabs with grouped fields, dropdowns, checkboxes, sliders, and password fields

2. What You Need

  • A http://Claude.ai account on a Free, Pro, Max, Team or Enterprise plan.

  • Code execution and file creation enabled in your Claude account settings (this is required for skills to run).

  • A Barionet M44 reachable over the network for upload.

  • The latest Barionet firmware on the target device (the skill targets minFwVersion 2.3.0 by default; Claude will raise it if a feature requires a newer version).

  • The skill ZIP file — attached to this article.

3. Download the Skill

The skill is distributed as a single ZIP file, barionet-flexa-app.zip, attached to this help-center article. Download it to your computer; do not unzip it — http://Claude.ai

expects the ZIP exactly as provided.

CLICK TO DOWNLOAD

Contents: a folder named barionet-flexa-app/ with SKILL.md and a references/ directory holding the full I/O address map, SDF reference, and the list of pre-installed packages available on the Barionet OS.

4. Import the Skill into http://Claude.ai

Follow these steps once. Once the skill is installed it stays in your account and can be enabled or disabled at any time.

  1. Sign in to http://Claude.ai

  2. in your web browser.

  3. Open Settings → Capabilities and make sure Code execution and file creation is enabled. Skills will not run without it.

  4. Open Customize → Skills.

  5. Click the + button, then + Create skill, then choose Upload a skill.

  6. Select the downloaded barionet-flexa-app.zip file.

  7. Wait for the upload to complete. Barionet Flexa App will appear in your Skills list.

  8. Toggle the skill ON. You are ready to use it.

image-20260611-092236.png

Team and Enterprise accounts

Organisation owners can provision the skill account-wide so it appears automatically for every member.

Open Organization settings → Skills, enable Code execution and file creation and Skills, then upload barionet-flexa-app.zip as a provisioned skill.

5. How to Use the Skill

Start a new chat in http://Claude.ai and ask Claude to build a Barionet app. The skill will trigger automatically when you mention Barionet in a development context. If you want to be explicit, simply say:

CODE
Use the Barionet Flexa Skill to build me an app for my Barionet M44.

The skill drives the conversation in three phases:

Phase 1 — Requirements gathering

Claude asks a short set of focused questions:

  • What should the app do?

  • Which I/O resources does it need (relays, digital inputs, analog inputs, temperature sensors, counters, LED)?

  • Which parameters do you want the user to be able to configure from the web UI?

  • Language preference (Python or Lua)?

  • What should the configuration tab be called in the Barionet web interface?

Answer them in a single reply — Claude reads all your answers together.

Phase 2 — Plan confirmation

Claude prints a compact summary: app name, language, tab name, the I/O addresses that will be read or written, the SDF sections and fields, and the files that will be generated. Review it, then say yes to continue. If anything is off, just tell Claude what to change.

About the SDF

SDF stands for Settings Definition Form. It is a JSON file (config/sdf.json) that describes the configuration page shown for your app inside the Flexa device's web interface — every field, default value, dropdown and grouping. The Flexa firmware reads the SDF at app startup and renders the form automatically; whatever the user enters is saved into the app's runtime configuration and read by your Python code at run time. The skill generates the SDF for you based on your answers in Phase 1, so you get a fully working configuration page without writing any UI code.

Phase 3 — File generation

Claude generates every file in order, packages them into a ZIP, and tells you the ZIP filename, how to upload it to the Barionet, and what to fill in on the configuration tab after the first launch.

Deploying the generated app

  1. Download the ZIP file produced by Claude.

  2. Open your Barionet's web interface and go to the HOME tab.

  3. Click Install Package and select the ZIP.

  4. Open the app's configuration tab and fill in the SDF fields Claude documented at the end of the chat.

  5. Submit the form. The app starts (or restarts) automatically on submit.

6. Alternative Approach: Start From a Working Example

Building from scratch with the skill is the most flexible route, but it is not always the fastest one. If your target application is close to something that already exists, it is often quicker — and the result is often more reliable — to start from a working example app and let Claude modify it, rather than asking Claude to generate everything from a blank page.

There are many https://help.barix.com/barionet/flexa-apps examples made for Barionet that you can download, install on your Barionet M44 unchanged, and use as a starting point for your own development. The example is fully functional out of the box: a complete install.json, application code, and SDF are already in place and known to work on the target firmware.

To use this approach:

  1. Download the example app ZIP from the link above and install it on your Barionet to verify it runs.

  2. Unzip the package on your computer so you can see all the source files.

  3. Open a new chat in http://Claude.ai with the Barionet Flexa Skill enabled.

  4. Upload the example files to the chat (drag and drop the unzipped folder, or paste the contents of individual files).

  5. Describe the changes you want — for example using the MQTT Client app: "Here is a working Barionet app that reads a temperature sensor and toggles a relay. I want to extend it so it also publishes the temperature to an MQTT broker every 30 seconds. Please modify it and give me back a deployable ZIP."

  6. Claude will read the existing structure, apply your changes consistently with the skill's conventions, and re-package the result.

When to prefer this approach over starting from scratch:

  • Your new app is a variation of an existing one (different thresholds, different I/O channels, an extra feature, a different reporting target).

  • You want to preserve a specific code structure, comment style, or naming convention that already works for your team.

  • You need to retain compatibility with an external system (a particular MQTT topic layout, a specific Modbus register map, a specific log format) and want to avoid Claude reinventing those details.

  • You are learning what a well-structured Barionet app looks like and want a concrete reference to read alongside the skill's instructions.

When to start from scratch instead:

  • The new app does something fundamentally different from any example you have on hand.

  • The example you are tempted to start from is significantly more complex than what you actually need — Claude is faster at generating a lean app from a clear specification than at trimming a large one down.

Either approach uses the same Barionet Flexa Skill in the background; the difference is only what Claude has on the table when the conversation starts.

7. Example: Temperature-Driven Cooling Relay Controller

The following is an example of a real session with Claude using the Barionet Flexa Skill. The target is a Barionet M44 used as a thermostat: it reads a temperature sensor, closes a relay to start a downstream cooling system when the temperature rises above a configurable threshold, and opens the relay once the temperature has dropped below threshold-minus-hysteresis. All transitions are logged to a remote syslog server. The conversation is reproduced here for illustration; your exact wording will differ.

👤 You

Use the Barionet Flexa Skill to build me an app for my Barionet M44. I want a thermostat: read temperature sensor 1, close Relay 1 above a configurable threshold to start a cooling unit, open it again once the temperature has dropped by a configurable hysteresis. Everything should be configurable from the web UI, and I want syslog forwarding.

🤖 Claude

Happy to put that together. A few quick questions and we'll be ready to generate the package:

  • App name and tab name for the web UI?

  • Confirm the I/O: temperature sensor 1 (address 601) for reading, Relay 1 (address 1) for the cooling output — correct?

  • Polling interval — how often should the app read the temperature? (Typical: 1–10 seconds.)

  • Configurable parameters to expose in the web UI:

    • Threshold (°C)

    • Hysteresis (°C)

    • Polling interval (s)

    • Anything else? (Manual override, on/off enable switch, …)

  • Syslog server address and default port (514)?

  • Language: Python (default) or Lua?

  • One-line description of what this app does (used as a comment header in the generated code).

👤 You

Here are the answers:

  • App name: cooling-thermostat, tab name: "Cooling Thermostat"

  • I/O confirmed: temperature sensor 1 (read), Relay 1 (write).

  • Polling interval: 2 seconds default, configurable.

  • Configurable parameters:

    • Threshold (°C), default 28

    • Hysteresis (°C), default 2

    • Polling interval (s), default 2

    • Enable switch (boolean) — when off, the relay stays open regardless of temperature

  • Syslog: default 10.0.10.4 port 514, with an enable toggle.

  • Language: Python.

  • Description: "Thermostat — Relay 1 follows Temperature Sensor 1 with configurable threshold and hysteresis."

🤖 Claude

Got it. Here is the build plan:

CODE
App:          cooling-thermostat
Language:     Python
Tab name:     Cooling Thermostat

I/O addresses:
  Read:       601  (Temperature Sensor 1, m°C)
  Write:      1    (Relay 1, cooling output)

SDF sections:
  thermostat
    - enable           (boolean, default true)
    - threshold_c      (number, default 28, range -20..80)
    - hysteresis_c     (number, default 2,  range 0..20)
    - poll_interval_s  (number, default 2,  range 1..60)
  logging
    - enable_syslog    (boolean, default false)
    - syslog_address   (string,  default "10.0.10.4:514")

Files to generate:
  - manifest.json
  - install.json
  - main.py
  - config/sdf.json

Does this plan look correct? Shall I generate the package?

👤 You

Looks good — go ahead.

🤖 Claude

Generating the package now…

  • Wrote cooling-thermostat/manifest.json

  • Wrote cooling-thermostat/install.json

  • Wrote cooling-thermostat/main.py

  • Wrote cooling-thermostat/config/sdf.json

  • Created cooling-thermostat.zip

Your package is ready: cooling-thermostat.zip

To deploy:

  • Open your Barionet web interface and go to the HOME tab.

  • Click Install Package and select cooling-thermostat.zip.

  • Open the Cooling Thermostat tab.

  • Set the threshold, hysteresis, polling interval and syslog server, then submit.

  • On submit, the app starts. Relay 1 will close when Temperature Sensor 1 rises above the threshold and re-open once it has dropped below threshold-minus-hysteresis. Transitions and the current temperature are logged to syslog.

That is the complete development loop: less than five minutes of conversation, and a tested, deployable Barionet application at the end of it. The same flow applies to MQTT bridges, Modbus gateways, counter-based event triggers, scheduled relay control, and any combination of these — just describe what you need.

8. Tips for Getting Good Results

  • Be concrete about I/O. Tell Claude which addresses to read and write, or describe the physical signals and let Claude pick the right addresses. Vague prompts produce vague apps.

  • Answer all questions in one reply. The skill is designed to capture all requirements in a single round so it can produce a coherent plan.

  • Always review the plan before generation. It is faster to correct the plan than to regenerate files.

  • Remember the app restarts on every form submit. Design your app to start cleanly from scratch every time; do not rely on in-memory state surviving a configuration change.

  • Iterate. If the generated app needs adjustments, simply describe the change — Claude will edit and rebuild the ZIP.

  • Test on the device. Generated code targets the exact Barionet firmware environment, but every deployment has its own wiring and external systems; always verify on the real hardware.

9. Support and Limitations

The Barionet Flexa Skill is provided as part of Barix's AI Ready ecosystem. Please note the following support policy:

  • No code troubleshooting. Barix provides the hardware, the firmware environment and the Claude AI skill, but cannot provide technical support for troubleshooting, debugging or fixing application code — whether it is written by you or generated by AI.

  • No guarantee of performance. Barix does not guarantee the success, stability or performance of self-programmed applications. The responsibility for the final application's functionality and reliability rests solely with the developer.

  • Paid support services. Our hardware and standard firmware are backed by the Barix global warranty. Engineering assistance for custom product development or code-specific issues is available as a paid professional service.

  • Barix terms and conditions apply: https://www.barix.com/terms-and-conditions/

For product information, ordering numbers and the latest list of Flexa-optimised devices, see the Barix Flexa + Claude AI product page.


Don't just build it. Build it on Barix.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.