StyraHem / ShellyForHASS

Shelly smart home platform for Home Assistant
MIT License
621 stars 112 forks source link

[FR] Select communication protocol #446

Closed Thomas55555 closed 4 years ago

Thomas55555 commented 4 years ago

Is your feature request related to a problem? Please describe.

I have problems to get a stable connection to my shellies over CoAP. They are just working 95% of the time. When they get unavailable I receive error messages in the HA log. To be honest, I just discovered the igmp_fix option, but now the custom component ist already deleted. But the MQTT connection always works good.

Describe the solution you'd like

It would be nice anyway to select, which protocol should be used to communicate with HA. e.g. MQTT If there are communications on three different protocols it doesn't make it easy to find a mistake.

Describe alternatives you've considered

Instead of selecting an protocol, it would also be possible to deselect unwanted protocols. The other alternative is the native MQTT integration in HA, but it doesn't support states like opening or closing

Additional context

example for configuration.yaml

shelly:
   coap: false
   mqtt: true
   api: false
hakana commented 4 years ago

I don't see the reason to disable CoAP. If it works it adds real-time updates. If it is not working it does not affect anything.

API is needed to control the device and also get some extra information.

The MQTT implementation also needs API to work.

You can also see what protocols working by checking the protocols attribute on each device.

There is a hidden setting debug_enable_info we used to see what information it got from API and CoAP. It adds the values to the attribute name, but nothing I recommend to use in production.

I close this issue now.