rlindner / node-red-contrib-sma-webconnect

Node-RED node to query the web interface of SMA inverters
MIT License
13 stars 9 forks source link

Configure Custom Messages #10

Closed odwquad closed 4 years ago

odwquad commented 4 years ago

Hello, I have a problem with configuration of custom Messages for my SMA SUNNY TRIPOWER device. The basic node works well. I get every minute the actual power of the solar panel. But I need the complete power, too.

I search the value ID and add a inject before your SMA node. In this inject I send the custom message. But nothing works. I am also confused because I can not choose any device as I can see on your pictures here. Hope you can help me with that.

Here is the Node code:

[{"id":"4ff65134.b86e8","type":"sma-webconnect","z":"bb991a90.5acfd","ip_address":"192.168.0.103","right":"istl","use_tls":true,"x":420,"y":120,"wires":[["a5d89360.e4cf58","c9849c7b.cd1bc"]]},{"id":"a5d89360.e4cf58","type":"debug","z":"bb991a90.5acfd","name":"SMA PV","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":700,"y":60,"wires":[]},{"id":"fe3f2b29.fa497","type":"inject","z":"bb991a90.5acfd","name":"","props":[{"p":"payload"}],"repeat":"5","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{ \"sma_config\": { \"id\": \"1\", \"values\": { \"6100_0046E500\": { \"name\": \"phase1_voltage\", \"divider\": 100 }, \"6100_0046E600\": { \"name\": \"phase2_voltage\", \"divider\": 100 }, \"6100_0046E700\": { \"name\": \"phase3_voltage\", \"divider\": 100 }, \"6100_40463600\": { \"name\": \"grid_feedin\", \"divider\": 1 }, \"6100_40463700\": { \"name\": \"grid_consumption\", \"divider\": 1 }, \"6100_40263F00\": { \"name\": \"power\", \"divider\": 1 }, \"6400_00260100\": { \"name\": \"Ertrag\", \"divider\": 1 } } } }","payloadType":"json","x":150,"y":120,"wires":[["5deef732.9e9468","4ff65134.b86e8"]]},{"id":"c9849c7b.cd1bc","type":"ui_gauge","z":"bb991a90.5acfd","name":"","group":"54f5eb85.76cf1c","order":4,"width":0,"height":0,"gtype":"gage","title":"aktuelle Leistung","label":"kW","format":"{{payload.power}} kW","min":0,"max":"4100","colors":["#ffff80","#ff8000","#ca3838"],"seg1":"","seg2":"","x":730,"y":120,"wires":[]},{"id":"5deef732.9e9468","type":"debug","z":"bb991a90.5acfd","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":440,"y":200,"wires":[]},{"id":"54f5eb85.76cf1c","type":"ui_group","z":"","name":"Strom","tab":"3dacca97.de56ee","order":1,"disp":true,"width":6,"collapse":false},{"id":"3dacca97.de56ee","type":"ui_tab","z":"","name":"Übersicht","icon":"dashboard","order":1,"disabled":false,"hidden":false}]

odwquad commented 4 years ago

I am new with Node-RED so please describe it for noobys :-) Thank you

HoLo85 commented 4 years ago

Tested your Node and it works like intended. Somehow i can't add picture, but this is the output of my TRIPOWER with your Node: { "phase1_voltage":233.38, "phase2_voltage":233.95, "phase3_voltage":234.04, "grid_feedin":13, "grid_consumption":0, "power":0, "Ertrag":6003554, "available_sessions":3 }

Could you please provide screenshots of your node config dialog and output log if you trigger a message?

Edit:

What version does your node-red-contrib-sma-webconnect package have? If it is 0.0.1 you still use the initial version without support for the custom messages.

@rlindner is the node-red package updated automatically or do you need to trigger it?

HoLo85 commented 4 years ago

@odwquad try updating the node package. It has been updated to 0.1.0 today and should now work with your custom message.

odwquad commented 4 years ago

@HoLo85 : great thank you very much. It work now. Perfect :-)