Hello guest, if you read this it means you are not registered. Click here to register in a few simple steps, you will enjoy all features of our Forum.
Hi Guest this is an announcement for guests !!!

Note de ce sujet :
  • Moyenne : 0 (0 vote(s))
  • 1
  • 2
  • 3
  • 4
  • 5
Récupération infos EW10a, mise en page et transmission MQTT
#15
Alors pour le QPIGS PV1

Code :
[
    {
        "id": "2ca98cc842fe98dd",
        "type": "tab",
        "label": "QPIGSPV1",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "bb2f093350eaec50",
        "type": "inject",
        "z": "2ca98cc842fe98dd",
        "name": "QPIGSPV1",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "37",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 110,
        "y": 160,
        "wires": [
            [
                "4eb671e9671bf9b7"
            ]
        ]
    },
    {
        "id": "84759e218920555c",
        "type": "function",
        "z": "2ca98cc842fe98dd",
        "name": "TCP Server Adress",
        "func": "msg.host = \"192.168.X.XXX\" ;\nmsg.port = \"7777\" ;\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 510,
        "y": 160,
        "wires": [
            [
                "10ebdc89680b12e7",
                "98c06370bef5ef18"
            ]
        ]
    },
    {
        "id": "10ebdc89680b12e7",
        "type": "debug",
        "z": "2ca98cc842fe98dd",
        "name": "msg",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 690,
        "y": 40,
        "wires": []
    },
    {
        "id": "98c06370bef5ef18",
        "type": "tcp request",
        "z": "2ca98cc842fe98dd",
        "name": "Onduleur TCIP",
        "server": "",
        "port": "",
        "out": "time",
        "ret": "string",
        "splitc": "0",
        "newline": "",
        "trim": false,
        "tls": "",
        "x": 720,
        "y": 160,
        "wires": [
            [
                "7be2375c0d87092b",
                "d76a3f354a1061b6"
            ]
        ]
    },
    {
        "id": "7be2375c0d87092b",
        "type": "debug",
        "z": "2ca98cc842fe98dd",
        "name": "Onduleur",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 880,
        "y": 40,
        "wires": []
    },
    {
        "id": "4eb671e9671bf9b7",
        "type": "change",
        "z": "2ca98cc842fe98dd",
        "name": "QPIGS MPPT1",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "[81,80,73,71,83,183,169,13]",
                "tot": "bin"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 300,
        "y": 160,
        "wires": [
            [
                "84759e218920555c"
            ]
        ]
    },
    {
        "id": "dd0269cc9af58291",
        "type": "mqtt out",
        "z": "2ca98cc842fe98dd",
        "name": "MQTT",
        "topic": "",
        "qos": "0",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "efc5bdb3115a929b",
        "x": 1730,
        "y": 40,
        "wires": []
    },
    {
        "id": "d76a3f354a1061b6",
        "type": "change",
        "z": "2ca98cc842fe98dd",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "$substringBefore($substringAfter($$.payload, \"(\"),\"��\")",
                "tot": "jsonata"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 940,
        "y": 160,
        "wires": [
            [
                "31c2626a7557ccf8"
            ]
        ]
    },
    {
        "id": "31c2626a7557ccf8",
        "type": "csv",
        "z": "2ca98cc842fe98dd",
        "name": "",
        "sep": " ",
        "hdrin": "",
        "hdrout": "none",
        "multi": "one",
        "ret": "\\n",
        "temp": "Grid-Voltage,Grid-Frequency,AC-Output-Voltage,AC-Output-Frequency,AC-Output-AppPower,AC-Output-ActivPower,Output-Load-Percent,Bus-Voltage,Battery-Voltage,Battery-Charging-Current,Battery-Capacity,Inverter-Temperature,PV1-Input-Current,PV1-Input-Voltage,Battery-Voltage-SOC,Battery-Discharge-Current,p,q,r,PV1-Charging-Power,t,u,v,w",
        "skip": "0",
        "strings": true,
        "include_empty_strings": "",
        "include_null_values": "",
        "x": 1090,
        "y": 160,
        "wires": [
            [
                "33bdcc643ff92f79"
            ]
        ]
    },
    {
        "id": "33bdcc643ff92f79",
        "type": "split",
        "z": "2ca98cc842fe98dd",
        "name": "",
        "splt": "\\n",
        "spltType": "str",
        "arraySplt": 1,
        "arraySpltType": "len",
        "stream": false,
        "addname": "",
        "x": 1230,
        "y": 160,
        "wires": [
            [
                "5d7d8b5fa42333b4"
            ]
        ]
    },
    {
        "id": "5d7d8b5fa42333b4",
        "type": "change",
        "z": "2ca98cc842fe98dd",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "topic",
                "pt": "msg",
                "to": "\"homeassistant/sensor/ElfinEW10/\" & $$.parts.key",
                "tot": "jsonata"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1380,
        "y": 160,
        "wires": [
            [
                "2917b89b0a387815",
                "dd0269cc9af58291"
            ]
        ]
    },
    {
        "id": "2917b89b0a387815",
        "type": "debug",
        "z": "2ca98cc842fe98dd",
        "name": "mqtt node",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1610,
        "y": 160,
        "wires": []
    },
    {
        "id": "efc5bdb3115a929b",
        "type": "mqtt-broker",
        "name": "XXXXXXXXX",
        "broker": "192.168.X.XXXX",
        "port": "1883",
        "clientid": "",
        "autoConnect": true,
        "usetls": false,
        "protocolVersion": "4",
        "keepalive": "60",
        "cleansession": true,
        "birthTopic": "",
        "birthQos": "0",
        "birthRetain": "false",
        "birthPayload": "",
        "birthMsg": {},
        "closeTopic": "",
        "closeQos": "0",
        "closeRetain": "false",
        "closePayload": "",
        "closeMsg": {},
        "willTopic": "",
        "willQos": "0",
        "willRetain": "false",
        "willPayload": "",
        "willMsg": {},
        "userProps": "",
        "sessionExpiry": ""
    }
]

