question

hummingbear avatar image
hummingbear asked

Relay on Charge Controller not changing with node-red

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":[

    ]
  }
]


Node-RED
1589924393282.png (88.6 KiB)
1 comment
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

hummingbear avatar image hummingbear commented ·
0 Likes 0 ·
1 Answer
markus-001 avatar image
markus-001 answered ·

@hummingbear

I previously asked this same question, the answer from Victron is "node red will not control relays on charge controllers or any Aux relays on the Multis any time soon"

Answer on github 25/4/2020

1 comment
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

vojtech-kurka avatar image vojtech-kurka commented ·
Oh, that's a bummer! Victron, please, can you implement this? The Relay node in Node-RED seems it should work, so many people (including myself) are confused.

Thank you

1 Like 1 ·