home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
72.61k stars 30.37k forks source link

mqtt and device_tracker #961

Closed carlosmgr closed 8 years ago

carlosmgr commented 8 years ago

Hi, and great project

After a stop/start or a reboot of the home-assistant, it does not know the state of the mqtt nodes. Sensors are always sending updates to the home-assistant, but lights and switches are not required to. So it would be nice to query the mqtt nodes during home-assistant startup.

One thing that i think is very important its to stop the use of telnet, i know that this is for home, but if we are using mqtt with certificates and http with TLS/SSL, why not SSH? I'm talking about the device_tracker, in my case aruba and thomson.

Many thanks

happyleavesaoc commented 8 years ago

Can the mqtt retain flag help you? Then on startup, HA would get all retained states for your lights and switches.

carlosmgr commented 8 years ago

I have to test it, but it would not resolve the problem completely, because the broker and HA are on the same machine, one reboot and the retain data is lost. If is something hard to do, I think i can configure a periodic transmission, i'm just trying to avoid that option.

balloob commented 8 years ago

Setting the retain flag on MQTT is indeed the solution here.

About the telnet device tracker, if it can be done by SSH, a PR is welcome.