Puis le QPIGS PV2

Code :
[
    {
        "id": "a29a0e1aad8f15cc",
        "type": "tab",
        "label": "QPIGSPV2",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "6317d252fda36dc0",
        "type": "tcp request",
        "z": "a29a0e1aad8f15cc",
        "name": "Onduleur TCIP",
        "server": "",
        "port": "",
        "out": "time",
        "ret": "string",
        "splitc": "0",
        "newline": "",
        "trim": false,
        "tls": "",
        "x": 720,
        "y": 160,
        "wires": [
            [
                "7cb907b69c901a01"
            ]
        ]
    },
    {
        "id": "8ea6404b0fc57451",
        "type": "function",
        "z": "a29a0e1aad8f15cc",
        "name": "TCP Server Adress",
        "func": "msg.host = \"192.168.X.XXX\" ;\nmsg.port = \"7777\" ;\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 490,
        "y": 160,
        "wires": [
            [
                "6317d252fda36dc0"
            ]
        ]
    },
    {
        "id": "347e71af1076ee06",
        "type": "change",
        "z": "a29a0e1aad8f15cc",
        "name": "QPIGS MPPT2",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "[81,80,73,71,83,50,104,45,13]",
                "tot": "bin"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 280,
        "y": 160,
        "wires": [
            [
                "8ea6404b0fc57451"
            ]
        ]
    },
    {
        "id": "dc6a06cd516c1b20",
        "type": "inject",
        "z": "a29a0e1aad8f15cc",
        "name": "QPIGSPV2",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "35",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 110,
        "y": 160,
        "wires": [
            [
                "347e71af1076ee06"
            ]
        ]
    },
    {
        "id": "7cb907b69c901a01",
        "type": "change",
        "z": "a29a0e1aad8f15cc",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "$substringBefore($substringAfter($$.payload, \"(\"),\"��\")",
                "tot": "jsonata"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 960,
        "y": 160,
        "wires": [
            [
                "72dd916b368614b9"
            ]
        ]
    },
    {
        "id": "72dd916b368614b9",
        "type": "csv",
        "z": "a29a0e1aad8f15cc",
        "name": "",
        "sep": " ",
        "hdrin": "",
        "hdrout": "none",
        "multi": "one",
        "ret": "\\n",
        "temp": "PV2-Input-Current, PV2-Input-Voltage,PV2-Charging-Power",
        "skip": "0",
        "strings": true,
        "include_empty_strings": "",
        "include_null_values": "",
        "x": 1110,
        "y": 160,
        "wires": [
            [
                "5e3aeabd48ec2d5f"
            ]
        ]
    },
    {
        "id": "5e3aeabd48ec2d5f",
        "type": "split",
        "z": "a29a0e1aad8f15cc",
        "name": "",
        "splt": "\\n",
        "spltType": "str",
        "arraySplt": 1,
        "arraySpltType": "len",
        "stream": false,
        "addname": "",
        "x": 1250,
        "y": 160,
        "wires": [
            [
                "98ce508698d9f0bb"
            ]
        ]
    },
    {
        "id": "98ce508698d9f0bb",
        "type": "change",
        "z": "a29a0e1aad8f15cc",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "topic",
                "pt": "msg",
                "to": "\"homeassistant/sensor/ElfinEW10/\" & $$.parts.key",
                "tot": "jsonata"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1400,
        "y": 160,
        "wires": [
            [
                "c4b0d4b4ddb136af",
                "d7537940938cd039"
            ]
        ]
    },
    {
        "id": "d7537940938cd039",
        "type": "mqtt out",
        "z": "a29a0e1aad8f15cc",
        "name": "MQTT",
        "topic": "",
        "qos": "0",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "efc5bdb3115a929b",
        "x": 1750,
        "y": 40,
        "wires": []
    },
    {
        "id": "c4b0d4b4ddb136af",
        "type": "debug",
        "z": "a29a0e1aad8f15cc",
        "name": "mqtt node",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1630,
        "y": 160,
        "wires": []
    },
    {
        "id": "efc5bdb3115a929b",
        "type": "mqtt-broker",
        "name": "XXXXX",
        "broker": "192.168.X.XXXX",
        "port": "1883",
        "clientid": "",
        "autoConnect": true,
        "usetls": false,
        "protocolVersion": "4",
        "keepalive": "60",
        "cleansession": true,
        "birthTopic": "",
        "birthQos": "0",
        "birthRetain": "false",
        "birthPayload": "",
        "birthMsg": {},
        "closeTopic": "",
        "closeQos": "0",
        "closeRetain": "false",
        "closePayload": "",
        "closeMsg": {},
        "willTopic": "",
        "willQos": "0",
        "willRetain": "false",
        "willPayload": "",
        "willMsg": {},
        "userProps": "",
        "sessionExpiry": ""
    }
]

