Home Assistant integration - 0xnobodyreally/SMartBoards GitHub Wiki
SMartBoards are fully compatible with Home Assistant , see below the code to integrate them with your Home Assistant installation:
Home Assistant integration for LED Strip:
# Light entity with Brightness, Effects and RGB color picker
light:
- name: SMartBoard LED Strip
platform: mqtt
state_topic: "smartboard/power/state"
command_topic: "smartboard/power/set"
brightness_state_topic: 'smartboard/brightness/state'
brightness_command_topic: 'smartboard/brightness/set'
rgb_state_topic: 'smartboard/rgb/state' # color picker
rgb_command_topic: 'smartboard/rgb/set' # color picker
effect_state_topic: 'smartboard/fx/state' # effect list
effect_command_topic: 'smartboard/fx/set' # effect list
brightness_scale: 255
payload_on: "on" # on
payload_off: "off" # off
brightness_value_template: "{{ value_json.brightness }}"
rgb_value_template: "{{ value_json.rgb | join(',') }}"
effect_list:
- bpm
- confetti
- fire
- juggle
- rainbow
- rainbow with glitter
- sinelon
- cyclonms
- sparklems
retain: false
optimistic: false
qos: 0
# Sensors to display the current Brightness, Effects, Uptime, Free Heap and Free Stack in a separate entity
sensor:
- name: SMartBoard Brightness
platform: mqtt
state_topic: "smartboard/brightness/state"
- name: SMartBoard FX
platform: mqtt
state_topic: "smartboard/fx/state"
- name: SMartBoard Uptime
platform: mqtt
state_topic: "smartboard/uptime"
- name: SMartBoard Free Heap
platform: mqtt
state_topic: "smartboard/freeheap"
- name: SMartBoard Free Stack
platform: mqtt
state_topic: "smartboard/freestack"
# Binary Sensor to display if the network status:
binary_sensor:
- name: Ping SMartBoard
platform: ping
host: 192.168.1.100 # replace this with the IP address of your SMartBoard
count: 3 # how many pings you want to send
scan_interval: 60 # how often you want to ping your SMartBoard (in seconds)
# Script to reboot SMartBoard from MQTT
script:
reboot_smartboard:
sequence:
- service: mqtt.publish
data_template:
topic: 'smartboard/power/set'
payload: 'reboot'
Home Assistant integration for Relays:
switch:
# Relay 1
- name: "Relay 1"
platform: mqtt
state_topic: "smartboard/relay1/power/state"
command_topic: "smartboard/relay1/power/set"
payload_on: "on"
payload_off: "off"
state_on: "on"
state_off: "off"
optimistic: false
retain: false
qos: 0
# Relay 2
- name: "Relay 2"
platform: mqtt
state_topic: "smartboard/relay2/power/state"
command_topic: "smartboard/relay2/power/set"
payload_on: "on"
payload_off: "off"
state_on: "on"
state_off: "off"
optimistic: false
retain: false
qos: 0
# Relay 3
- name: "Relay 3"
platform: mqtt
state_topic: "smartboard/relay3/power/state"
command_topic: "smartboard/relay3/power/set"
payload_on: "on"
payload_off: "off"
state_on: "on"
state_off: "off"
optimistic: false
retain: false
qos: 0
# Relay 4
- name: "Relay 4"
platform: mqtt
state_topic: "smartboard/relay4/power/state"
command_topic: "smartboard/relay4/power/set"
payload_on: "on"
payload_off: "off"
state_on: "on"
state_off: "off"
optimistic: false
retain: false
qos: 0
# Sensors to display the Uptime, Free Heap and Free Stack in a separate entity
sensor:
- name: SMartBoard Uptime
platform: mqtt
state_topic: "smartboard/uptime"
- name: SMartBoard Free Heap
platform: mqtt
state_topic: "smartboard/freeheap"
- name: SMartBoard Free Stack
platform: mqtt
state_topic: "smartboard/freestack"
# Binary Sensor to display if the network status:
binary_sensor:
- name: Ping SMartBoard
platform: ping
host: 192.168.1.100 # replace this with the IP address of your SMartBoard
count: 3 # how many pings you want to send
scan_interval: 60 # how often you want to ping your SMartBoard (in seconds)
# Script to reboot SMartBoard from MQTT
script:
reboot_smartboard:
sequence:
- service: mqtt.publish
data_template:
topic: 'smartboard/relay1/power/set' # only 'relay1' support the reboot command
payload: 'reboot'
Home Assistant Sensors for all SMartBoards:
# Sensors to display the MqttLog in a separate entity`
sensor:
# MqttLog Monitor
- name: MqttLog
platform: mqtt
state_topic: "MqttLog"