Profiles#
A profile is a node written down as data: what it publishes on, which policy it
applies to each reading, how often it samples as its battery drains, and how a
dashboard should draw it. The device profiles guide loads one
and runs it in the four languages. This page is the catalog of the profiles the
project and its community share. Each is a JSON file under profiles/ in the
repository, read by the same parser a device uses, checked in CI for the mistakes a
hand-written manifest makes, and kept in the form the library itself writes, so a
change to one shows as a change of meaning and nothing else.
Using one#
Download the file, or copy its text, and load it where the node runs. In Rust,
Profile::from_json reads it and Node runs it over a sensor, an actuator, and a
transport of your own. In TypeScript, Python, and C#, fromJson, from_json, and
FromJson read it, and its controller decides each reading while the program
drives the hardware, the loop the guide shows. The numbers are a starting point: a
manifest is meant to be edited to the bed, the fridge, or the river in front of
you, and shared back once it has run.
Sharing yours#
A profile that has run on a real node is worth sharing. The
community page says how: one file, one pull
request, no Rust. cargo xtask profiles checks it the way CI will, and the four
presets the library ships are here in the same form, so a manifest and the code
that would have built it cannot drift apart.
profiles/brooder-heater.jsonKeeps a poultry brooder at 32 C by switching a heat lamp on below 31.5 C and off above 32.5 C, and alerts when the chicks are more than 4 C from target. Samples every two minutes on a healthy battery and eases off as it drains.
- Publishes on
poultry/brooder/temperature. - Holds 32 by switching the output on below 31.5 and off above 32.5, and alerts outside 28 to 36.
- Samples every 2 min, every 10 min below 50 % charge, and every 30 min below 20 %.
- Draws Brooder temperature as a thermometer in celsius with a safe band of 28 to 36; Heat lamp as a switch in state.
curl -O https://raw.githubusercontent.com/molexxxx/pamoja/main/profiles/brooder-heater.jsonprofiles/flood-sensor.jsonWatches a river gauge and warns when the level rises more than 0.3 m in one sample, the signature of a flash flood. Samples every minute, since a flood gives little warning.
- Publishes on
water/river/level. - Warns when the reading rises by more than 0.3 in one sample.
- Samples every 1 min, every 5 min below 50 % charge, and every 15 min below 20 %.
curl -O https://raw.githubusercontent.com/molexxxx/pamoja/main/profiles/flood-sensor.jsonprofiles/grain-store-humidity.jsonReports the relative humidity in a grain store without driving anything, drawn as a droplet with a safe band up to 65 %, above which stored cereal takes on the moisture that mold grows in. Samples every 10 minutes, since a store changes slowly.
- Publishes on
storage/grain/humidity. - Reports readings and drives nothing.
- Samples every 10 min, every 1 hour below 50 % charge, and every 2 hours below 20 %.
- Draws Store humidity as a droplet in percent with a safe band of 30 to 65; Store temperature as a thermometer in celsius with a safe band of 5 to 30.
curl -O https://raw.githubusercontent.com/molexxxx/pamoja/main/profiles/grain-store-humidity.jsonprofiles/irrigation-node.jsonOpens an irrigation valve when soil moisture falls below 30 % and closes it again above 40 %, and alerts when the soil dries below 10 % or is waterlogged above 60 %. Samples slowly, since soil changes over hours and the battery has to last.
- Publishes on
farm/irrigation/soil-moisture. - Holds 35 by switching the output on below 30 and off above 40, and alerts outside 10 to 60.
- Samples every 5 min, every 30 min below 50 % charge, and every 1 hour below 20 %.
curl -O https://raw.githubusercontent.com/molexxxx/pamoja/main/profiles/irrigation-node.jsonprofiles/pipeline-pressure-drop.jsonWatches the pressure in a water main and warns when it falls by more than 0.5 bar between samples, the signature of a burst or a valve left open downstream. Samples every 30 s, since a burst empties a tank in minutes.
- Publishes on
water/main/pressure. - Warns when the reading falls by more than 0.5 in one sample.
- Samples every 30 s, every 2 min below 40 % charge, and every 10 min below 15 %.
- Draws Main pressure as a dial in bar with a safe band of 2 to 6.
curl -O https://raw.githubusercontent.com/molexxxx/pamoja/main/profiles/pipeline-pressure-drop.jsonprofiles/soil-moisture-valve.jsonWaters a raised bed through a solenoid valve, opening it when the volumetric water content falls below 25 % and closing it above 35 %, and alerts when the bed is drier than 15 % or wetter than 45 %. The dashboard draws the bed as a droplet and the valve as a valve, with French and Swahili labels.
- Publishes on
garden/bed/moisture. - Holds 30 by switching the output on below 25 and off above 35, and alerts outside 15 to 45.
- Samples every 5 min, every 30 min below 50 % charge, and every 1 hour below 20 %.
- Draws Soil moisture as a droplet in percent with a safe band of 25 to 45; Bed valve as a valve in state.
curl -O https://raw.githubusercontent.com/molexxxx/pamoja/main/profiles/soil-moisture-valve.jsonprofiles/vaccine-fridge-monitor.jsonHolds a vaccine fridge at 5 C by switching its cooler, and raises an alert the moment the temperature leaves the 2 to 8 C safe range. Keeps sampling often as the battery drains, since an unnoticed excursion costs more than a flat battery.
- Publishes on
cold-chain/fridge/temperature. - Holds 5 by switching the output on above 5.5 and off below 4.5, and alerts outside 2 to 8.
- Samples every 1 min, every 5 min below 50 % charge, and every 15 min below 20 %.
curl -O https://raw.githubusercontent.com/molexxxx/pamoja/main/profiles/vaccine-fridge-monitor.jsonprofiles/well-level.jsonReports a well's water level and warns once the level is on course to reach the dry mark within six more samples, so a pump is stopped before it runs dry.
- Publishes on
water/well/level. - Watches a falling level and warns once it is on course to reach 0.5 within 6 more samples.
- Samples every 10 min, every 30 min below 50 % charge, and every 1 hour below 20 %.
curl -O https://raw.githubusercontent.com/molexxxx/pamoja/main/profiles/well-level.json