Controling a Devantech ETH008

I’m thinking off buying a devantech ETH008 relayboard to control the sprinkling of my garden. Is there any experience out there of controling this board. It is controlled by tcp ip over port 17494. I only found one article about the ETH008, but that was about the max current.

did you get it to work?

Never tried. I didn’t get any answer on my question so I didn’t bought it. I’m going to trie to get a ESP board with a 8 relais board working.

Got this working with the following:

switch:
  - platform: command_line
    switches:
      sprinkler_1:
        command_on: "/usr/bin/curl -u admin:<passwd> -X GET 'http://10.170.33.210/io.cgi?DOA1=0'"
        command_off: "/usr/bin/curl -u admin:<passwd> -X GET 'http://10.170.33.210/io.cgi?DOI1=0'"
        command_state: "/usr/bin/curl -u admin:<passwd> -X GET 'http://10.170.33.210/io.cgi'"
        value_template: '{{ value[7] == "1" }}'
        friendly_name: Sprinkler 1
  - platform: command_line
    switches:
      sprinkler_2:
        command_on: "/usr/bin/curl -u admin:<passwd> -X GET 'http://10.170.33.210/io.cgi?DOA2=0'"
        command_off: "/usr/bin/curl -u admin:<passwd> -X GET 'http://10.170.33.210/io.cgi?DOI2=0'"
        command_state: "/usr/bin/curl -u admin:<passwd> -X GET 'http://10.170.33.210/io.cgi'"
        value_template: '{{ value[8] == "1" }}'
        friendly_name: Sprinkler 2
  - platform: command_line
    switches:
      sprinker_3:
        command_on: "/usr/bin/curl -u admin:<passwd> -X GET 'http://10.170.33.210/io.cgi?DOA3=0'"
        command_off: "/usr/bin/curl -u admin:<passwd> -X GET 'http://10.170.33.210/io.cgi?DOI3=0'"
        command_state: "/usr/bin/curl -u admin:<passwd> -X GET 'http://10.170.33.210/io.cgi'"
        value_template: '{{ value[9] == "1" }}'
        friendly_name: Sprinkler 3
  - platform: command_line
    switches:
      sprinkler_4:
        command_on: "/usr/bin/curl -u admin:<passwd> -X GET 'http://10.170.33.210/io.cgi?DOA4=0'"
        command_off: "/usr/bin/curl -u admin:<passwd> -X GET 'http://10.170.33.210/io.cgi?DOI4=0'"
        command_state: "/usr/bin/curl -u admin:<passwd> -X GET 'http://10.170.33.210/io.cgi'"
        value_template: '{{ value[10] == "1" }}'
        friendly_name: Sprinkler 4
  - platform: command_line
    switches:
      heat_first_floor:
        command_on: "/usr/bin/curl -u admin:<passwd> -X GET 'http://10.170.33.210/io.cgi?DOA5=0'"
        command_off: "/usr/bin/curl -u admin:<passwd> -X GET 'http://10.170.33.210/io.cgi?DOI5=0'"
        command_state: "/usr/bin/curl -u admin:<passwd> -X GET 'http://10.170.33.210/io.cgi'"
        value_template: '{{ value[11] == "1" }}'
        friendly_name: Heating First Floor
  - platform: command_line
    switches:
      heat_ground_floor:
        command_on: "/usr/bin/curl -u admin:<passwd> -X GET 'http://10.170.33.210/io.cgi?DOA6=0'"
        command_off: "/usr/bin/curl -u admin:<passwd> -X GET 'http://10.170.33.210/io.cgi?DOI6=0'"
        command_state: "/usr/bin/curl -u admin:<passwd> -X GET 'http://10.170.33.210/io.cgi'"
        value_template: '{{ value[12] == "1" }}'
        friendly_name: Heating Ground Floor
  - platform: command_line
    switches:
      heat_swimming_pool:
        command_on: "/usr/bin/curl -u admin:<passwd> -X GET 'http://10.170.33.210/io.cgi?DOA7=0'"
        command_off: "/usr/bin/curl -u admin:<passwd> -X GET 'http://10.170.33.210/io.cgi?DOI7=0'"
        command_state: "/usr/bin/curl -u admin:<passwd> -X GET 'http://10.170.33.210/io.cgi'"
        value_template: '{{ value[13] == "1" }}'
        friendly_name: Heating Swimming Pool
  - platform: command_line
    switches:
      lights_pool:
        command_on: "/usr/bin/curl -u admin:<passwd> -X GET 'http://10.170.33.210/io.cgi?DOA8=0'"
        command_off: "/usr/bin/curl -u admin:<passwd> -X GET 'http://10.170.33.210/io.cgi?DOI8=0'"
        command_state: "/usr/bin/curl -u admin:<passwd> -X GET 'http://10.170.33.210/io.cgi'"
        value_template: '{{ value[14] == "1" }}'
        friendly_name: Pool Lights

