edterbak / NodeRed_Heishamon_control

a Node Red flow to interact with Heishamon (a panasonic heatpump through an ESP board)
41 stars 7 forks source link

Input solarpower for the Solar²DHW function #170

Open plutoarko opened 2 months ago

plutoarko commented 2 months ago

Please, where can I find the input for the current solar power for the Solar²DHW function? In which tab ? What is the name of the node?

Thank you very much Edit: I forgot i am using Flow version 24.03 Stable

edterbak commented 2 months ago

Hi, sorry for the late reply

Can you tell me if you have the P1 meter information comming in Node Red? If so, you need to connect it in the tab WP Input:

image

When you have done this... very logicly (NOT!!) you need to go in the System > Sensor tab Next you need to reset the sensor by clicking one the trashcan for both P1's once. After that you need to wait until the first readings come in. When the readings come in, y ou can select the correct topic / value in the dropdown on the left side. See the below image: image

After that you also need to check the tab: Solar2DHW > P1 Setup. when sensor values come it, it can be that the values are not correct, like 1000x to large or small. You can correct it here.

It is not all that intuitive. It is the result of incremental development. But it should work in the end.

I am moving things arouund to make it easier.

plutoarko commented 2 months ago

Hi , It was a quick answer, thank you.I have brought the output from the power measurement to the WP input tab. I'm sure you can see it.  But I can't connect it to P1 power production. That doesn't work somehow. There is a linkout_83 connection. Do I have to remove the link first? Lots of questions... Nevertheless, thank you very much for your great work.

Am Samstag, 21. September 2024 um 23:13:47 MESZ hat Ed ter Bak ***@***.***> Folgendes geschrieben:   

Hi, sorry for the late reply

Can you tell me if you have the P1 meter information comming in Node Red? If so, you need to connect it in the tab WP Input:

image.png (view on web)

When you have done this... very logicly (NOT!!) you need to go in the System > Sensor tab Next you need to reset the sensor by clicking one the trashcan for both P1's once. After that you need to wait until the first readings come in. When the readings come in, y ou can select the correct topic / value in the dropdown on the left side.

Also, you need to check the tab: Solar2DHW > P1 Setup. when sensor values come it, it can be that the values are not correct, like 1000x to large or small. You can correct it here.

It is not all that intuitive. It is the result of incremental development. But it should work in the end.

I am moving things arouund to make it easier.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

edterbak commented 2 months ago

can you put a debug node after your P1 sensor input? I want to see the data type which it is producing. I would like to see the output of the debug node.

plutoarko commented 2 months ago

The following message comes from my P-sensor: "Time": "2024-09-22T18:09:43", " ": { "vom_Netz": 5415.622, "zum_netz": 3095.9442, "mom_Leistung": 107 }}

using the following function ("Netzleistung")

1 var msg1 = { payload: msg.payload[" "].mom_Leistung};2 return msg1 ; I get the numerical Result 107 (in this case)

I am very happy about your help, but please - there is no hurry.         can you put a debug node after your P1 sensor input? I want to see the data type which it is producing. I would like to see the output of the debug node.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

edterbak commented 1 month ago

This part is kind of 'funny'

"Time": "2024-09-22T18:09:43", " ": { "vom_Netz": 5415.622, "zum_netz": 3095.9442, "mom_Leistung": 107 }}

The ," ": part seems to be breaking all logic. if I replace the space between the quotes by something random, eg "test", then object gets a name and the values can be extracted. "Time": "2024-09-22T18:09:43", "test": { "vom_Netz": 5415.622, "zum_netz": 3095.9442, "mom_Leistung": 107 }}

The below code works when I replace the space with 'test'.

