With the help of this great community and also a lot of help from Wannaduino I’ve built two of his crazy vu meters.
So the VU Meter is this one: https://youtu.be/9un-IkhvpLI
It looks great.
To have it integrated into HA, I decided to go with this board
So with the help of a lot of guys here:
I got the relay board working, so the esphome config looks like this:
substitutions:
device_name: vumeter1
esphome:
name: vu_meter_1
platform: ESP8266
board: esp01_1m
wifi:
ssid: "WIFI_SSID"
password: "WIFI_PASS"
# Enable Home Assistant API
api:
ota:
password: "OTA_PASS"
# Enable logging
logger:
baud_rate: 0 #need this to free up UART pins
uart:
baud_rate: 115200 # speed to STC15L101EW
tx_pin: GPIO1
rx_pin: GPIO3
# Text Sensor with general information
text_sensor:
- platform: version
name: '${device_name} ESPHome Version'
- platform: wifi_info
ip_address:
name: '${device_name} ip'
ssid:
name: '${device_name} ssid'
sensor:
- platform: wifi_signal
name: '${device_name} WiFi Signal'
update_interval: 60s
accuracy_decimals: 0
- platform: uptime
name: '${device_name} Uptime'
unit_of_measurement: days
update_interval: 300s
accuracy_decimals: 1
filters:
- multiply: 0.000011574
switch:
- platform: template
name: '${device_name} Power'
id: relay1
turn_on_action:
- uart.write: [0xA0, 0x01, 0x01, 0xA2]
turn_off_action:
- uart.write: [0xA0, 0x01, 0x00, 0xA1]
optimistic: true
- platform: template
name: '${device_name} Mode change'
id: relay2
turn_on_action:
- uart.write: [0xA0, 0x02, 0x01, 0xA3]
- delay: 500ms
- uart.write: [0xA0, 0x02, 0x00, 0xA2]
So relay1 handles the power-on/off, and the relay2 is set up as a momentary switch so it will change modes for the VU Meter.
I haven’t gotten the ‘foot’ 3dprinted yet, so I’ve just mounted it on a piece of pinewood. It looks like this:
The card I’ve made looks like this:
(here one is turned off, the other on).
The lovelace config looks like this:
cards:
- color_type: blank-card
type: 'custom:button-card'
- color_type: blank-card
type: 'custom:button-card'
- cards:
- type: picture-entity
entity: switch.vumeter1_power
show_name: false
show_state: false
state_image:
'on': /local/vu-meter-on.png
'off': /local/vu-meter-off.png
tap_action:
action: toggle
- type: entity-button
entity: switch.vumeter1_mode_change
show_icon: false
type: vertical-stack
- cards:
- type: picture-entity
entity: switch.vumeter2_power
show_name: false
show_state: false
state_image:
'on': /local/vu-meter-on.png
'off': /local/vu-meter-off.png
tap_action:
action: toggle
- type: entity-button
entity: switch.vumeter2_mode_change
show_icon: false
type: vertical-stack
- color_type: blank-card
type: 'custom:button-card'
- color_type: blank-card
type: 'custom:button-card'
type: horizontal-stack