Command Line Switch - Controlling a USB Relay board

I’m getting ‘invalid config’ when I’m trying to add command line switch entries to my config file.
after a couple of problems with tabs being in there instead of spaces I got to the point that HASS will start but it gives me notice that it’s not configured correctly.

this is an example of the exact terminal command I can use directly
sudo java -jar "/home/pi/Downloads/DenkoviRelayCommandLineTool.jar" DAE003Bn 8 1 1

and this is what I initially pasted into my configuration file

switch:
  platform: command_line
  switches:
    Relay_1:
      command_on: ‘sudo java -jar "/home/pi/Downloads/DenkoviRelayCommandLineTool.jar" DAE003Bn 8 1 1’
      command_off: ‘sudo java -jar "/home/pi/Downloads/DenkoviRelayCommandLineTool.jar" DAE003Bn 8 1 0’
      command_state: ‘sudo java -jar "/home/pi/Downloads/DenkoviRelayCommandLineTool.jar" DAE003Bn 8 1 status’
      value_template: '{{ value == "1" }}'
      friendly_name: Relay_1

with that not working, I thought I’d trim it back to the basics and tried this

switch:
  platform: command_line
  switches:
    Relay_1:
      command_on: ‘sudo java -jar "/home/pi/Downloads/DenkoviRelayCommandLineTool.jar" DAE003Bn 8 1 1’
      command_off: ‘sudo java -jar "/home/pi/Downloads/DenkoviRelayCommandLineTool.jar" DAE003Bn 8 1 0’

Can someone point me in the right direction here?

as a second question
The relay board I have has 8 relays on it, so when copying and pasting (and incrementing the name and terminal commands) where should I start and stop?
The entire thing from ‘switch:’ or can I just copy (&increment) from “Relay_2:”

Couple of things

  1. The apostrophe’s / single quotes on a few of the lines look like they’ve been pasted out of a word doc that’s converted them, i.e…

They are
‘ and ’

when they probably should be
' and '

  1. it’s probably not a good idea to use sudo in the command, rather you should change permissions to allow the HA user access, but this isn’t always easy - did you supress the password request for the sudo, otherwise this might get in the way, so even if you get the config right, the command might not work if you’re running HA as a user other than root.

First things first - the ‘R’ in ‘Relay_1’ was causing me some grief, changing that back to lower case got me a new set of errors relating to the command failing which (I think) is a step in the right direction.
I was testing without the hardware in/configured, so I couldn’t expect the commands to do anything but fail.

  1. When I next get a chance to pickup this project (hopefully tomorrow) I’ll check the apostrophes/single-quotes and make sure they are as they should be.

  2. I don’t completely understand of that/this but once I’ve got it working at all (with sudo) I’ll look into setting up the permissions correctly