Hi Alan,
I tried your code, but have the following problem, when I switch a relay on, the relay goes on, but the switch in HA goes off after 1 second. The relay stays on and I can’t switch it off anymore because HA thinks it is off.
Also when I use the webpage of the 008, HA does not update when I switch a relay there.

first problem solved! was running firmware v6, updated to V11.
Seems that status is also updated.
But I also have 3x ETH484 and using the inputs for my motion sensors. Any thoughts on how to implement them?

Sorry, was on holiday… good that you solved the firmware problem. I guess the ETH008 is working.

I’ve not tried the ETH484. In the user manual it seems to have a similar http interface in the latest firmware. You might have to update your scan interval as the default is 60 seconds and your motion sensors will very likely have a much lower interval that they stay on after movement. You’ll have to measure that and adjust the scan_interval setting.

I guess code would be something like this is they are only used as inputs:

switch:
  - platform: command_line
    sensor:
      sensor_1:
        command_state: "/usr/bin/curl -u admin:<passwd> -X GET 'http://10.170.33.210/io.cgi'"
        value_template: '{{ value[7] == "1" }}'
        friendly_name: Sensor_1
        scan_interval: 5

value[x] You will need to test based on the return of the command below and the position of the right bit with your value.
/usr/bin/curl -u admin: -X GET ‘http://10.170.33.210/io.cgi

In my configuration.yaml, I have this line:

sensor: !include sensors.yaml

When I put the code in sensors.yaml, I get this error:
Invalid config for [sensor.command_line]: [sensor] is an invalid option for [sensor.command_line]. Check: sensor.command_line->sensor. (See ?, line ?).
This is the code for 1 sensor:

#ETH484 Hobbykamer
  - platform: command_line
    sensor:
      motion_1_484_9:
        command_state: "/usr/bin/curl -u admin:password -X GET 'http://192.168.86.129/io.cgi'"
        value_template: '{{ value[38] == "1" }}'
        friendly_name: Motion gang boven
        scan_interval: 5

What am I doing wrong?

Problem with the YAML which seems to be different for sensors which was an incorrect assumption I made . Try this in your sensor.yaml file:

There is more info on the command line sensor in the HA docs here:

#ETH484 Hobbykamer
- platform: command_line
  command: "/usr/bin/curl -u admin:password -X GET 'http://192.168.86.129/io.cgi'"
  value_template: '{{ value[38] == "1" }}'
  name: motion_1_484_9
  scan_interval: 5

Works perfect now! Many thanks.

I come from Domoticz and I’m transferring over to HA … (so I’m a newbie)
I upgraded the ETH008 modules to firmware v11 … so that should be fine …
I tried your code in /config/configuration.yaml but it’s not working …

