Controling a Devantech ETH008

Tags: #<Tag:0x00007fc3eea03368> #<Tag:0x00007fc3eea032a0>

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.