0

I have a relayboard on ethernet i want to controll with freeboard thru nodeRED on my raspberry pi. The link to the relayboard.

I just dont know how to connect it. If i go at 192.168.1.100/current_state.json?pw=admin i get:

{ "CurrentState": 
  { "DigitalInput": [ 
     {"Name": "DI1", "Value": "0", "Count": "0"}, 
     {"Name": "DI2", "Value": "0", "Count": "0"}, 
     {"Name": "DI3", "Value": "0", "Count": "0"}, 
     {"Name": "DI4", "Value": "0", "Count": "0"}, 
     {"Name": "DI5", "Value": "0", "Count": "0"}, 
     {"Name": "DI6", "Value": "0", "Count": "0"}, 
     {"Name": "DI7", "Value": "0", "Count": "0"}, 
     {"Name": "DI8", "Value": "0", "Count": "0"} ], 
    "AnalogInput": [ 
     {"Name": "AI1", "Value": "0", "Measure": "0.0 mV"}, 
     {"Name": "AI2", "Value": "0", "Measure": "0.0 mV"}, 
     {"Name": "AI3", "Value": "0", "Measure": "0.0 mV"}, 
     {"Name": "AI4", "Value": "0", "Measure": "0.0 mV"}, 
     {"Name": "AI5", "Value": "0", "Measure": "0.0 mV"}, 
     {"Name": "AI6", "Value": "0", "Measure": "0.0 mV"}, 
     {"Name": "AI7", "Value": "0", "Measure": "0.0 mV"}, 
     {"Name": "AI8", "Value": "0", "Measure": "0.0 mV"} ], 
     "Output": [ 
     {"Name": "Lights", "Value": "0"}, 
     {"Name": "VHF", "Value": "0"}, 
     {"Name": "Radar", "Value": "0"}, 
     {"Name": "Toilet", "Value": "0"}, 
     {"Name": "Fridge", "Value": "0"}, 
     {"Name": "Nav", "Value": "0"}, 
     {"Name": "Anchor", "Value": "0"}, 
     {"Name": "Steam", "Value": "0"}, 
     {"Name": "Electro", "Value": "0"},
     {"Name": "Bilge", "Value": "0"}, 
     {"Name": "Water", "Value": "0"}, 
     {"Name": "Engine", "Value": "0"}, 
     {"Name": "DO13", "Value": "0"}, 
     {"Name": "DO14", "Value": "0"}, 
     {"Name": "DO15", "Value": "0"}, 
     {"Name": "DO16", "Value": "0"} ], 
     "PWM": [ 
     {"Name": "PWM1", "Value": "0"}, 
     {"Name": "PWM2", "Value": "0"} ] 
     } 
     }

As you can see, everything is off. So thats ok.

How do I get Node-RED to make the output to payload that I can make a switch with in freeboard or the Node-RED dashboard?

I have search a lot of different places, but found no answer.. /Benjamin

iehrlich
  • 3,572
  • 4
  • 34
  • 43
  • 1
    At the moment it's not really clear what you are asking, there seams to be multiple different questions. Please have a look at the doc (https://stackoverflow.com/help/how-to-ask) about asking good questions and see if you can edit your question to make it a little clearer. – hardillb Jun 27 '17 at 15:43
  • Is it a little more clear now? I'm not good at coding at all, so it is very hard for me to explain things i dont understand ;) – BenjaminGotke Jun 27 '17 at 15:53
  • 1
    Not really, Stackoverflow will not write code for you, you need to try, present what you've tried along with a description of why it doesn't work and then somebody will help you fix it. – hardillb Jun 27 '17 at 15:55

0 Answers0