switch:
  - platform: command_line
    switches:
      niet_gebruikt_beneden:
        command_on: "/usr/bin/curl -u admin:<passwd> -X GET 'http://192.168.20.3/io.cgi?DOA6=0'"
        command_off: "/usr/bin/curl -u admin:<passwd> -X GET 'http://192.168.20.3/io.cgi?DOI6=0'"
        command_state: "/usr/bin/curl -u admin:<passwd> -X GET 'http://192.168.20.3/io.cgi'"
        value_template: '{{ value[12] == "1" }}'
        friendly_name: Niet gebruikt beneden
  - platform: command_line
    switches:
      niet_gebruikt_boven:
        command_on: "/usr/bin/curl -u admin:<passwd> -X GET 'http://192.168.20.4/io.cgi?DOA8=0'"
        command_off: "/usr/bin/curl -u admin:<passwd> -X GET 'http://192.168.20.4/io.cgi?DOI8=0'"
        command_state: "/usr/bin/curl -u admin:<passwd> -X GET 'http://192.168.20.4/io.cgi'"
        value_template: '{{ value[14] == "1" }}'
        friendly_name: Niet gebruikt boven

in the HA log, I see :

2021-10-31 10:51:09 ERROR (SyncWorker_1) [homeassistant.components.command_line] Command failed: /usr/bin/curl -u admin:<passwd> -X GET 'http://192.168.20.4/io.cgi'
2021-10-31 10:51:39 ERROR (SyncWorker_0) [homeassistant.components.command_line] Command failed: /usr/bin/curl -u admin:<passwd> -X GET 'http://192.168.20.3/io.cgi'
2021-10-31 10:51:39 ERROR (SyncWorker_5) [homeassistant.components.command_line] Command failed: /usr/bin/curl -u admin:<passwd> -X GET 'http://192.168.20.4/io.cgi'
2021-10-31 10:52:09 ERROR (SyncWorker_2) [homeassistant.components.command_line] Command failed: /usr/bin/curl -u admin:<passwd> -X GET 'http://192.168.20.3/io.cgi'
2021-10-31 10:52:09 ERROR (SyncWorker_1) [homeassistant.components.command_line] Command failed: /usr/bin/curl -u admin:<passwd> -X GET 'http://192.168.20.4/io.cgi'
2021-10-31 10:52:14 ERROR (SyncWorker_0) [homeassistant.components.command_line] Command failed: /usr/bin/curl -u admin:<passwd> -X GET 'http://192.168.20.3/io.cgi?DOA6=0'
2021-10-31 10:52:14 ERROR (SyncWorker_0) [homeassistant.components.command_line.switch] Command failed: /usr/bin/curl -u admin:<passwd> -X GET 'http://192.168.20.3/io.cgi?DOA6=0'
2021-10-31 10:52:14 ERROR (SyncWorker_0) [homeassistant.components.command_line] Command failed: /usr/bin/curl -u admin:<passwd> -X GET 'http://192.168.20.3/io.cgi'

… what is the “admin: paswd” for in this code ?
my ETH008 doesn’t have passwords, so I tried removing this part from the code but no solution either …

  • what am I doing wrong ?
  • could someone please explain ?

Thanks in advance for helping a newbie …
Pascal
Belgium

The admin/passwd part is your username and password on the ETH008.

To test out if the command is working, you can execute it via the SSH command line of any NIX system or your HA ssh interface.

How does your command line look when you remove the admin/passwd? Also removed the -u?

no, I didn’t remove the -u … should I ?

it’s working !
thanks for the help !
(and sorry for my stupid mistake …)

Ha ha… no problem… good that it now works!

Hello Everyone,

The code below used to work before my update in july, now it no longer works, could anyone indicate what the problem could be after an update?

thanks!

switch:
  - platform: command_line
    switches:
      Light_01:
        command_on: "/usr/bin/curl -X GET 'http://username:[email protected]/io.cgi?DOA9=0'"
        command_off: "/usr/bin/curl -X GET 'http://username:[email protected]/io.cgi?DOI9=0'"
        command_state: "/usr/bin/curl -X GET ''(same url but can only post 2 links in one post)/io.cgi'"
        value_template: '{{ value[16] == "1" }}'
        friendly_name: Light_01

I have this:
command_on: "/usr/bin/curl -u admin:password -X GET 'http://192.168.86.132/io.cgi?DOA6=0'"