Hi,
I've decided to try and get my espixestick working with MQTT and home assistant. I don;t know much about HA or using MQTT, so this is what I have tried.
I made an Ubuntu Server VM and installed HA following these instructions. Got it running no problems.
I then added the following to configuration.yaml :
mqtt:
light:
- platform: mqtt
name: "PixelStick01"
state_topic: "matrix/esps/light/status"
command_topic: "matrix/esps/light/switch"
brightness_state_topic: "matrix/esps/brightness/status"
brightness_command_topic: "matrix/esps/brightness/set"
rgb_state_topic: "matrix/esps/rgb/status"
rgb_command_topic: "matrix/esps/rgb/set"
brightness_scale: 100
optimistic: false
Restarted HA and now I have the light button.
I configured the espixelstick as follows:
However, when I try and turn on the light. nothing happens. The slider switch on the console goes on and then right back off. Any ideas? Something wrong with my config? I also don't seem to have a color picker.
Thanks
Glad you got it working. I'm just beginning using pixel nodes and I want everything to run through Home Assistant. Thanks for your work.
Hello, I have been working on this for some time and I could really use some help.
In hassio I have created a binary sensor that communicates with a light sensor that can go into "isdark" state if the lux goes below 100.
I then tried add an automation that when "isdark" activates it sends and on state to the EspixelStick and have lights come on. I can get my "isdark" state to on and I can manually turn on lights but can't get lights to trigger from "isdark".
Below is parts of my config.yaml
light:
#espixelstick subnet 110
- platform: mqtt
name: "PixelStick01"
state_topic: "matrix/esps/light/status"
command_topic: "matrix/esps/light/switch"
brightness_state_topic: "matrix/esps/brightness/status"
brightness_command_topic: "matrix/esps/brightness/set"
rgb_state_topic: "matrix/esps/rgb/status"
rgb_command_topic: "matrix/esps/rgb/set"
brightness: true
flash: true
rgb: true
optimistic: false
qos: 0
sensor:
#Light sensor
- platform: mqtt
state_topic: "bruh/sensornode1"
name: "SN1 LDR"
##This sensor is not calibrated to actual LUX. Rather, this a map of the input voltage ranging from 0 - 1023.
unit_of_measurement: "LUX"
value_template: '{{ value_json.ldr }}'
# Binary Sensors
binary_sensor:
- platform: threshold
name: isdark
entity_id: sensor.sn1_ldr
lower: 100
hidden: true
#Groups
group:
sensor_node_1_card:
name: Sensor Node 1
entities:
- sensor.sn1_temperature
- sensor.sn1_humidity
- sensor.sn1_ldr
- light.sn1_led
automation:
- alias: EspixelStick110 On
trigger:
- platform: state
entity_id: binary_sensor.isdark
to: 'on'
condition:
- condition: state
entity_id: binary_sensor.isdark
state: 'on'
action:
- service: mqtt.publish
data_template:
topic: "matrix/esps"
payload: '{"state":"ON"}'
- alias: EspixelStick110 Off
trigger:
- platform: state
entity_id: binary_sensor.isdark
to: 'off'
condition:
- condition: state
entity_id: binary_sensor.isdark
state: 'on'
action:
- service: mqtt.publish
data_template:
topic: "matrix/esps"
payload: '{"state":"OFF"}'
script: !include scripts.yaml
Any insight would be deeply appriciated
tecnageek wrote:Hello, I have been working on this for some time and I could really use some help.
In hassio I have created a binary sensor that communicates with a light sensor that can go into "isdark" state if the lux goes below 100.
I then tried add an automation that when "isdark" activates it sends and on state to the EspixelStick and have lights come on. I can get my "isdark" state to on and I can manually turn on lights but can't get lights to trigger from "isdark".
Below is parts of my config.yamllight: #espixelstick subnet 110 - platform: mqtt name: "PixelStick01" state_topic: "matrix/esps/light/status" command_topic: "matrix/esps/light/switch" brightness_state_topic: "matrix/esps/brightness/status" brightness_command_topic: "matrix/esps/brightness/set" rgb_state_topic: "matrix/esps/rgb/status" rgb_command_topic: "matrix/esps/rgb/set" brightness: true flash: true rgb: true optimistic: false qos: 0 sensor: #Light sensor - platform: mqtt state_topic: "bruh/sensornode1" name: "SN1 LDR" ##This sensor is not calibrated to actual LUX. Rather, this a map of the input voltage ranging from 0 - 1023. unit_of_measurement: "LUX" value_template: '{{ value_json.ldr }}' # Binary Sensors binary_sensor: - platform: threshold name: isdark entity_id: sensor.sn1_ldr lower: 100 hidden: true #Groups group: sensor_node_1_card: name: Sensor Node 1 entities: - sensor.sn1_temperature - sensor.sn1_humidity - sensor.sn1_ldr - light.sn1_led automation: - alias: EspixelStick110 On trigger: - platform: state entity_id: binary_sensor.isdark to: 'on' condition: - condition: state entity_id: binary_sensor.isdark state: 'on' action: - service: mqtt.publish data_template: topic: "matrix/esps" payload: '{"state":"ON"}' - alias: EspixelStick110 Off trigger: - platform: state entity_id: binary_sensor.isdark to: 'off' condition: - condition: state entity_id: binary_sensor.isdark state: 'on' action: - service: mqtt.publish data_template: topic: "matrix/esps" payload: '{"state":"OFF"}' script: !include scripts.yamlAny insight would be deeply appriciated
I would suggest posting this question here https://www.reddit.com/r/homeassistant/ or on the official home assistant forums. They should easily be able to tell you what is going on. I'm still to new with home assistant to be of much help.
I've found both to be great communities full of knowledge.
I don't want to draw people away from this forum. I really think everyone's light setups should be combined with home automation software so any member of the house can start/stop/change the show.
tecnageek wrote:Hello, I have been working on this for some time and I could really use some help.
In hassio I have created a binary sensor that communicates with a light sensor that can go into "isdark" state if the lux goes below 100.
I then tried add an automation that when "isdark" activates it sends and on state to the EspixelStick and have lights come on. I can get my "isdark" state to on and I can manually turn on lights but can't get lights to trigger from "isdark".
Below is parts of my config.yamllight: #espixelstick subnet 110 - platform: mqtt name: "PixelStick01" state_topic: "matrix/esps/light/status" command_topic: "matrix/esps/light/switch" brightness_state_topic: "matrix/esps/brightness/status" brightness_command_topic: "matrix/esps/brightness/set" rgb_state_topic: "matrix/esps/rgb/status" rgb_command_topic: "matrix/esps/rgb/set" brightness: true flash: true rgb: true optimistic: false qos: 0 sensor: <<<<<<<<< #Light sensor - platform: mqtt state_topic: "bruh/sensornode1" name: "SN1 LDR" ##This sensor is not calibrated to actual LUX. Rather, this a map of the input voltage ranging from 0 - 1023. unit_of_measurement: "LUX" value_template: '{{ value_json.ldr }}' # Binary Sensors binary_sensor: - platform: threshold name: isdark entity_id: sensor.sn1_ldr lower: 100 hidden: true #Groups group: sensor_node_1_card: name: Sensor Node 1 entities: - sensor.sn1_temperature - sensor.sn1_humidity - sensor.sn1_ldr - light.sn1_led automation: - alias: EspixelStick110 On trigger: - platform: state entity_id: binary_sensor.isdark to: 'on' condition: - condition: state entity_id: binary_sensor.isdark state: 'on' action: - service: mqtt.publish data_template: topic: "matrix/esps" payload: '{"state":"ON"}' - alias: EspixelStick110 Off trigger: - platform: state entity_id: binary_sensor.isdark to: 'off' condition: - condition: state entity_id: binary_sensor.isdark state: 'on' action: - service: mqtt.publish data_template: topic: "matrix/esps" payload: '{"state":"OFF"}' script: !include scripts.yamlAny insight would be deeply appriciated
is your sensor: in the correct location ?
i know nothing about hassio , just curious as to why the indent
Yes, the indentation is correct. All sensors are working, just not able to get them to talk with the espixelstick.
So I was digging around and noticed the “The service dev tool” in Hassio and was able to come up with a working automation.
Now I need to be able to figure out how to send a color, and possibly send different colors based on different environmental variables.
- alias: EspixelStick110 On
trigger:
- platform: state
entity_id: binary_sensor.isdark
to: 'on'
action:
- service: homeassistant.turn_on
entity_id:
light.pixelstick110
- alias: EspixelStick110 Off
trigger:
- platform: state
entity_id: binary_sensor.isdark
to: 'off'
action:
- service: homeassistant.turn_off
entity_id:
light.pixelstick110
Can you only have two options?
Why not tell Alexis: "turn lights green" instead of "saying turn lights on"
tecnageek wrote:So I was digging around and noticed the “The service dev tool” in Hassio and was able to come up with a working automation.
Now I need to be able to figure out how to send a color, and possibly send different colors based on different environmental variables.- alias: EspixelStick110 On trigger: - platform: state entity_id: binary_sensor.isdark to: 'on' action: - service: homeassistant.turn_on entity_id: light.pixelstick110 - alias: EspixelStick110 Off trigger: - platform: state entity_id: binary_sensor.isdark to: 'off' action: - service: homeassistant.turn_off entity_id: light.pixelstick110
This is an interesting post. I'm setting up home assistant for my house, never thought of connecting to pixel controllers.
