La pression du filtre monte pompe en marche: lumnik dit où aller et quoi vérifier
Objectif Recevoir une visite à faire, avec le client, le dernier lavage et le modèle de filtre, quand la pression d'un filtre de piscine dépasse la limite de ce filtre pendant la filtration.
Un pisciniste suit son parc de piscines dans MyIndygo. Un filtre se colmate: sa pression monte, mais seulement quand la filtration tourne. Le client, le contrat, le dernier lavage et le filtre installé sont dans trois autres outils.
- quatre sources, quatre connecteurs REST
- une fiche par module de filtration
- une décision, pour la seule piscine au-dessus de la limite de son filtre, pompe en marche
{
"modules": [
{
"id": "LRPC-0A1F01",
"serialNumber": "LRPC-0A1F01",
"type": "lr-pc-vs2",
"name": "Filtration",
"pool": "POOL-101",
"poolName": "Pool Martin",
"inputs": [
{
"type": 6,
"lastValue": {
"value": 7.2,
"date": "2026-11-17T10:00:00Z"
}
},
{
"type": 8,
"lastComputedMeasure": {… 107 lignes de plus
{
"installed": [
{
"pool": "POOL-101",
"filter_model": "F-600",
"alert_pressure_bar": 1.5,
"warranty_until": "2027-06-30",
"spare_parts": "pressure gauge MG-63, lid O-ring J-600",
"check": "backwash, then check the pressure gauge"
},
{
"pool": "POOL-102",
"filter_model": "F-500",
"alert_pressure_bar": 1.4,
"warranty_until": "2026-03-31",
"spare_parts": "pressure gauge MG-63",
"check": "backwash, then check the pressure gauge"
},
{
"pool": "POOL-103",… 8 lignes de plus
apiVersion: connectors.lumnik.io/v1kind: Connectormetadata: name: scenario-pool-myindygo-a connector_type: rest-generic scopes: [pool-service]spec: base_url: http://host.docker.internal:18095 endpoints: - id: modules path: /api/getUserWithHisModules method: POST pagination: kind: none response_path: "$.modules[?(@.type == 'lr-pc-vs2')]" # the filtration modules; the gateways stay out incremental: { mode: full } target: kind: hybrid table: connector.scenario_pool_module_a unique_key: $.serialNumber promote: - { name: module, path: $.serialNumber, type: text } - { name: pool_id, path: $.pool, type: text } - { name: pool_name, path: $.poolName, type: text } - { name: pressure_bar, path: "$.inputs[?(@.type == 8)].lastComputedMeasure.value", type: decimal } - { name: measured_at, path: "$.inputs[?(@.type == 8)].lastComputedMeasure.date", type: timestamptz } - { name: filtration, path: "$.outputs[?(@.index == 0)].value", type: integer }apiVersion: connectors.lumnik.io/v1kind: Connectormetadata: name: scenario-pool-crm-a connector_type: rest-generic scopes: [pool-service]spec: base_url: http://host.docker.internal:18095 endpoints: - id: customers path: /crm/customers method: GET pagination: { kind: none, response_path: $.customers } incremental: { mode: full } target: kind: hybrid table: connector.scenario_pool_customer_a unique_key: $.pool promote: - { name: pool_id, path: $.pool, type: text } - { name: customer, path: $.customer, type: text } - { name: town, path: $.town, type: text } - { name: contract, path: $.contract, type: text } - { name: technician, path: $.technician, type: text }apiVersion: connectors.lumnik.io/v1kind: Connectormetadata: name: scenario-pool-gmao-a connector_type: rest-generic scopes: [pool-service]spec: base_url: http://host.docker.internal:18095 endpoints: - id: visits path: /gmao/visits method: GET pagination: { kind: none, response_path: $.visits } incremental: { mode: full } target: kind: hybrid table: connector.scenario_pool_visit_a unique_key: $.pool promote: - { name: pool_id, path: $.pool, type: text } - { name: last_backwash, path: $.last_backwash, type: date } - { name: last_visit, path: $.last_visit, type: date } - { name: visit_note, path: $.visit_note, type: text }apiVersion: connectors.lumnik.io/v1kind: Connectormetadata: name: scenario-pool-erp-a connector_type: rest-generic scopes: [pool-service]spec: base_url: http://host.docker.internal:18095 endpoints: - id: installed path: /erp/installed method: GET pagination: { kind: none, response_path: $.installed } incremental: { mode: full } target: kind: hybrid table: connector.scenario_pool_equipment_a unique_key: $.pool promote: - { name: pool_id, path: $.pool, type: text } - { name: filter_model, path: $.filter_model, type: text } - { name: alert_pressure_bar, path: $.alert_pressure_bar, type: decimal } - { name: warranty_until, path: $.warranty_until, type: date } - { name: spare_parts, path: $.spare_parts, type: text } - { name: check, path: $.check, type: text }$ lm apply -f 10-myindygo.yaml
Applied connector "scenario-pool-myindygo-d" — 1 endpoint
$ lm apply -f 20-crm.yaml
Applied connector "scenario-pool-crm-d" — 1 endpoint
$ lm apply -f 21-maintenance.yaml
Applied connector "scenario-pool-gmao-d" — 1 endpoint
$ lm apply -f 22-erp.yaml
Applied connector "scenario-pool-erp-d" — 1 endpoint
$ lm source rest test scenario-pool-myindygo-d
ENDPOINT METHOD STATUS ITEMS VERDICT
modules POST 200 3 ok
$ lm connector run scenario-pool-myindygo-d
run scheduled: b442b38f-21e4-4271-8c03-995407183368
$ lm run get b442b38f-21e4-4271-8c03-995407183368 --wait-evaluated
ID CONNECTOR ENDPOINT STATUS IN OUT SKIPPED DEAD-LETTERS STARTED ENDED EVALUATED
b442b38f scenario-pool-myindygo-d modules Completed 3 3 0 0 2026-11-20 23:13 2026-11-20 23:13 yes
$ lm connector run scenario-pool-crm-d
run scheduled: 19e29ea6-074c-476d-b8bf-66d2868afc89
$ lm run get 19e29ea6-074c-476d-b8bf-66d2868afc89 --wait-evaluated
ID CONNECTOR ENDPOINT STATUS IN OUT SKIPPED DEAD-LETTERS STARTED ENDED EVALUATED
19e29ea6 scenario-pool-crm-d customers Completed 3 3 0 0 2026-11-20 23:13 2026-11-20 23:13 yes
$ lm connector run scenario-pool-gmao-d
run scheduled: f33e3540-1974-4d8d-acb4-9d4a3055ae02
$ lm run get f33e3540-1974-4d8d-acb4-9d4a3055ae02 --wait-evaluated
ID CONNECTOR ENDPOINT STATUS IN OUT SKIPPED DEAD-LETTERS STARTED ENDED EVALUATED
f33e3540 scenario-pool-gmao-d visits Completed 3 3 0 0 2026-11-20 23:13 2026-11-20 23:13 yes
$ lm connector run scenario-pool-erp-d
run scheduled: 96e6ef8f-4684-4cb2-9430-dc4a666f1b2c
$ lm run get 96e6ef8f-4684-4cb2-9430-dc4a666f1b2c --wait-evaluated
ID CONNECTOR ENDPOINT STATUS IN OUT SKIPPED DEAD-LETTERS STARTED ENDED EVALUATED
96e6ef8f scenario-pool-erp-d installed Completed 3 3 0 0 2026-11-20 23:13 2026-11-20 23:13 yes- pre-flight modules
- POST 200 · 3 items · ok
- scenario-pool-myindygo-d
- IN 3 · OUT 3
- scenario-pool-crm-d
- IN 3 · OUT 3
- scenario-pool-gmao-d
- IN 3 · OUT 3
- scenario-pool-erp-d
- IN 3 · OUT 3
preuves: replay.log, 03-decisions-after-poll-2.json, 03-decisions-after-poll-3.json, 03-decisions-after-poll-4.json, requests.log · transform v1
kind: Entityname: ScenarioPoolFilterAdescription: "A pool's filtration module as MyIndygo last measured it, with its customer, its last maintenance and its installed filter."match: [module]scopes: [pool-service]columns: module: { label: "Module" } pool_id: { label: "Pool" } pool_name: { label: "Pool name" } measured_at: { label: "Measured at" } pressure_bar: { label: "Filter pressure (bar)" } filtration: { label: "Filtration running (1 = yes)" } customer: { label: "Customer" } town: { label: "Town" } contract: { label: "Contract" } technician: { label: "Technician" } last_backwash: { label: "Last backwash" } last_visit: { label: "Last visit" } filter_model: { label: "Filter" } alert_pressure_bar: { label: "Alert pressure (bar)" } warranty_until: { label: "Warranty until" } spare_parts: { label: "Spare parts" } check: { label: "Check" }sources: - table: scenario_pool_module_a map: module: module pool_id: pool_id pool_name: pool_name measured_at: measured_at pressure_bar: pressure_bar filtration: filtrationjoins: - table: scenario_pool_customer_a from: pool_id to: pool_id map: { customer: customer, town: town, contract: contract, technician: technician } - table: scenario_pool_visit_a from: pool_id to: pool_id map: { last_backwash: last_backwash, last_visit: last_visit } - table: scenario_pool_equipment_a from: pool_id to: pool_id map: { filter_model: filter_model, alert_pressure_bar: alert_pressure_bar, warranty_until: warranty_until, spare_parts: spare_parts, check: check }apiVersion: apps.lumnik.io/v1kind: Processmetadata: name: scenario-pool-filter-visit-aspec: scope: pool-service on: event: data.row.changed table: connector.v_scenariopoolfiltera when: - filtration=1 # a pressure read with the pump stopped says nothing about the filter - "pressure_bar>{alert_pressure_bar}" # the limit is the installed filter's, from the ERP emit: type: decision.pool-filter-visit-a key: pool_id message: "{pool_name} ({customer}, {town}): filter pressure {pressure_bar} bar while filtration runs, above {alert_pressure_bar} bar for its {filter_model}. Last backwash {last_backwash}. Visit for {technician}: {check}." fields: [module, measured_at, spare_parts, warranty_until]$ lm entity apply -f 30-pool-filter.yaml
Applied entity "ScenarioPoolFilterD" → connector."v_scenariopoolfilterd"
$ lm process apply -f 40-filter-visit.yaml
Applied process "scenario-pool-filter-visit-d" → table connector.v_scenariopoolfilterd, emits decision.pool-filter-visit-d
warning: managed index on connector.scenario_pool_module_d is pending; Entity Process reads may be slower until it is ready- ScenarioPoolFilterD
- v_scenariopoolfilterd
- scenario-pool-filter-visit-d
- connector.v_scenariopoolfilterd
preuves: replay.log, 03-decisions-after-poll-2.json, 03-decisions-after-poll-3.json, 03-decisions-after-poll-4.json, requests.log · transform v1
{
"modules": [
{
"id": "LRPC-0A1F01",
"serialNumber": "LRPC-0A1F01",
"type": "lr-pc-vs2",
"name": "Filtration",
"pool": "POOL-101",
"poolName": "Pool Martin",
"inputs": [
{
"type": 6,
"lastValue": {
"value": 7.2,
"date": "2026-11-20T10:00:00Z"
}
},
{
"type": 8,
"lastComputedMeasure": {… 107 lignes de plus
$ lm connector run scenario-pool-myindygo-d
run scheduled: 767b7164-cab5-4968-9c74-fc2f4c0a5992
$ lm run get 767b7164-cab5-4968-9c74-fc2f4c0a5992 --wait-evaluated
ID CONNECTOR ENDPOINT STATUS IN OUT SKIPPED DEAD-LETTERS STARTED ENDED EVALUATED
767b7164 scenario-pool-myindygo-d modules Completed 3 3 0 0 2026-11-20 23:13 2026-11-20 23:13 yes
$ lm connector run scenario-pool-myindygo-d
run scheduled: f48ddc9c-ff94-44eb-9e26-818d6d515325
$ lm run get f48ddc9c-ff94-44eb-9e26-818d6d515325 --wait-evaluated
ID CONNECTOR ENDPOINT STATUS IN OUT SKIPPED DEAD-LETTERS STARTED ENDED EVALUATED
f48ddc9c scenario-pool-myindygo-d modules Completed 3 3 0 0 2026-11-20 23:13 2026-11-20 23:13 yes
$ lm connector run scenario-pool-myindygo-d
run scheduled: f651a2aa-baae-4159-86bb-d12b8241dafc
$ lm run get f651a2aa-baae-4159-86bb-d12b8241dafc --wait-evaluated
ID CONNECTOR ENDPOINT STATUS IN OUT SKIPPED DEAD-LETTERS STARTED ENDED EVALUATED
f651a2aa scenario-pool-myindygo-d modules Completed 3 3 0 0 2026-11-20 23:13 2026-11-20 23:13 yes- poll 2
- IN 3 · OUT 3 · 0 decision(s)
- poll 3
- IN 3 · OUT 3 · 0 decision(s)
- poll 4
- IN 3 · OUT 3 · 1 decision(s) · Pool Martin
preuves: replay.log, 03-decisions-after-poll-2.json, 03-decisions-after-poll-3.json, 03-decisions-after-poll-4.json, requests.log · transform v1
$ lm inbox --process scenario-pool-filter-visit-d
ID WHEN PROCESS MESSAGE ENTITY_KEY
31141 just now scenario-pool-filter-visit-d Pool Martin (M. et Mme Martin, Aix-en-Provence): filter pressure 1.6 bar while filtration runs, above 1.5 bar for its F-600. Last backwash 2026-10-04. Visit for Lucas Bernard: backwash, then check the pressure gauge. POOL-101
$ lm entity get ScenarioPoolFilterD -o json
[
{
"module": "LRPC-0A1F01",
"pool_id": "POOL-101",
"pool_name": "Pool Martin",
"measured_at": "2026-11-20T10:00:00Z",
"pressure_bar": "1.6",
"filtration": "1",
"customer": "M. et Mme Martin",
"town": "Aix-en-Provence",
"contract": "Sérénité annual",
"technician": "Lucas Bernard",
"last_backwash": "2026-10-04",
"last_visit": "2026-10-04",
"filter_model": "F-600",
"alert_pressure_bar": "1.5",
"warranty_until": "2027-06-30",
"spare_parts": "pressure gauge MG-63, lid O-ring J-600",
"check": "backwash, then check the pressure gauge",
"_conflicts": "{}"
},
{
"module": "LRPC-0A1F02",
"pool_id": "POOL-102",
"pool_name": "Pool Dubois",
"measured_at": "2026-11-20T10:00:00Z",
"pressure_bar": "0.8",
"filtration": "1",
"customer": "Famille Dubois",
"town": "Pertuis",
"contract": "Sérénité annual",
"technician": "Lucas Bernard",
"last_backwash": "2026-11-10",
"last_visit": "2026-11-10",
"filter_model": "F-500",
"alert_pressure_bar": "1.4",
"warranty_until": "2026-03-31",
"spare_parts": "pressure gauge MG-63",
"check": "backwash, then check the pressure gauge",
"_conflicts": "{}"
},
{
"module": "LRPC-0A1F03",
"pool_id": "POOL-103",
"pool_name": "Pool Leroy",
"measured_at": "2026-11-20T22:00:00Z",
"pressure_bar": "1.7",
"filtration": "0",
"customer": "Camping Leroy",
"town": "Manosque",
"contract": "On call",
"technician": "Inès Moreau",
"last_backwash": "2026-11-02",
"last_visit": "2026-11-02",
"filter_model": "F-750",
"alert_pressure_bar": "1.5",
"warranty_until": "2028-04-30",
"spare_parts": "pressure gauge MG-63, valve V-6",
"check": "backwash, then check the pressure gauge",
"_conflicts": "{}"
}
]- decisions
- 1 · scenario-pool-filter-visit-d · key POOL-101
- message
- Pool Martin (M. et Mme Martin, Aix-en-Provence): filter pressure 1.6 bar while filtration runs, above 1.5 bar for its F-600. Last backwash 2026-10-04. Visit for Lucas Bernard: backwash, then check the pressure gauge.
- Pool Martin
- 1.6 bar · filtration running · F-600 limit 1.5 bar · last backwash 2026-10-04
- Pool Dubois
- 0.8 bar · filtration running · F-500 limit 1.4 bar · last backwash 2026-11-10
- Pool Leroy
- 1.7 bar · filtration stopped · F-750 limit 1.5 bar · last backwash 2026-11-02
preuves: replay.log, 03-decisions-after-poll-2.json, 03-decisions-after-poll-3.json, 03-decisions-after-poll-4.json, requests.log · transform v1
Limites
- La forme de l'API est déduite de l'intégration Home Assistant FunFR/ha-indygo-pool, sans lien avec MyIndygo: elle peut changer. Le vrai service demande une connexion OAuth2 que ce service de test n'exige pas.
- lumnik garde la dernière mesure de chaque module et la compare à la limite du filtre. Il ne compare pas les relevés entre eux: la montée se lit dans le tableau des relevés.
- Le message donne la date du dernier lavage, pas le nombre de jours écoulés.
- La décision propose un contrôle. Elle ne dit pas que le filtre est colmaté: le manomètre lui-même peut être en cause.
- lumnik ne remplace ni les alertes ni l'historique de MyIndygo, et ne pilote ni la pompe ni un programme.
- Piscines, clients, dates et valeurs synthétiques.
Ce scénario tourne sur lumnik Open, gratuit et open source.
Essayer lumnik Open →