ratgdo / esphome-ratgdo

ratgdo for ESPHome
GNU General Public License v2.0
357 stars 108 forks source link

Request: mqtt support #35

Closed jonathanjacob closed 9 months ago

jonathanjacob commented 1 year ago

Any chance for direct MQTT support similar to the original ratgdo?

I tried via the yaml file but had an issue.

jonathanjacob commented 1 year ago

also thanks for all of the hard work!

jonathanjacob commented 1 year ago

@mariusmuja any thoughts?

mariusmuja commented 1 year ago

Esphome requires the use of the yaml file to configure mqtt. You need to to replace:

api:
  id: api_server

in file https://github.com/ESPHome-RATGDO/esphome-ratgdo/blob/main/static/v2board_esp8266_d1_mini_lite.yaml with something like:

mqtt:
  broker: ...
  username: ...
  password: ...

Then upload the firmware to the device by running: esphome run v2board_esp8266_d1_mini_lite.yaml

PaulWieland commented 1 year ago

This isn't really possible to do because of the way ESPHome was designed. We've been discussing this and there doesn't seem to be a viable way to have one firmware built on ESPHome that also supports MQTT. You have to custom compile your own ESPHome firmware which has your MQTT credentials baked in.