Hello,
I tried to compare two values from my solar inverter.
One value is the state of charge from my battery: msg.payload
Other value should be the goal. Name of msg is: msg.payload.toSolar with value 95.6. This value is a fix value, changing each day/month.
If the solar power charge my battery the msg.payload increase and increase. If the msg.payload is equal or bigger than the value msg.payload.toSolar then an Trigger should be started.
[{"id":"35415e42.1457a2","type":"link in","z":"1bd00a5b.7e9796","name":"toSolar Wert","links":["5aa76440.263a4c"],"x":75,"y":2420,"wires":[["d6769cef.21438","ebdf752.9b79d88"]]},{"id":"85d3e269.3d413","type":"switch","z":"1bd00a5b.7e9796","name":"","property":"payload","propertyType":"msg","rules":[{"t":"gte","v":"payload.toSolar","vt":"msg"}],"checkall":"true","repair":false,"outputs":1,"x":370,"y":2440,"wires":[["7c61d8f2.904908","30b30da2.cc3a82"]]},{"id":"c1d898f1.d7c888","type":"link in","z":"1bd00a5b.7e9796","name":"","links":["ef1b6ec4.06e55"],"x":75,"y":2480,"wires":[["1e621e7f.ce4382","d98a81cc.e0603"]]},{"id":"7c61d8f2.904908","type":"trigger","z":"1bd00a5b.7e9796","name":"","op1":"stop","op2":"","op1type":"str","op2type":"nul","duration":"250","extend":false,"overrideDelay":false,"units":"ms","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":600,"y":2420,"wires":[["d08829ba.642a58"]]},{"id":"30b30da2.cc3a82","type":"trigger","z":"1bd00a5b.7e9796","name":"","op1":"","op2":"3","op1type":"nul","op2type":"str","duration":"250","extend":false,"overrideDelay":false,"units":"ms","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":600,"y":2460,"wires":[["ad9b3f33.0303"]]},{"id":"d6769cef.21438","type":"debug","z":"1bd00a5b.7e9796","name":"","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload.toSolar","targetType":"msg","statusVal":"payload","statusType":"auto","x":240,"y":2340,"wires":[]},{"id":"1e621e7f.ce4382","type":"debug","z":"1bd00a5b.7e9796","name":"","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":190,"y":2540,"wires":[]},{"id":"ebdf752.9b79d88","type":"function","z":"1bd00a5b.7e9796","name":"string to number","func":"msg.payload = Number(msg.payload)\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":200,"y":2420,"wires":[["85d3e269.3d413"]]},{"id":"d98a81cc.e0603","type":"function","z":"1bd00a5b.7e9796","name":"string to number","func":"msg.payload = Number(msg.payload)\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":200,"y":2480,"wires":[["85d3e269.3d413"]]}]
I tried it but it doesn´t work. Can somebody help me?