[
    {
        "id": "9c1c469724a8c470",
        "type": "inject",
        "z": "d5fea67661261002",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 1400,
        "y": 640,
        "wires": [
            [
                "8c0cb8a7de042ee3"
            ]
        ]
    },
    {
        "id": "8c0cb8a7de042ee3",
        "type": "function",
        "z": "d5fea67661261002",
        "name": "incoming message generation",
        "func": "var msg1={}\n//msg1={\"Time\": \"2024-09-22T18:09:43\", \" \": { \"vom_Netz\": 5415.622,  \"zum_netz\": 3095.9442, \"mom_Leistung\": 107 }}\nmsg1={\"Time\": \"2024-09-22T18:09:43\", \"test\": { \"vom_Netz\": 5415.622,  \"zum_netz\": 3095.9442, \"mom_Leistung\": 107 }}\nreturn msg1;\n",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1630,
        "y": 640,
        "wires": [
            [
                "ca750540b7cb875b",
                "fb158560eb14e8e4"
            ]
        ]
    },
    {
        "id": "ca750540b7cb875b",
        "type": "debug",
        "z": "d5fea67661261002",
        "name": "debug 338",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 1870,
        "y": 580,
        "wires": []
    },
    {
        "id": "fb158560eb14e8e4",
        "type": "function",
        "z": "d5fea67661261002",
        "name": "function 108",
        "func": "var msg1={};\nvar msg2={};\n\nmsg1.payload = msg.test.vom_Netz;\nmsg2.payload = msg.test.zum_netz;\n\nreturn [msg1,msg2];\n",
        "outputs": 2,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1930,
        "y": 640,
        "wires": [
            [
                "a4cdcc9d04e043ce"
            ],
            [
                "245119d620efab47"
            ]
        ],
        "outputLabels": [
            "vom_Netz",
            "zum_netz"
        ]
    },
    {
        "id": "a4cdcc9d04e043ce",
        "type": "debug",
        "z": "d5fea67661261002",
        "name": "debug 339",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 2170,
        "y": 600,
        "wires": []
    },
    {
        "id": "245119d620efab47",
        "type": "debug",
        "z": "d5fea67661261002",
        "name": "debug 340",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 2170,
        "y": 680,
        "wires": []
    }
]

When changing back the 'test' value to the empty space " ", the same code fails.

If you can get your P sensor to produce the measurement in a proper format, I think that would help

plutoarko commented 1 month ago

First of all, thank you very much. I have to understand this first, but that may take a while. I will then get back to you here.

Am Sonntag, 29. September 2024 um 18:15:16 MESZ hat Ed ter Bak ***@***.***> Folgendes geschrieben:   

This part is kind of 'funny'

"Time": "2024-09-22T18:09:43", " ": { "vom_Netz": 5415.622, "zum_netz": 3095.9442, "mom_Leistung": 107 }} the ," ": part seems to be breaking all logic. if I replace the space between the quotes by something random, eg "test", then object gets a name and the values can be extracted.

The below code works when I replace the space with 'test'. [ { "id": "9c1c469724a8c470", "type": "inject", "z": "d5fea67661261002", "name": "", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "", "payloadType": "date", "x": 1400, "y": 640, "wires": [ [ "8c0cb8a7de042ee3" ] ] }, { "id": "8c0cb8a7de042ee3", "type": "function", "z": "d5fea67661261002", "name": "incoming message generation", "func": "var msg1={}\n//msg1={\"Time\": \"2024-09-22T18:09:43\", \" \": { \"vom_Netz\": 5415.622, \"zum_netz\": 3095.9442, \"mom_Leistung\": 107 }}\nmsg1={\"Time\": \"2024-09-22T18:09:43\", \"test\": { \"vom_Netz\": 5415.622, \"zum_netz\": 3095.9442, \"mom_Leistung\": 107 }}\nreturn msg1;\n", "outputs": 1, "timeout": 0, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 1630, "y": 640, "wires": [ [ "ca750540b7cb875b", "fb158560eb14e8e4" ] ] }, { "id": "ca750540b7cb875b", "type": "debug", "z": "d5fea67661261002", "name": "debug 338", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "true", "targetType": "full", "statusVal": "", "statusType": "auto", "x": 1870, "y": 580, "wires": [] }, { "id": "fb158560eb14e8e4", "type": "function", "z": "d5fea67661261002", "name": "function 108", "func": "var msg1={};\nvar msg2={};\n\nmsg1.payload = msg.test.vom_Netz;\nmsg2.payload = msg.test.zum_netz;\n\nreturn [msg1,msg2];\n", "outputs": 2, "timeout": 0, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 1930, "y": 640, "wires": [ [ "a4cdcc9d04e043ce" ], [ "245119d620efab47" ] ], "outputLabels": [ "vom_Netz", "zum_netz" ] }, { "id": "a4cdcc9d04e043ce", "type": "debug", "z": "d5fea67661261002", "name": "debug 339", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "false", "statusVal": "", "statusType": "auto", "x": 2170, "y": 600, "wires": [] }, { "id": "245119d620efab47", "type": "debug", "z": "d5fea67661261002", "name": "debug 340", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "false", "statusVal": "", "statusType": "auto", "x": 2170, "y": 680, "wires": [] } ]

When changing back the 'test' value to the empty space " ", the same code fails.

If you can get your P sensor to produce the measurement in a proper format, I think that would help

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