Dans la config.yml de HA :

Code :
mqtt:
  sensor:
    - name: "Grid-Voltage"
      state_topic: "homeassistant/sensor/ElfinEW10/Grid-Voltage"
      unit_of_measurement: "V"
      device_class: voltage
      #value_template: '{{ payload }}'
     
    - name: "Inverter-Temperature"
      state_topic: "homeassistant/sensor/ElfinEW10/Inverter-Temperature"
      unit_of_measurement: "°C"
      device_class: temperature
      #value_template: '{{ payload }}'
     
    - name: "AC-Output-AppPower"
      state_topic: "homeassistant/sensor/ElfinEW10/AC-Output-AppPower"
      unit_of_measurement: "VA"
      device_class: apparent_power
      #value_template: '{{ payload }}'
     
    - name: "Output-Load-Percent"
      state_topic: "homeassistant/sensor/ElfinEW10/Output-Load-Percent"
      unit_of_measurement: "%"
      device_class: battery
      #value_template: '{{ payload }}'
     
    - name: "PV1-Input-Current"
      state_topic: "homeassistant/sensor/ElfinEW10/PV1-Input-Current"
      unit_of_measurement: "A"
      device_class: current
      #value_template: '{{ payload }}'
     
    - name: "PV2-Input-Current"
      state_topic: "homeassistant/sensor/ElfinEW10/PV2-Input-Current"
      unit_of_measurement: "A"
      device_class: current
      #value_template: '{{ payload }}'
     
    - name: "PV2-Input-Voltage"
      state_topic: "homeassistant/sensor/ElfinEW10/PV2-Input-Voltage"
      unit_of_measurement: "V"
      device_class: voltage
      #value_template: '{{ payload }}'
     
    - name: "PV2-Charging-Power"
      state_topic: "homeassistant/sensor/ElfinEW10/PV2-Charging-Power"
      unit_of_measurement: "W"
      device_class: power
      #value_template: '{{ payload }}'
     

Pour les jauges c'est sur HACS - frontend - flexible horseshoe

https://github.com/AmoebeLabs/flex-horseshoe-card

Pour la jauge qui ajoute PV1+PV2, il faut créer un template sensor :

Code :
template:

  - sensor:
    #################################################
    #####              Onduleur                  ####
    #################################################
   
      - name: "PV Puissance Totale"
        unit_of_measurement: "W"
        device_class: power
        state: >
          {{ [ states('sensor.pv2_charging_power'),
               states('sensor.onduleur_pv_watt') ]
               | map('float') | sum }}
        availability: >
          {{ not 'unavailable' in
             [ states('sensor.pv2_charging_power'),
               states('sensor.onduleur_pv_watt') ] }}
   

