#hi im having problems with auto
1 messages · Page 1 of 1 (latest)
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?
because it allows me to send data to home assistant mosquitto broker via mqtt
anyway is there a solution to this?
That doesn't mean it supports the MQTT Discovery protocol
yea im having trouble with that, im new to this so i dont quite understand the manual process, could you guide me on this?
at the moment im able to recieve messages via mosquitto broker so at least its communicating
water detection sensor
So you know the topics, which is 99% of the challenge
Ok, so a leak sensor, or water level?
leak
its not a binary sensor as it has temp and humidity as well
The leak part is a binary sensor
i see
hi how would i know if the device supports mqtt discovery protocol?
is there a setting or something?
In the documentation it (or the firmware for it) provides it would tell you
'''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?
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.
Assuming that's correctly formatted, and under mqtt: then ... maybe
To check your configuration use the command for your install method:
That command will tell you if the YAML is valid
however the sensors report as unavailable eventhough im receiving mqtt messages
That's likely down to your availability topics
could you explain that, i just followed the guide, i dont actually know what i does
Then leave it out for now 😉
Get the basics working before you try the fancy stuff
oh wow the temp and humidity is working now, but the leak reports as unknown why is that?
Because there's not yet been a message from it
Try triggering it (short the contacts)
only the temp and humidity updates, the leak still says unknown
is there something wrong with my code?
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
If you ran #1122747220404478000 message then the YAML is valid
well the payload is just
humidity: 40
temp: 29
water_leak: normal
The unformatted snippet you posted doens't show that you handle normal for the leak sensor
meaning?
Did you read those links?
**payload_off **string (optional, default: OFF)
The off payload is assumed to beOFFunless you tell HA otherwise
Your off payload is normal
normal is not OFF
im sorry im really new to this
Did you read the links I posted?
ya i did but its quite confusing, so many technical terms
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
so basicly i just change the payload_on to leak instead of on?
If that's what it is when water is detected
''' binary_sensor:
- name: "Leak"
state_topic: "homeassistant/sensor/water-sensor/uplink"
payload_on: "leak"
payload_off: "normal"
value_template: "{{ value_json.state}}"
like this?
Backticks for code blocks
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.
'''
binary_sensor:
- name: "Leak"
state_topic: "homeassistant/sensor/water-sensor/uplink"
payload_on: "leak"
payload_off: "normal"
value_template: "{{ value_json.state}}"
'''
You used the same ones... and expected a different result?
no i dont get you mean
The other option is to use a code share site
Please use a code share site to share code or logs, for example:
- https://dpaste.org/ (select YAML for the language, and consider picking a longer expiry)
- http://pastie.org/ (select YAML for the language)
- https://paste.debian.net/ (you guessed it, select YAML as the language)
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.
hi, quick question, anyway to remove the home assistant branding on the top left? (sidebar)