#hi im having problems with auto

1 messages · Page 1 of 1 (latest)

acoustic salmon
#

MQTT Discovery requires those devices to publish a valid Discovery payload for Home Assistant - it doesn't support random devices

#

What makes you think that they support HA's MQTT Discovery protocol?

wise sable
#

because it allows me to send data to home assistant mosquitto broker via mqtt

#

anyway is there a solution to this?

acoustic salmon
#

That doesn't mean it supports the MQTT Discovery protocol

acoustic salmon
#

Define the entities manually

wise sable
#

yea im having trouble with that, im new to this so i dont quite understand the manual process, could you guide me on this?

acoustic salmon
#

Start with the basics

#

What are you trying to connect?

wise sable
#

at the moment im able to recieve messages via mosquitto broker so at least its communicating

wise sable
acoustic salmon
#

So you know the topics, which is 99% of the challenge

#

Ok, so a leak sensor, or water level?

wise sable
#

leak

wise sable
#

its not a binary sensor as it has temp and humidity as well

acoustic salmon
#

The leak part is a binary sensor

wise sable
#

i see

acoustic salmon
#

You then need to define separate entities for the temperature and humidity

wise sable
#

hi how would i know if the device supports mqtt discovery protocol?

#

is there a setting or something?

acoustic salmon
#

In the documentation it (or the firmware for it) provides it would tell you

wise sable
#

so this mqtt discovery protocol, is it specific to home assistant

#

?

acoustic salmon
#

Yes

wise sable
#

'''sensor:

  • name: "Temperature"
    state_topic: "homeassistant/sensor/water-sensor/uplink"
    suggested_display_precision: 1
    unit_of_measurement: "*C"
    value_template: "{{ value_json.temperature}}"
    availability:
    topic: "homeassistant/sensor/water-sensor/uplink"
  • name: "Humidity"
    state_topic: "homeassistant/sensor/water-sensor/uplink"
    unit_of_measurement: "%"
    value_template: "{{ value_json.humidity}}"
    availability:
    topic: "homeassistant/sensor/water-sensor/uplink"
    binary_sensor:
  • name: "Leak"
    state_topic: "homeassistant/sensor/water-sensor/uplink"
    payload_on: "Leak"
    payload_off: "Normal"
    value_template: "{{ value_json.leak}}"
    availability:
    topic: "homeassistant/sensor/water-sensor/uplink"
    '''
#

this is what i got, is this right?

shrewd sableBOT
#

To format your text as code, enter three backticks on the first line, press Shift+Enter for a new line, paste your code, press Enter again for another new line, and lastly three more backticks.
```yaml
example: here
```
Don't forget you can edit your post rather than repeatedly posting the same thing.

acoustic salmon
#

Assuming that's correctly formatted, and under mqtt: then ... maybe

shrewd sableBOT
acoustic salmon
#

That command will tell you if the YAML is valid

wise sable
#

however the sensors report as unavailable eventhough im receiving mqtt messages

acoustic salmon
#

That's likely down to your availability topics

wise sable
#

could you explain that, i just followed the guide, i dont actually know what i does

acoustic salmon
#

Then leave it out for now 😉

#

Get the basics working before you try the fancy stuff

wise sable
#

oh wow the temp and humidity is working now, but the leak reports as unknown why is that?

acoustic salmon
#

Because there's not yet been a message from it

#

Try triggering it (short the contacts)

wise sable
#

only the temp and humidity updates, the leak still says unknown

#

is there something wrong with my code?

acoustic salmon
#

You didn't use code markup so it's hard to know

#

You didn't share anything about the payloads so we can't even guess

wise sable
#

well the payload is just
humidity: 40
temp: 29
water_leak: normal

acoustic salmon
#

The unformatted snippet you posted doens't show that you handle normal for the leak sensor

wise sable
#

meaning?

acoustic salmon
#

Did you read those links?

#

**payload_off **string (optional, default: OFF)
The off payload is assumed to be OFF unless you tell HA otherwise

#

Your off payload is normal

#

normal is not OFF

wise sable
#

i see

#

wait then how do redefine it?

acoustic salmon
wise sable
#

im sorry im really new to this

acoustic salmon
#

Did you read the links I posted?

wise sable
#

ya i did but its quite confusing, so many technical terms

acoustic salmon
#

You need to define your on (and optionally off) payloads

#
# Example configuration.yaml entry
mqtt:
  binary_sensor:
    - name: "Window Contact Sensor"
      state_topic: "home-assistant/window/contact"
      payload_on: "ON"
#

Clearly you know your payload isn't ON - but you need to know what it is

wise sable
#

so basicly i just change the payload_on to leak instead of on?

acoustic salmon
#

If that's what it is when water is detected

wise sable
#

''' binary_sensor:

  • name: "Leak"
    state_topic: "homeassistant/sensor/water-sensor/uplink"
    payload_on: "leak"
    payload_off: "normal"
    value_template: "{{ value_json.state}}"
#

like this?

acoustic salmon
#

Backticks for code blocks

shrewd sableBOT
#

To format your text as code, enter three backticks on the first line, press Shift+Enter for a new line, paste your code, press Enter again for another new line, and lastly three more backticks.
```yaml
example: here
```
Don't forget you can edit your post rather than repeatedly posting the same thing.

wise sable
#

'''
binary_sensor:

  • name: "Leak"
    state_topic: "homeassistant/sensor/water-sensor/uplink"
    payload_on: "leak"
    payload_off: "normal"
    value_template: "{{ value_json.state}}"
    '''
acoustic salmon
#

You used the same ones... and expected a different result?

wise sable
#

no i dont get you mean

acoustic salmon
#

The other option is to use a code share site

shrewd sableBOT
#

Please use a code share site to share code or logs, for example:

Please don't use Pastebin, since it can randomly add spaces to the main view. Please also don't share text as images since it makes it harder for people to help you. Remember that others may have colour blindness, impaired vision, etc.

wise sable
#

hi, quick question, anyway to remove the home assistant branding on the top left? (sidebar)