pour la puissance cumulée PV1, PV2 et PV totale j'ai créé des utility meter :

Code :
utility_meter:
  energie_jour_pv1:
    source: sensor.consommation_pv1
    cycle: daily
  energie_mois_pv1:
    source: sensor.consommation_pv1
    cycle: monthly
  energie_annuelle_pv1:
    source: sensor.consommation_pv1
    cycle: yearly
  energie_jour_pv2:
    source: sensor.consommation_pv2
    cycle: daily
  energie_mois_pv2:
    source: sensor.consommation_pv2
    cycle: monthly
  energie_annuelle_pv2:
    source: sensor.consommation_pv2
    cycle: yearly
  energie_jour_pvtotal:
    source: sensor.consommation_pv_totale
    cycle: daily
  energie_mois_pvtotal:
    source: sensor.consommation_pv_totale
    cycle: monthly
  energie_annuelle_pvtotal:
    source: sensor.consommation_pv_totale
    cycle: yearly

Les sensor.consommation ont été créés dans :
paramètres - appareils et services - Entrées - Créer une entrée - intégrale Capteur d'intégrale de Reimann

Amuse toi bien
Like Répondre


Messages dans ce sujet
RE: Récupération infos EW10a, mise en page et transmission MQTT - par Septain21 - 01-03-2023, 11:53 PM

Sujets apparemment similaires…
Sujet Auteur Réponses Affichages Dernier message
  Récupération Topics BMS Seplos via NodeRed Jeff 13 9,083 04-11-2023, 10:30 AM
Dernier message: Jeff

Atteindre :


Utilisateur(s) parcourant ce sujet : 1 visiteur(s)
[-]
discussions récentes
pv month anomalie
Merci pour l'info  j'ai cré...Chassin — 01:50 PM
pv month anomalie
Tout dépend si c'est l'onduleu...Tapion — 12:55 PM
pv month anomalie
Bonjour, Je pense que c'est...claude47 — 12:47 PM
pv month anomalie
Bonjour, Juste pour signaler ...Chassin — 12:07 PM
Autosuffisance
Bonsoir, ok non pas urgent!...Chassin — 11:59 PM
Autosuffisance
Salut si tu n'ai pas a la seco...Tapion — 11:11 PM
Autosuffisance
Bonjour, Dans le panneaux d...Chassin — 06:13 PM
Un mini ordinateur pour suppo...
A mini computer is perfect for...hummble98 — 07:30 AM
Jkbms et wks circle
Bonjour, merci pour ton aide. ...Mic8925 — 10:44 PM
Voici une toute nouvelle vers...
oui par mp oui par mpclaude47 — 10:19 PM
Wallbox DYI 32 Ampères avec g...
Bonjour à tous, super projet,...Vangelius — 07:46 PM

[-]
Rechercher








(Advanced Search)

[-]
Who's Online
There are currently no members online.

[-]
goals
77.6% of the way to our goal of 10,000 posts!
Only 2,238 posts left to go!

[-]
Statistics
» Members: 989
» Latest member: Mervp5566
» Forum threads: 831
» Forum posts: 7,762

Full Statistics

[-]
Latest Threads
pv month anomalie
Last Post: Chassin
Aujourd’hui 01:50 PM
» Replies: 3
» Views: 53
Autosuffisance
Last Post: Chassin
Hier 11:59 PM
» Replies: 2
» Views: 64
Un mini ordinateur pour supporter home a...
Last Post: hummble98
Hier 07:30 AM
» Replies: 15
» Views: 11467
Jkbms et wks circle
Last Post: Mic8925
29-03-2026 10:44 PM
» Replies: 12
» Views: 1668
Voici une toute nouvelle version de Smar...
Last Post: claude47
29-03-2026 10:19 PM
» Replies: 51
» Views: 4322
Wallbox DYI 32 Ampères avec gestion dyna...
Last Post: Vangelius
29-03-2026 07:46 PM
» Replies: 57
» Views: 27850
Plusieurs compteurs à zéro depuis mise à...
Last Post: Chassin
29-03-2026 06:48 PM
» Replies: 14
» Views: 554
modification smartphon
Last Post: Sylvain
29-03-2026 01:50 PM
» Replies: 18
» Views: 1300
limiter la charge des batteries
Last Post: Laurentcls
26-03-2026 11:13 PM
» Replies: 1
» Views: 151
Ma Borne DIY ETEK EKEPC2-S
Last Post: Patrick56
25-03-2026 07:23 PM
» Replies: 41
» Views: 27380

>