Control relays on ETH484 IP relayboard with url commands

Hi,

I’m still trying to control a relay on the ETH484. The following commands work when I paste them into the address bar of my browser.

Switch relay 1 ON: “http://192.168.10.61/io.cgi?DOA1=00
Switch relay 1 OFF: “http://192.168.10.61/io.cgi?DOI1=00

How can make HA send this request? Is there any other preferable way to switch relays?

More info about the ETH484: http://www.robot-electronics.co.uk/htm/eth484tech.htm

Thanks in advance,

Niels

Hi,

Thanks for your help. I forgot to include a username and password. It’s working now.

switch:
  - platform: command_line
    switches:
      container_desk_light:
        command_on: 'curl "http://admin:[email protected]/io.cgi?DOA1=00"'
        command_off: 'curl "http://admin:[email protected]/io.cgi?DOI1=00"' 

The next thing I would like to do is update the state of the switch in HA when I control it from an APP on my android device. I’m able to send a TCP packet with packet sender, containing “0x24” and returning 2 bytes “01 00”, the first corresponds with relays being powered and the 2nd corresponds with active digital outputs.

Is there any way to send this tcp packet and correctly interpret the return, updating the switch? Or a more convenient way?

Thanks,

Niels

I think that is what command_state is for.