ESPHome - Blitzwolf BW-SHP6 configuration

Only just received two SHP7, the double version of this. Won’t have time to poke the serial and stuff for a while, but uploaded some pictures if anyone wanna have a look under the hood before ordering these.


(No idea if ESPHome is possible or not at this time; looking closer the green module does say RL_ESP8285_Z0_V2.0 so I guess its just a matter of mapping pins one day I have the time:)
((or just pull the module, read the silkscreen, then probe the board another day https://ibb.co/album/jR0taa))

Done intitial pin mapping:

wifi module
IO1/TX   IO3/RX
IO5      IO4
IO0      IO2
IO13     IO12
IO14     IO16
IOUT*    GND
VDD

mapping
IO0       switch1 (next to wifi module)
IO13      led1
IO15      relay1
IO2       switch2
IO12      led2
IO16      relay2
IO01/TX   blue led
IO03/RX** SEL HLW8012? pin 8
IO5**     CF1 HLW8012? pin 7
IO4**     CF  HLW8012? pin 6
GND           HLW8012? pin 5
VDD           HLW8012? pin 1

*) no idea if correct, seems unused
**) untested

Hope to get it flashed soon:) Flashed, need to get buttons and power meter chip working.
Button shows up in log once, but doesn’t do anything besides show up in log.

[22:32:30][D][binary_sensor:036]: 'button1': Sending state OFF
[22:32:33][D][binary_sensor:036]: 'button2': Sending state OFF

add mode: INPUT_PULLUP fixes button.

config.yaml so far:

substitutions:
  device_name: blitzwolf07 

esphome:
  name: ${device_name}
  platform: ESP8266
  board: esp8285

wifi:
  ssid: !secret iot_ssid
  password: !secret iot_password
  domain: !secret iot_domain 
  ap:
    ssid: "ESPhome"
    password: !secret iot_password

logger:
  baud_rate: 0
  hardware_uart: UART1

api:

ota:

#IO13      led1       ok
#IO12      led2       ok
#IO01/TX   blue led   ok 
#IO0       switch1    ok?
#IO2       switch2    ok?
#IO15      relay1     ok
#IO16      relay2     ok

binary_sensor:
  - platform: gpio
    id: button1
    #internal: true
    pin:
      number: GPIO00
      mode: INPUT_PULLUP
    on_press:
      - switch.toggle: relay1
  - platform: gpio
    id: button2
    #internal: true
    pin:
      number: GPIO12
      mode: INPUT_PULLUP
    on_press:
      - switch.toggle: relay2

output:
  - platform: gpio
    pin: GPIO13
    inverted: true
    id: led1
  - platform: gpio
    pin: GPIO02
    inverted: true
    id: led2

switch:
  - platform: gpio
    pin: GPIO14
    id: relay1
    name: '${device_name} Relay 1'
    on_turn_on:
      - output.turn_on: led1
    on_turn_off:
      - output.turn_off: led1
  - platform: gpio
    pin: GPIO16
    id: relay2
    name: '${device_name} Relay 2'
    on_turn_on:
      - output.turn_on: led2
    on_turn_off:
      - output.turn_off: led2

status_led:
  pin:
    number: GPIO01 #tx
    inverted: true
1 Like