MQTT Light Configuration Help

I’ve decided to move away from Homeseer and over to HA/Node-Red/mqtt. However given that I have a TON of Zwave devices and sensors in my house, rather than including everything again via Zwave and HA I decided to use a homeseer mqtt plugin. The plugin works, I can turn lights on an off using node-red->mqtt that exist in homeseer. Where I am having issue is with the HA configuration.

The homeseer mcsmqtt plugin sends and receives basic string values for dimmer/switches. With 0 being off and 99 being on. No JSON formatting or anything, just 0-99. However, I can’t figure out how to configure HA in this manner so that it can get status and set values making lights turn on/off etc.

Here is my current configuration for a given light. I have a feeling

  light:
  - platform: mqtt
    name: "Family Room Hall"
    unique_id: "FamilyRoomHallLight"
    on_command_type: "brightness"
    brightness_command_topic: "homeseer/Family_Room/Light/Family_Room_Hallway/Control"
    brightness_scale: "99"
    payload_on: "99"
    payload_off: "0"
    state_topic: "homeseer/Family_Room/Light/Family_Room_Hallway"
    command_topic: "homeseer/Family_Room/Light/Family_Room_Hallway/Control"
    optimistic: false
    retain: true

All I want HA to do is send “99” or “0” or another value for dimming between 0-99 as text strings not JSON.

Your configuration looks correct to me. What MQTT messages do you need to send, and what messages is this configuration sending?

Something odd is going on.

If I use the “MQTT” test page in HA and send “99” or “On” the light goes on. However when my HA configuration sends THE EXACT SAME payload it doesn’t do anything. HA doesn’t know the status of the light even though mqtt has retain for my topics.

Check this out:

Figured it out, had errors in my configuration.yaml.

1 Like