Setting up Pilight with Brennenstuhl sockets (Solved with REST API and Curl)

Tags: #<Tag:0x00007f7395345688>

Hello everyone,

I am trying to integrate my Brennestuhl sockets into Home Assistant via Pilight.

I can already turn the sockets on and off via Pilight on my Raspberry, but it does not work under Home Assistant yet.

This works:

pilight-send -p elro_800_switch -s 17 -u 2 -f    # off
pilight-send -p elro_800_switch -s 17 -u 2 -t    # on

Unfortunately I cannot use my switch in Home Assistant.

This is my current configuration.yaml:

pilight:
    host: 192.168.1.12
    port: 5000
    send_delay: 0.4

switch:
- platform: pilight
  switches:
    Lampe 1:
      on_code:
        protocol: elro_800_switch
        systemcode: 17
        unitcode: 2
        state: 'on'
      off_code:
        protocol: elro_800_switch
        systemcode: 17
        unitcode: 2
        state: 'off'

Do you have any ideas? I would be happy :slight_smile:

Ok, I think the Pilight integration is broken or extremely buggy… I solved it with the REST API and curl :slight_smile:

switch:
  - platform: command_line
    switches:
      kitchen_light:
        command_on:  '/usr/bin/curl -X PUT "http://192.168.1.12/send?protocol=elro_800_switch&on=1&systemcode=17&unitcode=2"'
        command_off:  '/usr/bin/curl -X PUT "http://192.168.1.12/send?protocol=elro_800_switch&off=1&systemcode=17&unitcode=2"'