I have a flow that is set to open/close a relay on my 150/100 Charge Controller, however it is not changing the state of my relay. In the Victron App I have the relay setting set to "Relay Always Off". I'm not sure if the node-red flow takes precedence over the setting in the app.
The Node-Red flow successfully deploys, and I've put debug's in there to make sure it's properly sending a payload of 1 or 0 to the charge controller.
What am I missing? Why isn't it changing the state of the relay on the charge controller?
Below is the JSON from my flow
- [
- {
- "id":"5f535281.ce772c",
- "type":"openweathermap in",
- "z":"e4adfc06.24e05",
- "name":"Current Temperature",
- "wtype":"current",
- "lon":"",
- "lat":"",
- "city":"Nevada City",
- "country":"United States",
- "language":"en",
- "x":190,
- "y":300,
- "wires":[
- [
- "af7e6b3a.3e6e88",
- "ddad3658.6ea458"
- ]
- ]
- },
- {
- "id":"af7e6b3a.3e6e88",
- "type":"function",
- "z":"e4adfc06.24e05",
- "name":"If temp above 18c open relay",
- "func":"if (msg.payload.tempc > 18) {\n return { payload: 1};\n} else {\n return {payload: 0};\n}",
- "outputs":1,
- "noerr":0,
- "x":420,
- "y":300,
- "wires":[
- [
- "5ab5375e.9063b8",
- "ddad3658.6ea458"
- ]
- ]
- },
- {
- "id":"5ab5375e.9063b8",
- "type":"victron-output-relay",
- "z":"e4adfc06.24e05",
- "service":"com.victronenergy.solarcharger.ttyUSB1",
- "path":"/Relay/0/State",
- "serviceObj":{
- "service":"com.victronenergy.solarcharger.ttyUSB1",
- "name":"SmartSolar Charger MPPT 150/100 rev2",
- "paths":[
- {
- "path":"/Relay/0/State",
- "type":"enum",
- "name":"Relay on the charger",
- "enum":{
- "0":"Open",
- "1":"Closed"
- },
- "writable":true
- }
- ]
- },
- "pathObj":{
- "path":"/Relay/0/State",
- "type":"enum",
- "name":"Relay on the charger",
- "enum":{
- "0":"Open",
- "1":"Closed"
- },
- "writable":true
- },
- "initial":"",
- "name":"",
- "x":810,
- "y":300,
- "wires":[
- ]
- },
- {
- "id":"ddad3658.6ea458",
- "type":"debug",
- "z":"e4adfc06.24e05",
- "name":"",
- "active":true,
- "tosidebar":true,
- "console":false,
- "tostatus":false,
- "complete":"false",
- "x":450,
- "y":220,
- "wires":[
- ]
- },
- {
- "id":"c5e03fda.b9b49",
- "type":"victron-output-relay",
- "z":"e4adfc06.24e05",
- "service":"",
- "path":"",
- "name":"",
- "x":320,
- "y":760,
- "wires":[
- ]
- }
- ]