- 积分
- 132
- 金钱
- 110
- 威望
- 0
- 贡献
- 0
- HASS币
- 0
注册会员
- 积分
- 132
- 金钱
- 110
- HASS币
- 0
|
楼主 |
发表于 2024-4-16 13:30:42
|
显示全部楼层
nodered 的json代码
[{"id":"d14665f497560d19","type":"tab","label":"光伏系统接入流程","disabled":false,"info":"","env":[]},{"id":"a35acba689cdbe0e","type":"udp in","z":"d14665f497560d19","name":"","iface":"","port":"9001","ipv":"udp4","multicast":"true","group":"192.168.0.113","datatype":"buffer","x":110,"y":160,"wires":[["72066336fc92b74c","61c45291f82cc5b1","f347c1924ac103a3","034155a3dbe89283","daabb3e447c51431","b1ce9e7802162dba","cd5add002343319a","28be618f873f23c4","092c71e7ed7a7245"]]},{"id":"72066336fc92b74c","type":"debug","z":"d14665f497560d19","name":"debug 1","active":false,"tosidebar":true,"console":true,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":350,"y":460,"wires":[]},{"id":"7e23bf5243368ab5","type":"inject","z":"d14665f497560d19","name":"","props":[{"p":"payload"}],"repeat":"1","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"01 B3 01 00 00 00 00 B5","payloadType":"str","x":120,"y":500,"wires":[["1bc5bb45221126bc"]]},{"id":"1bc5bb45221126bc","type":"udp out","z":"d14665f497560d19","name":"","addr":"192.168.0.113","iface":"","port":"9001","ipv":"udp4","outport":"","base64":false,"multicast":"false","x":390,"y":560,"wires":[]},{"id":"61c45291f82cc5b1","type":"function","z":"d14665f497560d19","name":"PVdianya","func":"var a=parseInt('0x'+msg.payload.slice(6,8).toString('hex'))\nmsg.payload=a/10\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":340,"y":40,"wires":[["22023b3a42c7ab29"]]},{"id":"4e319e06fb193afe","type":"debug","z":"d14665f497560d19","name":"debug 2","active":false,"tosidebar":true,"console":true,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":850,"y":60,"wires":[]},{"id":"f347c1924ac103a3","type":"function","z":"d14665f497560d19","name":"dianchidianya","func":"var a=parseInt('0x'+msg.payload.slice(8,10).toString('hex'))\nmsg.payload=a/100\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":360,"y":80,"wires":[["2e56a49a1f146105"]]},{"id":"034155a3dbe89283","type":"function","z":"d14665f497560d19","name":"chongdiandianliu","func":"var a=parseInt('0x'+msg.payload.slice(10,12).toString('hex'))\nmsg.payload=a/100\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":350,"y":120,"wires":[["31d68d25b1711316"]]},{"id":"daabb3e447c51431","type":"function","z":"d14665f497560d19","name":"neibuwendu","func":"var a=parseInt('0x'+msg.payload.slice(12,14).toString('hex'))\nmsg.payload=a/10\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":350,"y":160,"wires":[["542d4a0cd3332f77"]]},{"id":"b1ce9e7802162dba","type":"function","z":"d14665f497560d19","name":"rifadianliang","func":"var a=parseInt('0x'+msg.payload.slice(20,24).toString('hex'))\nmsg.payload=a/1000\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":350,"y":200,"wires":[["f8872c135074e180"]]},{"id":"cd5add002343319a","type":"function","z":"d14665f497560d19","name":"zongdianliang","func":"var a=parseInt('0x'+msg.payload.slice(24,28).toString('hex'))\nmsg.payload=a/1000\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":360,"y":240,"wires":[["fef8c4cbbbf475f8"]]},{"id":"0d09d48106ccd2c9","type":"debug","z":"d14665f497560d19","name":"debug 3","active":false,"tosidebar":true,"console":true,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":850,"y":100,"wires":[]},{"id":"f53fa1b057720870","type":"debug","z":"d14665f497560d19","name":"debug 4","active":false,"tosidebar":true,"console":true,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":850,"y":140,"wires":[]},{"id":"972fb9d629e035d0","type":"debug","z":"d14665f497560d19","name":"debug 5","active":false,"tosidebar":true,"console":true,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":850,"y":180,"wires":[]},{"id":"24eb22efb8d20919","type":"debug","z":"d14665f497560d19","name":"debug 6","active":false,"tosidebar":true,"console":true,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":850,"y":220,"wires":[]},{"id":"5714c4e4add6fdbf","type":"debug","z":"d14665f497560d19","name":"debug 7","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":850,"y":260,"wires":[]},{"id":"f0366b94948ffda0","type":"ui_gauge","z":"d14665f497560d19","name":"PV电压","group":"2cdc47cd6915371c","order":2,"width":"0","height":"0","gtype":"gage","title":"PV电压","label":"units","format":"{{value}}","min":0,"max":"200","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","diff":false,"className":"","x":1120,"y":80,"wires":[]},{"id":"98345acc1a3f03c2","type":"ui_chart","z":"d14665f497560d19","name":"PV电压","group":"2cdc47cd6915371c","order":1,"width":"0","height":"0","label":"PV电压","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"outputs":1,"useDifferentColor":false,"className":"","x":1260,"y":100,"wires":[[]]},{"id":"5e643f2e1a99ebf5","type":"mqtt out","z":"d14665f497560d19","name":"","topic":"","qos":"","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"0deee1014543e6d3","x":1070,"y":500,"wires":[]},{"id":"55bafdb7d99ba386","type":"function","z":"d14665f497560d19","name":"电池电压UI","func":"msg.topic = \"home/mppt/dianchidinaya\"\nmsg.payload = {\"dianchidinaya\":msg.payload}\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":850,"y":440,"wires":[["5e643f2e1a99ebf5"]]},{"id":"08c27ca36ab4a8f0","type":"function","z":"d14665f497560d19","name":"PV电压UI","func":"msg.topic = \"home/mppt/pvdianya\"\nmsg.payload = {\"pvdianya\":msg.payload}\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":840,"y":400,"wires":[["5e643f2e1a99ebf5"]]},{"id":"a479933d6ca7a835","type":"function","z":"d14665f497560d19","name":"充电电流UI","func":"msg.topic = \"home/mppt/chongdiandianliu\"\nmsg.payload = {\"chongdiandianliu\":msg.payload}\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":850,"y":480,"wires":[["5e643f2e1a99ebf5"]]},{"id":"7f91e96abb6a64da","type":"function","z":"d14665f497560d19","name":"内部温度UI","func":"msg.topic = \"home/mppt/neibuwendu\"\nmsg.payload = {\"neibuwendu\":msg.payload }\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":850,"y":520,"wires":[["5e643f2e1a99ebf5"]]},{"id":"c44b5a63098091b5","type":"function","z":"d14665f497560d19","name":"日发电量UI","func":"msg.topic = \"home/mppt/rifadianliang\"\nmsg.payload = { \"rifadianliang\": msg.payload }\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":850,"y":560,"wires":[["5e643f2e1a99ebf5"]]},{"id":"4b70e3eddde66ad0","type":"function","z":"d14665f497560d19","name":"总电量UI","func":"msg.topic = \"home/mppt/zongdianliang\"\nmsg.payload = { \"zongdianliang\" : msg.payload }\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":840,"y":600,"wires":[["5e643f2e1a99ebf5"]]},{"id":"fb1360ad61bd15b7","type":"ui_gauge","z":"d14665f497560d19","name":"电池电压","group":"2cdc47cd6915371c","order":4,"width":0,"height":0,"gtype":"gage","title":"电池电压","label":"units","format":"{{value}}","min":0,"max":"60","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","diff":false,"className":"","x":1120,"y":120,"wires":[]},{"id":"d835cebb31561b22","type":"ui_gauge","z":"d14665f497560d19","name":"充电电流","group":"2cdc47cd6915371c","order":5,"width":0,"height":0,"gtype":"gage","title":"充电电流","label":"units","format":"{{value}}","min":0,"max":"20","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","diff":false,"className":"","x":1120,"y":160,"wires":[]},{"id":"8f3aff510d3a0972","type":"ui_gauge","z":"d14665f497560d19","name":"内部温度","group":"2cdc47cd6915371c","order":8,"width":0,"height":0,"gtype":"gage","title":"内部温度","label":"units","format":"{{value}}","min":0,"max":"50","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","diff":false,"className":"","x":1120,"y":200,"wires":[]},{"id":"92cc4e0e402dbf2c","type":"ui_gauge","z":"d14665f497560d19","name":"日发电量","group":"2cdc47cd6915371c","order":10,"width":0,"height":0,"gtype":"gage","title":"日发电量","label":"units","format":"{{value}}","min":0,"max":"5","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","diff":false,"className":"","x":1120,"y":240,"wires":[]},{"id":"7898c37e05c56181","type":"ui_gauge","z":"d14665f497560d19","name":"总电量","group":"2cdc47cd6915371c","order":12,"width":0,"height":0,"gtype":"gage","title":"总电量","label":"units","format":"{{value}}","min":0,"max":"10000","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","diff":false,"className":"","x":1110,"y":280,"wires":[]},{"id":"234a6052c8284a33","type":"ui_chart","z":"d14665f497560d19","name":"电池电压","group":"2cdc47cd6915371c","order":3,"width":0,"height":0,"label":"电池电压","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"outputs":1,"useDifferentColor":false,"className":"","x":1260,"y":140,"wires":[[]]},{"id":"5b82654b2caf3cce","type":"ui_chart","z":"d14665f497560d19","name":"充电电流","group":"2cdc47cd6915371c","order":6,"width":0,"height":0,"label":"充电电流","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"outputs":1,"useDifferentColor":false,"className":"","x":1260,"y":180,"wires":[[]]},{"id":"550bf4ef3a82dcca","type":"ui_chart","z":"d14665f497560d19","name":"内部温度","group":"2cdc47cd6915371c","order":7,"width":0,"height":0,"label":"内部温度","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"outputs":1,"useDifferentColor":false,"className":"","x":1260,"y":220,"wires":[[]]},{"id":"45ce7fd8a930d73a","type":"ui_chart","z":"d14665f497560d19","name":"日发电量","group":"2cdc47cd6915371c","order":9,"width":0,"height":0,"label":"日发电量","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"outputs":1,"useDifferentColor":false,"className":"","x":1260,"y":260,"wires":[[]]},{"id":"7801cd953b436005","type":"ui_chart","z":"d14665f497560d19","name":"总电量","group":"2cdc47cd6915371c","order":11,"width":0,"height":0,"label":"总电量","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"86400","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"outputs":1,"useDifferentColor":false,"className":"","x":1270,"y":300,"wires":[[]]},{"id":"fef8c4cbbbf475f8","type":"rbe","z":"d14665f497560d19","name":"","func":"narrowband","gap":"1","start":"","inout":"out","septopics":false,"property":"payload","topi":"topic","x":590,"y":220,"wires":[["4b70e3eddde66ad0","5714c4e4add6fdbf","7898c37e05c56181","7801cd953b436005"]]},{"id":"22023b3a42c7ab29","type":"rbe","z":"d14665f497560d19","name":"","func":"narrowband","gap":"150","start":"","inout":"out","septopics":false,"property":"payload","topi":"topic","x":590,"y":20,"wires":[["08c27ca36ab4a8f0","4e319e06fb193afe","f0366b94948ffda0","98345acc1a3f03c2"]]},{"id":"542d4a0cd3332f77","type":"rbe","z":"d14665f497560d19","name":"","func":"narrowband","gap":"10","start":"","inout":"out","septopics":false,"property":"payload","topi":"topic","x":590,"y":140,"wires":[["7f91e96abb6a64da","972fb9d629e035d0","8f3aff510d3a0972","550bf4ef3a82dcca"]]},{"id":"f8872c135074e180","type":"rbe","z":"d14665f497560d19","name":"","func":"narrowband","gap":"10","start":"","inout":"out","septopics":false,"property":"payload","topi":"topic","x":590,"y":180,"wires":[["c44b5a63098091b5","24eb22efb8d20919","92cc4e0e402dbf2c","45ce7fd8a930d73a"]]},{"id":"31d68d25b1711316","type":"rbe","z":"d14665f497560d19","name":"","func":"narrowband","gap":"10","start":"","inout":"out","septopics":false,"property":"payload","topi":"topic","x":590,"y":100,"wires":[["a479933d6ca7a835","f53fa1b057720870","d835cebb31561b22","5b82654b2caf3cce"]]},{"id":"2e56a49a1f146105","type":"rbe","z":"d14665f497560d19","name":"","func":"narrowband","gap":"10","start":"","inout":"out","septopics":false,"property":"payload","topi":"topic","x":590,"y":60,"wires":[["55bafdb7d99ba386","0d09d48106ccd2c9","fb1360ad61bd15b7","234a6052c8284a33"]]},{"id":"28be618f873f23c4","type":"function","z":"d14665f497560d19","name":"chongdiangonglv","func":"var a = parseInt('0x' + msg.payload.slice(8, 10).toString('hex'))\nvar b = parseInt('0x' + msg.payload.slice(10, 12).toString('hex'))\nvar c = a / 100 * b / 100\nmsg.payload = c.toFixed(2)\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":350,"y":280,"wires":[["d0dc5ee7be3e7961"]]},{"id":"d0dc5ee7be3e7961","type":"rbe","z":"d14665f497560d19","name":"","func":"narrowband","gap":"150","start":"","inout":"in","septopics":false,"property":"payload","topi":"topic","x":590,"y":260,"wires":[["d01c656e0996792e","6e5a2c0cd297c880"]]},{"id":"d01c656e0996792e","type":"function","z":"d14665f497560d19","name":"充电功率UI","func":"msg.topic = \"home/mppt/chongdiangonglv\"\nmsg.payload = {\"chongdiangonglv\":msg.payload}\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":850,"y":640,"wires":[["5e643f2e1a99ebf5"]]},{"id":"6e5a2c0cd297c880","type":"debug","z":"d14665f497560d19","name":"debug 9","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":850,"y":300,"wires":[]},{"id":"092c71e7ed7a7245","type":"function","z":"d14665f497560d19","name":"waibuwendu","func":"var a=parseInt('0x'+msg.payload.slice(16,18).toString('hex'))\nmsg.payload=a/10\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":350,"y":320,"wires":[["ca1c18b2948d0ca5","f862baf3cacb0193"]]},{"id":"ca1c18b2948d0ca5","type":"rbe","z":"d14665f497560d19","name":"","func":"narrowband","gap":"10","start":"","inout":"out","septopics":false,"property":"payload","topi":"topic","x":590,"y":300,"wires":[["471c0ad8e6d14158"]]},{"id":"471c0ad8e6d14158","type":"function","z":"d14665f497560d19","name":"外部温度UI","func":"msg.topic = \"home/mppt/waibuwendu\"\nmsg.payload = {\"waibuwendu\":msg.payload }\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":850,"y":680,"wires":[["5e643f2e1a99ebf5"]]},{"id":"f862baf3cacb0193","type":"debug","z":"d14665f497560d19","name":"debug 19","active":false,"tosidebar":true,"console":true,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":550,"y":420,"wires":[]},{"id":"2cdc47cd6915371c","type":"ui_group","name":"MPPT状态","tab":"e60015d31fb88ff5","order":1,"disp":true,"width":"6","collapse":false,"className":""},{"id":"0deee1014543e6d3","type":"mqtt-broker","name":"","broker":"127.0.0.1","port":"1883","clientid":"","autoConnect":true,"usetls":false,"protocolVersion":"4","keepalive":"60","cleansession":true,"autoUnsubscribe":true,"birthTopic":"","birthQos":"0","birthRetain":"false","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closeRetain":"false","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willRetain":"false","willPayload":"","willMsg":{},"userProps":"","sessionExpiry":""},{"id":"e60015d31fb88ff5","type":"ui_tab","name":"Home","icon":"dashboard","disabled":false,"hidden":false}] 把上面内容导到你的nodered里再结合你的通信协议更改吧 |
|