Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

discovering shelly devices #468

Closed
hros opened this issue Sep 10, 2023 · 3 comments
Closed

discovering shelly devices #468

hros opened this issue Sep 10, 2023 · 3 comments

Comments

@hros
Copy link

hros commented Sep 10, 2023

Hi,
I came across your blog with the templates for MQTT Shelly integration with HA
Based on your template, I created an entry for a Shelly i3 device and restarted HA, but I do not see this device.

Before I install your automated device discovery tool, I want to be able to find my device and understand the various entries in the template.

When I test the MQTT integration by publishing a "shellies/command; announce" I get several messages from the device. This indicates that the communication configuration is OK.

I entered the template for the i3 (with the device id, and a chosen name), but after restarting HA, I get the following error message in HA:

Unused YAML configuration for the mqtt integration

It's not possible to configure mqtt sensor by adding platform: mqtt to the sensor configuration. Please check the documentation for more information on how to set up this integration.

To resolve this:

Remove platform: mqtt occurences from the sensor: configuration in your YAML configuration file.
Restart Home Assistant.
Example that should be removed:

sensor:
  - platform: mqtt

btw, your template has the field: expire_after: 604800, is that necessary?
does it mean that if the device was silent for a week it should be removed?

@hros hros added the bug Something isn't working label Sep 10, 2023
@bieniu bieniu added needs-more-information and removed bug Something isn't working labels Sep 10, 2023
@bieniu
Copy link
Owner

bieniu commented Sep 10, 2023

Please check the documentation for more information on how to set up this integration.

Your configuration is deprecated, read the documentation to avoid this message.

btw, your template has the field: expire_after: 604800, is that necessary?
does it mean that if the device was silent for a week it should be removed?

You can find information about MQTT options in the documentation: https://www.home-assistant.io/integrations/binary_sensor.mqtt/#expire_after

@hros
Copy link
Author

hros commented Sep 10, 2023

thanks, @bieniu
after ignore-ing the error it did not reappear. I guess it was not an issue with a "deprecated configuration", but the error was raised during one of my initial setups, and I did not clear it
Anyway, the configuration does not complain, but I still can't find my mqtt device/entity in HA for the Shelly i3 I setup.
I followed your binary sensor template for i3 and tried adding it either under switch: or under sensor: but did not see the new device in the devices/entities list

Note that the device is discovered with the Shelly integration with the CoIoT protocol, but I want to switch to MQTT

I did not find anything useful in the docs. What step am I missing to access the device in HA?
could it be an issue with the MQTT integration? I have the default options set:

Enable discovery: true
discovery prefix: homeassistant

Enable birth message: true
Birth message topic: homeassistant/status
Birth message payload: online
Birth message QoS: 0

Birth message retain: false

Enable will message: true
Will message topic: homeassistant/status
Will message payload: offline
Will message QoS: 0

Will message retain: false

@bieniu
Copy link
Owner

bieniu commented Sep 11, 2023

after ignore-ing the error it did not reappear. I guess it was not an issue with a "deprecated configuration"

If your config looks like this

sensor:
  - platform: mqtt

it is deprecated.

I did not find anything useful in the docs. What step am I missing to access the device in HA?

I don't know 🤷‍♂️ I won't guess what your configuration looks like. If you have a problem with the Shellies Discovery script, please open a ticket and describe it. If you need help setting up MQTT... sorry, but this isn't the place to do it.

@bieniu bieniu closed this as completed Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants