Idee du proprietaire, et elle est meilleure que la mienne : ce systeme n a pas besoin qu on lui suggere une strategie de plus, il a besoin que quelqu un VOIE que « je coupe EDF, non je remets, et hop je coupe » est absurde. Cinq automates ecrivent sur la meme installation, chacun localement correct, aucun ne voit les autres. Leurs pannes sont des CONTRADICTIONS, et elles ne se lisent que dans la SUITE des evenements — jamais dans un instantane. Le 12/09 au matin le contacteur reseau a bascule toutes les 4 minutes pendant dix minutes : une automatisation HA coupait a 35 % de SOC, l hysteresis rallumait. Aucun automate ne l a vu ; un humain oui. Sortie elargie : `constat`, `gravite` (aucune/faible/moyenne/haute) et `ce_qui_cloche`, valides strictement, publies dans trois helpers et dans le logbook. Le snapshot porte desormais l anciennete des cinq transitions cles (contacteur, verrou, takeover, etat EVCS, mode ACM). ⚠️ VALIDATION SCINDEE. Essai sur l oscillation reelle : le modele a produit un constat JUSTE et un `current_max_a` de 100, hors bornes. La validation tout-ou-rien jetait le diagnostic avec le champ fautif — c est-a-dire exactement ce qu on lui demande, perdu a cause de ce qu on ne lui demande plus. Les champs d ACTION gardent leurs bornes mais sont NEUTRALISES au lieu de faire echouer l observation ; `actionUtilisable` est le seul drapeau qui autoriserait un jour un cablage, et les compteurs ne comptent que lui. Tests advisor : +6. Deux attendus mis a la nouvelle semantique dans le meme commit (hors bornes -> observation gardee, action neutralisee). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GwpFpy2aQ2rJok6tNQSbVj
422 lines
40 KiB
JSON
422 lines
40 KiB
JSON
{
|
|
"name": "EVCS Advisor Shadow V1",
|
|
"nodes": [
|
|
{
|
|
"name": "Schedule Trigger",
|
|
"type": "n8n-nodes-base.scheduleTrigger",
|
|
"typeVersion": 1.2,
|
|
"position": [
|
|
0,
|
|
0
|
|
],
|
|
"parameters": {
|
|
"rule": {
|
|
"interval": [
|
|
{
|
|
"field": "minutes",
|
|
"minutesInterval": 15
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "HA Snapshot Advisor",
|
|
"type": "n8n-nodes-base.httpRequest",
|
|
"typeVersion": 4.2,
|
|
"position": [
|
|
200,
|
|
0
|
|
],
|
|
"parameters": {
|
|
"method": "POST",
|
|
"url": "http://10.10.10.17:8123/api/template",
|
|
"authentication": "genericCredentialType",
|
|
"genericAuthType": "httpBearerAuth",
|
|
"sendHeaders": true,
|
|
"headerParameters": {
|
|
"parameters": [
|
|
{
|
|
"name": "Content-Type",
|
|
"value": "application/json"
|
|
},
|
|
{
|
|
"name": "Accept",
|
|
"value": "text/plain"
|
|
}
|
|
]
|
|
},
|
|
"sendBody": true,
|
|
"bodyParameters": {
|
|
"parameters": [
|
|
{
|
|
"name": "template",
|
|
"value": "{{ {\n \"advisor_enabled\": states(\"input_boolean.evcs_advisor_enabled\"),\n \"advisor_agree_count\": states(\"input_number.evcs_advisor_agree_count\"),\n \"advisor_diverge_count\": states(\"input_number.evcs_advisor_diverge_count\"),\n \"advisor_prev_strategy\": states(\"input_text.evcs_advisor_strategy\"),\n\n \"soc_percent\": states(\"sensor.victron_battery_soc\"),\n \"battery_current_a\": states(\"sensor.victron_battery_current\"),\n \"pv_power_w\": states(\"sensor.victron_pv_power_system\"),\n \"pv_power_10m_avg_w\": states(\"sensor.victron_pv_power_10m_avg\"),\n \"house_ac_power_w\": states(\"sensor.victron_consumption_power_l1\"),\n \"grid_state\": states(\"switch.edf_general_ok_switch\"),\n \"acin1_available\": states(\"sensor.victron_ac_in1_available\"),\n\n \"evcs_vehicle_connected\": states(\"binary_sensor.victron_evcs_vehicle_connected\"),\n \"evcs_charging\": states(\"switch.victron_evcs_charging\"),\n \"evcs_current_a\": states(\"sensor.victron_evcs_current\"),\n \"evcs_surplus_state\": states(\"input_text.victron_evcs_surplus_state\"),\n \"evcs_source_mode\": states(\"input_text.victron_evcs_source_mode\"),\n\n \"balance_status\": states(\"input_text.evcs_balance_status\"),\n \"balance_last_run\": states(\"input_text.evcs_balance_last_run\"),\n \"balance_required_soc\": states(\"input_number.evcs_balance_required_soc\"),\n \"balance_required_soc_prudent\": states(\"input_number.evcs_balance_required_soc_prudent\"),\n \"balance_energy_to_cover_kwh\": states(\"input_number.evcs_balance_energy_to_cover_kwh\"),\n \"balance_crossing_hour\": states(\"input_text.evcs_balance_crossing_hour\"),\n \"balance_grid_needed\": states(\"input_boolean.evcs_balance_grid_needed\"),\n \"balance_grid_energy_needed_kwh\": states(\"input_number.evcs_balance_grid_energy_needed_kwh\"),\n \"balance_pv_censored\": states(\"input_boolean.evcs_balance_pv_censored\"),\n \"balance_censor_reason\": states(\"input_text.evcs_balance_censor_reason\"),\n \"balance_storage_shortfall_kwh\": states(\"input_number.evcs_balance_storage_shortfall_kwh\"),\n \"balance_next_deficit_kwh\": states(\"input_number.evcs_balance_next_deficit_kwh\"),\n \"balance_next_deficit_window\": states(\"input_text.evcs_balance_next_deficit_window\"),\n \"balance_storm_level\": states(\"input_text.evcs_balance_storm_level\"),\n \"balance_storm_reserve_soc\": states(\"input_number.evcs_balance_storm_reserve_soc\"),\n\n \"modules_en_service\": states(\"input_number.evcs_balance_modules_en_service\"),\n \"bms_max_discharge_current_a\": states(\"sensor.airtria_8_us2000c_maximum_allowed_discharge_current\"),\n \"bms_max_charge_current_a\": states(\"sensor.airtria_8_us2000c_maximum_allowed_charge_current\"),\n \"grid_setpoint_w\": states(\"number.gx_device_ac_power_setpoint\"),\n \"mppt_operation_modes\": states.sensor\n | selectattr('entity_id','search','mppt')\n | selectattr('entity_id','search','operation_mode')\n | map(attribute='state') | join(','),\n \"vehicle_selected\": states(\"input_select.victron_evcs_vehicle\"),\n \"evenements_recents\": (\n [ \"EDF \" ~ states(\"switch.edf_general_ok_switch\") ~ \" depuis \" ~ relative_time(states.switch.edf_general_ok_switch.last_changed),\n \"verrou hysteresis \" ~ states(\"input_boolean.victron_grid_hysteresis_latch\") ~ \" depuis \" ~ relative_time(states.input_boolean.victron_grid_hysteresis_latch.last_changed),\n \"takeover nuit \" ~ states(\"input_boolean.victron_evcs_night_grid_takeover_needed\") ~ \" depuis \" ~ relative_time(states.input_boolean.victron_evcs_night_grid_takeover_needed.last_changed),\n \"etat EVCS \" ~ states(\"input_text.victron_evcs_surplus_state\") ~ \" depuis \" ~ relative_time(states.input_text.victron_evcs_surplus_state.last_changed),\n \"mode ACM \" ~ states(\"input_text.victron_charge_mode\") ~ \" depuis \" ~ relative_time(states.input_text.victron_charge_mode.last_changed) ]\n | join(\"|\")\n ),\n\n \"user_strategy\": states(\"input_select.victron_evcs_strategy\"),\n \"allow_grid_hc_night\": states(\"input_boolean.victron_evcs_allow_grid_hc_night\"),\n \"allow_grid_hc_midday\": states(\"input_boolean.victron_evcs_allow_grid_hc_midday\"),\n \"night_target_soc_actual\": states(\"input_number.victron_evcs_night_target_soc\"),\n \"current_max_auto_a\": states(\"input_number.victron_evcs_current_max_auto_a\"),\n \"plafond_edf_on_a\": states(\"input_number.evcs_plafond_courant_edf_on\"),\n\n \"departure_time\": states(\"input_datetime.victron_evcs_departure_time\"),\n \"departure_priority_enabled\": states(\"input_boolean.victron_evcs_departure_priority_enabled\"),\n \"required_energy_kwh\": states(\"input_number.victron_evcs_required_energy_kwh\"),\n\n \"today_remaining_kwh\": states(\"sensor.energy_production_today_remaining\"),\n \"tomorrow_kwh\": states(\"sensor.energy_production_tomorrow\")\n} | tojson }}\n"
|
|
}
|
|
]
|
|
},
|
|
"options": {
|
|
"timeout": 15000
|
|
}
|
|
},
|
|
"credentials": {
|
|
"httpBearerAuth": {
|
|
"id": "uv3sknYYigxBkaVN",
|
|
"name": "Bearer Auth account 2"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "BUILD_PROMPT",
|
|
"type": "n8n-nodes-base.code",
|
|
"typeVersion": 2,
|
|
"position": [
|
|
400,
|
|
0
|
|
],
|
|
"parameters": {
|
|
"jsCode": "// =====================================================\n// EVCS ADVISOR SHADOW V1 — BUILD_PROMPT\n// Construit le prompt LLM à partir du snapshot HA compact.\n// MODE OMBRE : ce workflow n'écrit que des helpers advisor_*.\n// =====================================================\n\nfunction num(v, d) {\n const n = Number.parseFloat(v);\n return Number.isFinite(n) ? n : d;\n}\nfunction onOff(v) {\n return (v ?? 'off').toString().trim().toLowerCase() === 'on';\n}\n\nconst raw = $input.first().json;\nconst input = typeof raw.data === 'string' ? JSON.parse(raw.data) : (raw.data || raw);\n\nconst ctx = {\n advisorEnabled: onOff(input.advisor_enabled),\n agreeCount: num(input.advisor_agree_count, 0),\n divergeCount: num(input.advisor_diverge_count, 0),\n prevAdvisorStrategy: (input.advisor_prev_strategy || 'unknown').toString(),\n\n soc: num(input.soc_percent, NaN),\n batteryCurrentA: num(input.battery_current_a, NaN),\n pvW: num(input.pv_power_w, 0),\n pvAvg10mW: num(input.pv_power_10m_avg_w, 0),\n houseW: num(input.house_ac_power_w, 0),\n gridOn: onOff(input.grid_state),\n acinAvailable: num(input.acin1_available, 0) === 1,\n\n vehicleConnected: onOff(input.evcs_vehicle_connected),\n evcsCharging: onOff(input.evcs_charging),\n evcsCurrentA: num(input.evcs_current_a, 0),\n surplusState: (input.evcs_surplus_state || '').toString(),\n sourceMode: (input.evcs_source_mode || '').toString(),\n\n userStrategy: (input.user_strategy || 'auto_solar_plus').toString().trim().toLowerCase(),\n allowGridHcNight: onOff(input.allow_grid_hc_night),\n allowGridHcMidday: onOff(input.allow_grid_hc_midday),\n nightTargetActual: num(input.night_target_soc_actual, 35),\n currentMaxAutoA: num(input.current_max_auto_a, 22),\n plafondEdfOnA: num(input.plafond_edf_on_a, 20),\n\n departureTime: (input.departure_time || '').toString(),\n departurePriority: onOff(input.departure_priority_enabled),\n requiredEnergyKwh: num(input.required_energy_kwh, 0),\n\n todayRemainingKwh: num(input.today_remaining_kwh, 0),\n tomorrowKwh: num(input.tomorrow_kwh, 0),\n\n // ── BILAN ENERGETIQUE ────────────────────────────────────────────────\n // Ces grandeurs REMPLACENT les regles de seuil. Elles n'etaient pas\n // transmises jusqu'au 12/09 : le conseiller raisonnait sur des paliers\n // que le bilan avait deja demontres faux, et il ne pouvait pas mieux faire.\n balanceStatus: (input.balance_status || 'indisponible').toString().trim(),\n balanceLastRun: (input.balance_last_run || '').toString().trim(),\n balanceRequiredSoc: num(input.balance_required_soc, NaN),\n balanceRequiredSocPrudent: num(input.balance_required_soc_prudent, NaN),\n balanceEnergyToCoverKwh: num(input.balance_energy_to_cover_kwh, NaN),\n balanceCrossingHour: (input.balance_crossing_hour || '').toString().trim(),\n balanceGridNeeded: onOff(input.balance_grid_needed),\n balanceGridEnergyNeededKwh: num(input.balance_grid_energy_needed_kwh, NaN),\n balancePvCensored: onOff(input.balance_pv_censored),\n balanceCensorReason: (input.balance_censor_reason || '').toString().trim(),\n balanceStorageShortfallKwh: num(input.balance_storage_shortfall_kwh, NaN),\n balanceNextDeficitKwh: num(input.balance_next_deficit_kwh, NaN),\n balanceNextDeficitWindow: (input.balance_next_deficit_window || '').toString().trim(),\n stormLevel: (input.balance_storm_level || 'indisponible').toString().trim(),\n stormReserveSoc: num(input.balance_storm_reserve_soc, NaN),\n\n // ── PARC ET MATERIEL, MESURES ────────────────────────────────────────\n modulesEnService: num(input.modules_en_service, 4),\n bmsMaxDischargeA: num(input.bms_max_discharge_current_a, NaN),\n bmsMaxChargeA: num(input.bms_max_charge_current_a, NaN),\n gridSetpointW: num(input.grid_setpoint_w, NaN),\n vehicleSelected: (input.vehicle_selected || 'inconnu').toString().trim(),\n // Historique recent des transitions, fourni par le snapshot. C est la SUITE\n // des evenements qui revele les contradictions entre automates ; un\n // instantane ne peut pas les montrer.\n evenements: String(input.evenements_recents || '')\n .split('|').map(x => x.trim()).filter(Boolean).slice(0, 12)\n .map(x => `- ${x}`),\n\n mppt: (() => {\n const modes = String(input.mppt_operation_modes || '')\n .split(',').map(x => x.trim().toLowerCase())\n .filter(x => x && x !== 'unavailable' && x !== 'unknown');\n return {\n total: modes.length,\n aFond: modes.filter(x => x === 'mppt_active').length,\n brides: modes.filter(x => x.includes('limited')).length,\n };\n })(),\n};\n\n// Capacite REELLEMENT livree a la maison, deduite de la courbe mesuree le\n// 03/09 sur 576 paliers et du parc declare. Un US5000 compte pour DEUX\n// equivalents US2000C. Aucune constante : si le parc change, ceci suit.\n// GRANDEURS DERIVEES — on les CALCULE pour lui (12/09/2026, iteration 2).\n// Campagne de rejeu : sur le releve du 03/09 19:44 (PV 758 W, maison 1202 W)\n// il a recommande de charger la voiture a 28 A. Les deux nombres etaient dans\n// son prompt ; il n a pas fait la soustraction. Et sur celui du 05/09 20:40\n// (batterie a -97,4 A pour une limite declaree de 100 A) il a repondu « SOC\n// 79 % est suffisant » sans mentionner ni le courant ni la limite.\n// Un modele raisonne bien sur UN nombre, mal sur deux qu il doit combiner.\n// Meme principe que le bilan : on lui donne la grandeur, pas les ingredients.\nconst maisonHorsVoitureW = Math.max(0, ctx.houseW - (ctx.evcsCharging ? ctx.evcsCurrentA * 230 : 0));\nconst excedentSolaireW = Math.round(ctx.pvW - maisonHorsVoitureW);\nconst margeDechargeA = Number.isFinite(ctx.bmsMaxDischargeA) && Number.isFinite(ctx.batteryCurrentA)\n ? Math.round(ctx.bmsMaxDischargeA - Math.abs(Math.min(0, ctx.batteryCurrentA)))\n : null;\nconst partDuPlafond = Number.isFinite(ctx.bmsMaxDischargeA) && ctx.bmsMaxDischargeA > 0\n ? Math.round(100 * Math.abs(Math.min(0, ctx.batteryCurrentA)) / ctx.bmsMaxDischargeA)\n : null;\n\nconst kwhParPointHaut = 0.169 * ctx.modulesEnService / 7;\nconst kwhParPointBas = 0.097 * ctx.modulesEnService / 7;\nconst capaciteUtileKwh = (67 * kwhParPointHaut + 11 * kwhParPointBas) * 0.955;\n\n// Heure Paris\nconst parisFmt = new Intl.DateTimeFormat('fr-FR', {\n timeZone: 'Europe/Paris',\n weekday: 'long', day: '2-digit', month: '2-digit',\n hour: '2-digit', minute: '2-digit', hour12: false,\n});\nconst nowParis = parisFmt.format(new Date());\n\nconst systemPrompt = [\n \"Tu es le PLANIFICATEUR ENERGIE d'une maison en autoconsommation, en Bretagne.\",\n 'Tu es en MODE OBSERVATION : tes reponses sont enregistrees et comparees au reel,',\n 'elles ne pilotent rien.',\n '',\n 'INSTALLATION, CHIFFRES MESURES (pas des ordres de grandeur) :',\n `- Batterie : ${ctx.modulesEnService} equivalents US2000C, soit ${capaciteUtileKwh.toFixed(1)} kWh`,\n ` reellement livres a la maison entre 100 % et le plancher de securite de 22 %.`,\n ` Un point de SOC vaut ${Math.round(kwhParPointHaut * 1000)} Wh au-dessus de 33 %,`,\n ` ${Math.round(kwhParPointBas * 1000)} Wh en dessous.`,\n '- Champ PV 16,1 kWc sur QUATRE orientations (sud-est 40, sud 35, ouest 45, un suiveur).',\n '- Victron ESS, AUCUNE injection possible : la production est bridee des que rien',\n ' ne peut l absorber. Une PV mesuree basse ne veut donc PAS dire ressource faible.',\n '- Borne EVCS 6-28 A. Reseau EDF commutable, heures creuses 01:24-07:24 et 12:24-14:24.',\n '- Chaque fermeture du contacteur coute 50 a 150 Wh de transitoire : une session',\n ' longue et dimensionnee vaut mieux que des creneaux repetes.',\n '',\n 'LA MAISON, telle qu elle consomme vraiment :',\n '- Quatre personnes. Les gros appels sont BREFS et cales sur les repas :',\n ' bouilloire vers 05:45, grille-pain vers 08:00, cuisson du soir entre 20 h et 23 h.',\n \"- L heure du diner varie de TROIS HEURES d un jour a l autre : un profil horaire\",\n ' moyen ne represente ni l un ni l autre.',\n '',\n 'CE QUI REMPLACE LES REGLES DE SEUIL :',\n 'un bilan energetique tourne toutes les 5 minutes et te donne, pour l instant present,',\n 'l heure de croisement ou la production repassera au-dessus de la consommation,',\n 'l energie que la batterie doit couvrir d ici la, et le SOC qui serait necessaire.',\n 'RAISONNE SUR CES CHIFFRES. Il n existe plus de palier du type',\n '\"prevision forte => cible basse\" : cette regle a ete mesuree fausse sur cette maison.',\n 'Si le bilan est indisponible ou perime, dis-le dans ta raison et reste prudent.',\n '',\n 'CE QUE TU DOIS SAVOIR ET QUE PERSONNE NE TE DIRA AUTREMENT :',\n '- SANS VEHICULE BRANCHE IL Y A QUAND MEME QUELQUE CHOSE A DECIDER : c est la MAISON',\n ' qui doit traverser la nuit. Une batterie au plancher pendant les heures creuses,',\n ' alors que le bilan reclame davantage, est une occasion manquee qui se paiera au',\n ' plein tarif le matin.',\n '- Les chargeurs solaires declarent eux-memes s ils se BRIDENT. Si certains se',\n ' brident, il reste de la ressource REFUSEE : lui donner un preneur (voiture,',\n ' batterie) ne coute rien. S ils sont tous a fond, la production mesuree EST la',\n ' ressource.',\n '- L hiver la nuit a couvrir est plus longue de deux heures en temps solaire : la',\n ' cible du matin y monte naturellement bien plus haut qu en ete.',\n '',\n 'DEUX REGLES QUI PRIMENT SUR TOUT LE RESTE :',\n '1. EXCEDENT SOLAIRE. Charger un vehicule ne se decide pas sur la production',\n ' mais sur ce qui RESTE une fois la maison servie. Cet excedent t est donne',\n ' plus bas. S il est NEGATIF, charger la voiture revient a vider la batterie',\n ' solaire : ne le fais pas, quelle que soit la prevision. S il est nul ou a',\n ' peine positif ALORS QUE DES CHARGEURS SE BRIDENT, la ressource existe mais',\n ' est refusee : la charger est gratuit.',\n '2. LIMITE DU PARC. La marge de decharge restante t est donnee plus bas. Si la',\n ' batterie depasse 80 % de ce que le parc declare accepter, c est un sujet de',\n ' PROTECTION DU MATERIEL, pas de confort : il faut appeler le reseau meme si',\n ' le SOC parait confortable et meme hors heures creuses. Le proprietaire a un',\n ' abonnement 12 kVA et prefere payer quelques kWh plutot que fragiliser le parc.',\n '',\n 'STRATEGIES POSSIBLES :',\n '- auto_solar_plus : automatique, solaire prioritaire, reseau en heures creuses si besoin',\n '- auto_solar : solaire strict, jamais de reseau',\n '- force_grid_now : charge sur reseau EDF, immediate',\n '- force_charge_now : charge locale immediate quelle que soit la source',\n '- stop : tout couper',\n '',\n 'TA MISSION PRINCIPALE : REPERER CE QUI CLOCHE.',\n 'Cinq automates ecrivent sur la meme installation : le controleur EVCS, un',\n 'automate d hysteresis pour le contacteur reseau, un gestionnaire de charge',\n 'batterie, un bilan energetique, et des automatisations Home Assistant. Chacun',\n 'est localement correct et aucun ne voit les autres. Les pannes de ce systeme',\n 'ne sont donc presque jamais des erreurs de calcul : ce sont des CONTRADICTIONS',\n 'entre automates, et elles se voient dans la SUITE des evenements, pas dans',\n 'un instantane.',\n '',\n 'Exemple reel du 12/09 : le contacteur reseau a bascule toutes les 4 minutes',\n 'pendant dix minutes — coupe, remis, coupe. Un automate coupait a 35 % de SOC,',\n 'un autre rallumait. Chacun faisait son travail. Le resultat etait absurde, et',\n 'seul un humain qui regardait l a vu.',\n '',\n 'Un comportement est ABSURDE quand : un actionneur bascule plusieurs fois en',\n 'peu de temps ; deux decisions se contredisent ; une grandeur reste figee alors',\n 'que ce qui la pilote bouge ; une action est repetee sans effet ; une valeur',\n 'contredit ce que le bilan demande.',\n '',\n 'Tu as le DERNIER HISTORIQUE DES EVENEMENTS plus bas. Sers-t en.',\n '',\n 'Reponds UNIQUEMENT avec un objet JSON valide, sans texte autour, au format EXACT :',\n '{\"constat\":\"ce que tu observes, factuel, max 200 caracteres\",',\n '\"gravite\":\"aucune|faible|moyenne|haute\",',\n '\"ce_qui_cloche\":\"la contradiction ou l incoherence, ou \\'\\' si rien\",',\n '\"strategy\":\"auto_solar_plus|auto_solar|force_grid_now|force_charge_now|stop\",',\n '\"night_target_soc\":<entier 22-90>,\"current_max_a\":<entier 6-28>,',\n '\"ev_charge_tonight\":\"oui|non|sans_objet\",\"confidence\":<0.0-1.0>,',\n '\"reason\":\"une phrase courte en francais (max 200 caracteres)\"}',\n '',\n 'gravite \"aucune\" quand tout est coherent — c est le cas le plus frequent et',\n 'il ne faut pas inventer un probleme pour justifier une reponse.',\n].join('\\n');\n\nfunction nombre(v, unite, defaut) {\n return Number.isFinite(v) ? `${v}${unite}` : (defaut || 'inconnu');\n}\n\nconst bilanLignes = ctx.balanceStatus === 'ok'\n ? [\n `- heure de croisement production/consommation : ${ctx.balanceCrossingHour || 'inconnue'}`,\n `- energie que la batterie doit couvrir d ici la : ${nombre(ctx.balanceEnergyToCoverKwh, ' kWh')}`,\n `- SOC qui serait necessaire : ${nombre(ctx.balanceRequiredSoc, ' %')} (prudent : ${nombre(ctx.balanceRequiredSocPrudent, ' %')})`,\n `- reseau juge necessaire : ${ctx.balanceGridNeeded ? 'OUI' : 'non'}${Number.isFinite(ctx.balanceGridEnergyNeededKwh) ? ` (${ctx.balanceGridEnergyNeededKwh} kWh)` : ''}`,\n `- production actuellement bridee : ${ctx.balancePvCensored ? `OUI (${ctx.balanceCensorReason})` : 'non'}`,\n `- manque de stockage identifie : ${nombre(ctx.balanceStorageShortfallKwh, ' kWh')}`,\n `- prochaine traversee deficitaire : ${nombre(ctx.balanceNextDeficitKwh, ' kWh')} ${ctx.balanceNextDeficitWindow || ''}`,\n `- vigilance orage : ${ctx.stormLevel}${Number.isFinite(ctx.stormReserveSoc) ? `, reserve conseillee ${ctx.stormReserveSoc} %` : ''}`,\n `- calcule a ${ctx.balanceLastRun || 'heure inconnue'}`,\n ]\n : [`- INDISPONIBLE (statut ${ctx.balanceStatus}) : raisonne sans lui, et dis-le.`];\n\nconst userPrompt = [\n `Nous sommes ${nowParis} (heure de Paris).`,\n '',\n 'ETAT MESURE :',\n `- Batterie : SOC ${ctx.soc} %, courant ${ctx.batteryCurrentA} A (positif = charge)`,\n `- PV : ${Math.round(ctx.pvW)} W instantane, ${Math.round(ctx.pvAvg10mW)} W sur 10 min`,\n `- Chargeurs solaires : ${ctx.mppt.aFond}/${ctx.mppt.total} a pleine puissance, ${ctx.mppt.brides} qui se BRIDENT`,\n `- Maison : ${Math.round(ctx.houseW)} W, dont voiture ${ctx.evcsCharging ? Math.round(ctx.evcsCurrentA * 230) : 0} W`,\n `- EXCEDENT SOLAIRE (production moins maison hors voiture) : ${excedentSolaireW} W`,\n `- MARGE DE DECHARGE du parc : ${margeDechargeA === null ? 'inconnue' : `${margeDechargeA} A restants`}${partDuPlafond === null ? '' : ` — la batterie est a ${partDuPlafond} % de son plafond`}`,\n `- Contacteur EDF : ${ctx.gridOn ? 'FERME' : 'ouvert'} (AC-IN ${ctx.acinAvailable ? 'present' : 'absent'})`,\n `- Consigne de puissance reseau : ${nombre(ctx.gridSetpointW, ' W')}`,\n `- Limites declarees par le parc : charge ${nombre(ctx.bmsMaxChargeA, ' A')}, decharge ${nombre(ctx.bmsMaxDischargeA, ' A')}`,\n `- Vehicule : ${ctx.vehicleConnected ? `BRANCHE (${ctx.vehicleSelected})` : 'AUCUN branche'}${ctx.evcsCharging ? `, en charge a ${ctx.evcsCurrentA} A` : ''}`,\n `- Controleur : ${ctx.surplusState} | source ${ctx.sourceMode} | strategie reelle ${ctx.userStrategy}`,\n `- Cible SOC matin actuellement appliquee : ${ctx.nightTargetActual} %`,\n `- Prevision : ${ctx.todayRemainingKwh} kWh restant aujourd hui, ${ctx.tomorrowKwh} kWh demain`,\n '',\n 'BILAN ENERGETIQUE :',\n ...bilanLignes,\n '',\n 'DERNIERS EVENEMENTS DU SYSTEME (le plus recent en premier) :',\n ...(ctx.evenements.length ? ctx.evenements : ['- aucun evenement transmis']),\n '',\n 'Quelle est ta recommandation ? JSON uniquement.',\n].join('\\n');\n\nreturn [{\n json: {\n enabled: ctx.advisorEnabled,\n messages: [\n { role: 'system', content: systemPrompt },\n { role: 'user', content: userPrompt },\n ],\n context: ctx,\n }\n}];\n"
|
|
}
|
|
},
|
|
{
|
|
"name": "IF_ENABLED",
|
|
"type": "n8n-nodes-base.if",
|
|
"typeVersion": 2.2,
|
|
"position": [
|
|
600,
|
|
0
|
|
],
|
|
"parameters": {
|
|
"conditions": {
|
|
"options": {
|
|
"caseSensitive": true,
|
|
"leftValue": "",
|
|
"typeValidation": "loose",
|
|
"version": 2
|
|
},
|
|
"combinator": "and",
|
|
"conditions": [
|
|
{
|
|
"leftValue": "={{ $json.enabled }}",
|
|
"rightValue": "",
|
|
"operator": {
|
|
"type": "boolean",
|
|
"operation": "true",
|
|
"singleValue": true
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "LLM_LOCAL_MODELS",
|
|
"type": "n8n-nodes-base.httpRequest",
|
|
"typeVersion": 4.2,
|
|
"position": [
|
|
800,
|
|
-100
|
|
],
|
|
"parameters": {
|
|
"method": "GET",
|
|
"url": "http://10.10.10.8:8000/v1/models",
|
|
"options": {
|
|
"timeout": 5000
|
|
}
|
|
},
|
|
"onError": "continueRegularOutput",
|
|
"alwaysOutputData": true
|
|
},
|
|
{
|
|
"name": "LLM_LOCAL",
|
|
"type": "n8n-nodes-base.httpRequest",
|
|
"typeVersion": 4.2,
|
|
"position": [
|
|
1000,
|
|
-100
|
|
],
|
|
"parameters": {
|
|
"method": "POST",
|
|
"url": "http://10.10.10.8:8000/v1/chat/completions",
|
|
"sendHeaders": true,
|
|
"headerParameters": {
|
|
"parameters": [
|
|
{
|
|
"name": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
]
|
|
},
|
|
"sendBody": true,
|
|
"specifyBody": "json",
|
|
"jsonBody": "={{ JSON.stringify({ model: $('LLM_LOCAL_MODELS').first().json.data[0].id, messages: $('BUILD_PROMPT').first().json.messages, temperature: 0.1, max_tokens: 6000 }) }}",
|
|
"options": {
|
|
"timeout": 120000
|
|
}
|
|
},
|
|
"onError": "continueRegularOutput",
|
|
"alwaysOutputData": true
|
|
},
|
|
{
|
|
"name": "IF_LOCAL_OK",
|
|
"type": "n8n-nodes-base.if",
|
|
"typeVersion": 2.2,
|
|
"position": [
|
|
1200,
|
|
-100
|
|
],
|
|
"parameters": {
|
|
"conditions": {
|
|
"options": {
|
|
"caseSensitive": true,
|
|
"leftValue": "",
|
|
"typeValidation": "loose",
|
|
"version": 2
|
|
},
|
|
"combinator": "and",
|
|
"conditions": [
|
|
{
|
|
"leftValue": "={{ $json.choices !== undefined && $json.choices.length > 0 }}",
|
|
"rightValue": "",
|
|
"operator": {
|
|
"type": "boolean",
|
|
"operation": "true",
|
|
"singleValue": true
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "LLM_CLOUD",
|
|
"type": "n8n-nodes-base.httpRequest",
|
|
"typeVersion": 4.2,
|
|
"position": [
|
|
1400,
|
|
40
|
|
],
|
|
"parameters": {
|
|
"method": "POST",
|
|
"url": "https://openrouter.ai/api/v1/chat/completions",
|
|
"authentication": "genericCredentialType",
|
|
"genericAuthType": "httpHeaderAuth",
|
|
"sendHeaders": true,
|
|
"headerParameters": {
|
|
"parameters": [
|
|
{
|
|
"name": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
]
|
|
},
|
|
"sendBody": true,
|
|
"specifyBody": "json",
|
|
"jsonBody": "={{ JSON.stringify({ model: 'anthropic/claude-haiku-4.5', messages: $('BUILD_PROMPT').first().json.messages, temperature: 0.1, max_tokens: 1000 }) }}",
|
|
"options": {
|
|
"timeout": 60000
|
|
}
|
|
},
|
|
"credentials": {
|
|
"httpHeaderAuth": {
|
|
"id": "eOM9xofDHT0KMoeY",
|
|
"name": "OpenRouter Advisor"
|
|
}
|
|
},
|
|
"onError": "continueRegularOutput",
|
|
"alwaysOutputData": true
|
|
},
|
|
{
|
|
"name": "VALIDATE_PARSE",
|
|
"type": "n8n-nodes-base.code",
|
|
"typeVersion": 2,
|
|
"position": [
|
|
1600,
|
|
-30
|
|
],
|
|
"parameters": {
|
|
"jsCode": "// =====================================================\n// EVCS ADVISOR SHADOW V1 — VALIDATE_PARSE\n// Valide STRICTEMENT la sortie LLM (locale OU cloud, format OpenAI).\n// Sortie invalide = REJET TOTAL (status invalid), jamais de clamp silencieux.\n// =====================================================\n\nconst resp = $input.first().json;\nconst context = $('BUILD_PROMPT').first().json.context;\n\nconst STRATEGIES = ['auto_solar_plus', 'auto_solar', 'force_grid_now', 'force_charge_now', 'stop'];\nconst TONIGHT = ['oui', 'non', 'sans_objet'];\n\nfunction fail(status, detail) {\n return [{\n json: {\n status,\n detail: (detail || '').toString().slice(0, 200),\n advice: null,\n modelUsed: (resp?.model || 'aucun').toString().slice(0, 60),\n context,\n }\n }];\n}\n\n// 1. Réponse LLM présente ? (les deux backends ont échoué => item d'erreur n8n)\nconst content = resp?.choices?.[0]?.message?.content;\nif (typeof content !== 'string' || !content.trim()) {\n return fail('llm_offline', resp?.error?.message || resp?.error || 'aucune réponse LLM');\n}\n\n// 2. Nettoyage : balises de raisonnement (<think>...</think>) et fences markdown\nlet text = content\n .replace(/<think>[\\s\\S]*?<\\/think>/gi, '')\n .replace(/```(?:json)?/gi, '')\n .trim();\n\n// 3. Extraction du premier objet JSON équilibré\nconst start = text.indexOf('{');\nif (start === -1) return fail('invalid', 'aucun JSON dans la réponse');\nlet depth = 0, end = -1;\nfor (let i = start; i < text.length; i++) {\n if (text[i] === '{') depth++;\n else if (text[i] === '}') { depth--; if (depth === 0) { end = i; break; } }\n}\nif (end === -1) return fail('invalid', 'JSON non terminé');\n\nlet obj;\ntry {\n obj = JSON.parse(text.slice(start, end + 1));\n} catch (e) {\n return fail('invalid', `JSON invalide: ${e.message}`);\n}\n\n// 4. Validation stricte du schéma (enums + bornes)\nconst strategy = (obj.strategy ?? '').toString().trim().toLowerCase();\nif (!STRATEGIES.includes(strategy)) return fail('invalid', `strategy hors enum: ${strategy}`);\n\nconst nightTargetRaw = Number(obj.night_target_soc);\nconst nightTargetValide = Number.isFinite(nightTargetRaw) && nightTargetRaw >= 22 && nightTargetRaw <= 90;\nconst nightTarget = nightTargetValide ? nightTargetRaw : null;\n\n// ⚠️ L OBSERVATION NE DOIT PAS ETRE PERDUE A CAUSE D UN CHAMP D ACTION.\n// Essai du 12/09 : sur l oscillation du contacteur, le modele a produit un\n// constat JUSTE (« bascule toutes les 1-2 min depuis 06:25, gravite haute »)\n// ET un `current_max_a` de 100, hors bornes. Une validation tout-ou-rien\n// jetait le diagnostic avec le champ fautif — c est-a-dire exactement ce\n// qu on lui demande, perdu a cause de ce qu on ne lui demande plus.\n// Les champs d ACTION restent bornes aussi strictement qu avant ; seulement,\n// hors bornes, ils sont NEUTRALISES au lieu de faire echouer le constat.\nconst currentMaxRaw = Number(obj.current_max_a);\nconst currentMaxValide = Number.isFinite(currentMaxRaw) && currentMaxRaw >= 6 && currentMaxRaw <= 28;\nconst currentMax = currentMaxValide ? currentMaxRaw : null;\n\nconst tonight = (obj.ev_charge_tonight ?? '').toString().trim().toLowerCase();\nif (!TONIGHT.includes(tonight)) return fail('invalid', `ev_charge_tonight hors enum: ${tonight}`);\n\nconst confidence = Number(obj.confidence);\nif (!Number.isFinite(confidence) || confidence < 0 || confidence > 1) {\n return fail('invalid', `confidence hors bornes: ${obj.confidence}`);\n}\n\nconst reason = (obj.reason ?? '').toString().trim();\nif (!reason) return fail('invalid', 'reason vide');\n\n// ── OBSERVATION (12/09/2026) ───────────────────────────────────────────\n// La mission principale du conseiller n est plus de choisir une strategie\n// parmi cinq, mais de REPERER CE QUI CLOCHE. Les pannes de ce systeme sont\n// des contradictions entre automates — chacun localement correct — et elles\n// ne se voient que dans la suite des evenements. Le 12/09 le contacteur\n// reseau a bascule toutes les 4 minutes pendant dix minutes : aucun automate\n// ne l a vu, un humain oui.\nconst GRAVITES = ['aucune', 'faible', 'moyenne', 'haute'];\nconst constat = (obj.constat ?? '').toString().trim();\nif (!constat) return fail('invalid', 'constat vide');\nconst gravite = (obj.gravite ?? '').toString().trim().toLowerCase();\nif (!GRAVITES.includes(gravite)) return fail('invalid', `gravite hors enum: ${obj.gravite}`);\nconst ceQuiCloche = (obj.ce_qui_cloche ?? '').toString().trim();\n\nreturn [{\n json: {\n status: 'ok',\n detail: '',\n advice: {\n constat: constat.slice(0, 200),\n gravite,\n ceQuiCloche: ceQuiCloche.slice(0, 200),\n strategy,\n nightTargetSoc: nightTarget === null ? null : Math.round(nightTarget),\n currentMaxA: currentMax === null ? null : Math.round(currentMax),\n // Vrai seulement si TOUS les champs d action sont dans leurs bornes.\n // C est ce drapeau, et lui seul, qui autoriserait un jour un cablage.\n actionUtilisable: currentMaxValide && nightTargetValide,\n evChargeTonight: tonight,\n confidence: Math.round(confidence * 100) / 100,\n reason: reason.slice(0, 250),\n },\n modelUsed: (resp.model || 'inconnu').toString().slice(0, 60),\n context,\n }\n}];\n"
|
|
}
|
|
},
|
|
{
|
|
"name": "BUILD_HA_CALLS",
|
|
"type": "n8n-nodes-base.code",
|
|
"typeVersion": 2,
|
|
"position": [
|
|
1800,
|
|
-30
|
|
],
|
|
"parameters": {
|
|
"jsCode": "// =====================================================\n// EVCS ADVISOR SHADOW V1 — BUILD_HA_CALLS\n// Écrit les helpers advisor_* + divergence + compteurs + logbook.\n// GARANTIE MODE OMBRE : ce node ne produit QUE des écritures vers\n// des entités advisor_* et le logbook. AUCUN switch, AUCUNE stratégie\n// réelle, AUCUNE commande borne. Ne pas ajouter d'autres entités ici.\n// =====================================================\n\nconst { status, detail, advice, modelUsed, context } = $input.first().json;\n\nfunction stampParis() {\n const p = new Intl.DateTimeFormat('fr-FR', {\n timeZone: 'Europe/Paris', day: '2-digit', month: '2-digit',\n hour: '2-digit', minute: '2-digit', hour12: false,\n }).formatToParts(new Date());\n const g = t => p.find(x => x.type === t)?.value || '';\n return `${g('day')}/${g('month')} ${g('hour')}:${g('minute')}`;\n}\n\nconst calls = [];\nfunction push(domain, service, data) {\n calls.push({ json: { domain, service, data } });\n}\nfunction setText(entity, value) {\n push('input_text', 'set_value', { entity_id: entity, value: (value ?? '').toString().slice(0, 250) });\n}\nfunction setNumber(entity, value) {\n push('input_number', 'set_value', { entity_id: entity, value });\n}\n\n// Statut + horodatage + modèle : écrits à CHAQUE run\nsetText('input_text.evcs_advisor_status', status + (detail ? `: ${detail}` : ''));\nsetText('input_text.evcs_advisor_last_run', stampParis());\nsetText('input_text.evcs_advisor_model', modelUsed);\n\nif (status === 'ok' && advice) {\n // Observation — la sortie principale desormais.\n setText('input_text.evcs_advisor_constat', advice.constat);\n setText('input_text.evcs_advisor_gravite', advice.gravite);\n setText('input_text.evcs_advisor_ce_qui_cloche', advice.ceQuiCloche || 'rien de signale');\n\n // Recommandations\n setText('input_text.evcs_advisor_strategy', advice.strategy);\n // Les champs d action ne sont publies que s ils sont exploitables : un\n // helper numerique ne doit jamais porter une valeur hors bornes.\n if (advice.actionUtilisable) {\n setNumber('input_number.evcs_advisor_night_target_soc', advice.nightTargetSoc);\n setNumber('input_number.evcs_advisor_current_max_a', advice.currentMaxA);\n }\n setText('input_text.evcs_advisor_ev_charge_tonight', advice.evChargeTonight);\n setText('input_text.evcs_advisor_reason', `[${Math.round(advice.confidence * 100)}%] ${advice.reason}`);\n\n // Divergence vs réel (stratégie + cible nuit)\n const diffs = [];\n if (advice.strategy !== context.userStrategy) {\n diffs.push(`stratégie: agent=${advice.strategy} ≠ réel=${context.userStrategy}`);\n }\n if (Math.abs(advice.nightTargetSoc - context.nightTargetActual) > 10) {\n diffs.push(`cible nuit: agent=${advice.nightTargetSoc}% vs réel=${context.nightTargetActual}%`);\n }\n const divergenceText = diffs.length ? diffs.join(' | ') : 'accord avec le réel';\n setText('input_text.evcs_advisor_divergence', divergenceText);\n\n // ⚠️ LE COMPTEUR MESURAIT LE MAUVAIS CHAMP (corrige le 12/09/2026).\n // Il comparait la STRATEGIE, qui vaut `auto_solar_plus` la quasi-totalite du\n // temps : 517 accords contre 23 divergences, soit 95,7 % — un score qui\n // mesurait une constante, pas une decision. Pendant ce temps la cible SOC,\n // seul champ reellement cable, divergeait de treize points du bilan sans\n // que rien ne le compte (12/09 05:30 : conseiller 35 %, bilan 48,4 %).\n //\n // On compte desormais l'accord sur la CIBLE, et contre le BILAN — la\n // reference, pas contre la valeur appliquee qui peut elle-meme etre fausse.\n // Bilan indisponible => on ne compte rien plutot que de compter faux.\n const refSoc = Number(context.balanceRequiredSoc);\n const bilanUtilisable = advice.actionUtilisable && context.balanceStatus === 'ok' && Number.isFinite(refSoc);\n if (bilanUtilisable) {\n const ecart = Math.abs(advice.nightTargetSoc - refSoc);\n if (ecart <= 5) {\n setNumber('input_number.evcs_advisor_agree_count', context.agreeCount + 1);\n } else {\n setNumber('input_number.evcs_advisor_diverge_count', context.divergeCount + 1);\n }\n setText(\n 'input_text.evcs_advisor_divergence',\n `cible: agent=${advice.nightTargetSoc}% vs bilan=${Math.round(refSoc)}% (ecart ${Math.round(ecart)} pts)`\n + (diffs.length ? ` | ${diffs.join(' | ')}` : '')\n );\n }\n\n // Trace logbook pour l'historique long terme\n push('logbook', 'log', {\n name: 'EVCS Advisor (ombre)',\n message: `[${advice.gravite}] ${advice.constat}${advice.ceQuiCloche ? ` || ${advice.ceQuiCloche}` : ''} || ${advice.strategy} | cible nuit ${advice.nightTargetSoc}% | ${advice.evChargeTonight === 'oui' ? 'charge VE cette nuit' : advice.evChargeTonight === 'non' ? 'pas de charge nuit' : 'VE sans objet'} | ${divergenceText} | ${advice.reason}`,\n entity_id: 'input_text.evcs_advisor_strategy',\n });\n}\n\nreturn calls;\n"
|
|
}
|
|
},
|
|
{
|
|
"name": "Execute HA Service Advisor",
|
|
"type": "n8n-nodes-base.httpRequest",
|
|
"typeVersion": 4.2,
|
|
"position": [
|
|
2000,
|
|
-30
|
|
],
|
|
"parameters": {
|
|
"method": "POST",
|
|
"url": "={{ 'http://10.10.10.17:8123/api/services/' + $json.domain + '/' + $json.service }}",
|
|
"authentication": "genericCredentialType",
|
|
"genericAuthType": "httpBearerAuth",
|
|
"sendHeaders": true,
|
|
"headerParameters": {
|
|
"parameters": [
|
|
{
|
|
"name": "Content-Type",
|
|
"value": "application/json"
|
|
},
|
|
{
|
|
"name": "accept",
|
|
"value": "application/json"
|
|
}
|
|
]
|
|
},
|
|
"sendBody": true,
|
|
"specifyBody": "json",
|
|
"jsonBody": "={{ $json.data }}",
|
|
"options": {
|
|
"timeout": 15000
|
|
}
|
|
},
|
|
"credentials": {
|
|
"httpBearerAuth": {
|
|
"id": "uv3sknYYigxBkaVN",
|
|
"name": "Bearer Auth account 2"
|
|
}
|
|
},
|
|
"onError": "continueRegularOutput"
|
|
}
|
|
],
|
|
"connections": {
|
|
"Schedule Trigger": {
|
|
"main": [
|
|
[
|
|
{
|
|
"node": "HA Snapshot Advisor",
|
|
"type": "main",
|
|
"index": 0
|
|
}
|
|
]
|
|
]
|
|
},
|
|
"HA Snapshot Advisor": {
|
|
"main": [
|
|
[
|
|
{
|
|
"node": "BUILD_PROMPT",
|
|
"type": "main",
|
|
"index": 0
|
|
}
|
|
]
|
|
]
|
|
},
|
|
"BUILD_PROMPT": {
|
|
"main": [
|
|
[
|
|
{
|
|
"node": "IF_ENABLED",
|
|
"type": "main",
|
|
"index": 0
|
|
}
|
|
]
|
|
]
|
|
},
|
|
"IF_ENABLED": {
|
|
"main": [
|
|
[
|
|
{
|
|
"node": "LLM_LOCAL_MODELS",
|
|
"type": "main",
|
|
"index": 0
|
|
}
|
|
],
|
|
[]
|
|
]
|
|
},
|
|
"LLM_LOCAL_MODELS": {
|
|
"main": [
|
|
[
|
|
{
|
|
"node": "LLM_LOCAL",
|
|
"type": "main",
|
|
"index": 0
|
|
}
|
|
]
|
|
]
|
|
},
|
|
"LLM_LOCAL": {
|
|
"main": [
|
|
[
|
|
{
|
|
"node": "IF_LOCAL_OK",
|
|
"type": "main",
|
|
"index": 0
|
|
}
|
|
]
|
|
]
|
|
},
|
|
"IF_LOCAL_OK": {
|
|
"main": [
|
|
[
|
|
{
|
|
"node": "VALIDATE_PARSE",
|
|
"type": "main",
|
|
"index": 0
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"node": "LLM_CLOUD",
|
|
"type": "main",
|
|
"index": 0
|
|
}
|
|
]
|
|
]
|
|
},
|
|
"LLM_CLOUD": {
|
|
"main": [
|
|
[
|
|
{
|
|
"node": "VALIDATE_PARSE",
|
|
"type": "main",
|
|
"index": 0
|
|
}
|
|
]
|
|
]
|
|
},
|
|
"VALIDATE_PARSE": {
|
|
"main": [
|
|
[
|
|
{
|
|
"node": "BUILD_HA_CALLS",
|
|
"type": "main",
|
|
"index": 0
|
|
}
|
|
]
|
|
]
|
|
},
|
|
"BUILD_HA_CALLS": {
|
|
"main": [
|
|
[
|
|
{
|
|
"node": "Execute HA Service Advisor",
|
|
"type": "main",
|
|
"index": 0
|
|
}
|
|
]
|
|
]
|
|
}
|
|
},
|
|
"settings": {
|
|
"executionOrder": "v1",
|
|
"callerPolicy": "workflowsFromSameOwner"
|
|
},
|
|
"staticData": null,
|
|
"id": "tdfInZns7cqo8fU2"
|
|
}
|