plutoarko commented 1 month ago

Now I have recorded everything again in a similar way like you did, maybe there was a copying error before.  It always works as desired for me.

// Output of Node ‚mqtt in‘ via node debug 267//

9.9.2024, 20:02:31 node: debug 267

tele/Keller/Energiezaehler/SENSOR: msg : Object

{"topic":"tele/Keller/Energiezaehler/SENSOR","payload":{"Time":"2024-09-29T19:02:31","":{"vom_Netz":5460.6932,"zum_netz":3116.5713,"mom_Leistung":180.79}},"qos":0,"retain":false,"_msgid":"3c4b61b5e4104f76"}

// my Funktion „Netzleistung“ // [ { "id": "5af365858e8c2012", "type": "function", "z": "ad980a450f532e53", "name": "Netzleistung", "func": "var msg1 = { payload: msg.payload[\" \"].mom_Leistung};\nreturn msg1 ;", "outputs": 1, "timeout": "", "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 130, "y": 2300, "wires": [ [ "cbba9a4ba57fde3b" ] ] } ]

// Output of Funktion ‚Netzleistung‘ via Node debug 266 //

29.9.2024, 20:02:31 node:debug 266

msg : Object {"payload":180.79,"_msgid":"3c4b61b5e4104f76"}

// 180.79 //

Am Sonntag, 29. September 2024 um 18:15:16 MESZ hat Ed ter Bak ***@***.***> Folgendes geschrieben:   

This part is kind of 'funny'

"Time": "2024-09-22T18:09:43", " ": { "vom_Netz": 5415.622, "zum_netz": 3095.9442, "mom_Leistung": 107 }} the ," ": part seems to be breaking all logic. if I replace the space between the quotes by something random, eg "test", then object gets a name and the values can be extracted.

The below code works when I replace the space with 'test'. [ { "id": "9c1c469724a8c470", "type": "inject", "z": "d5fea67661261002", "name": "", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "", "payloadType": "date", "x": 1400, "y": 640, "wires": [ [ "8c0cb8a7de042ee3" ] ] }, { "id": "8c0cb8a7de042ee3", "type": "function", "z": "d5fea67661261002", "name": "incoming message generation", "func": "var msg1={}\n//msg1={\"Time\": \"2024-09-22T18:09:43\", \" \": { \"vom_Netz\": 5415.622, \"zum_netz\": 3095.9442, \"mom_Leistung\": 107 }}\nmsg1={\"Time\": \"2024-09-22T18:09:43\", \"test\": { \"vom_Netz\": 5415.622, \"zum_netz\": 3095.9442, \"mom_Leistung\": 107 }}\nreturn msg1;\n", "outputs": 1, "timeout": 0, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 1630, "y": 640, "wires": [ [ "ca750540b7cb875b", "fb158560eb14e8e4" ] ] }, { "id": "ca750540b7cb875b", "type": "debug", "z": "d5fea67661261002", "name": "debug 338", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "true", "targetType": "full", "statusVal": "", "statusType": "auto", "x": 1870, "y": 580, "wires": [] }, { "id": "fb158560eb14e8e4", "type": "function", "z": "d5fea67661261002", "name": "function 108", "func": "var msg1={};\nvar msg2={};\n\nmsg1.payload = msg.test.vom_Netz;\nmsg2.payload = msg.test.zum_netz;\n\nreturn [msg1,msg2];\n", "outputs": 2, "timeout": 0, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 1930, "y": 640, "wires": [ [ "a4cdcc9d04e043ce" ], [ "245119d620efab47" ] ], "outputLabels": [ "vom_Netz", "zum_netz" ] }, { "id": "a4cdcc9d04e043ce", "type": "debug", "z": "d5fea67661261002", "name": "debug 339", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "false", "statusVal": "", "statusType": "auto", "x": 2170, "y": 600, "wires": [] }, { "id": "245119d620efab47", "type": "debug", "z": "d5fea67661261002", "name": "debug 340", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "false", "statusVal": "", "statusType": "auto", "x": 2170, "y": 680, "wires": [] } ]

When changing back the 'test' value to the empty space " ", the same code fails.

If you can get your P sensor to produce the measurement in a proper format, I think that would help

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

edterbak commented 1 month ago

So the issue is now resolved?

plutoarko commented 1 month ago

No, not yet. I'm still thinking about it. But there's no rush at the moment.

Am Mittwoch, 2. Oktober 2024 um 01:02:08 MESZ hat Ed ter Bak ***@***.***> Folgendes geschrieben:   

So the issue is now resolved?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>