Welcome to MattzoBricks Forums MattzoTrainController for Bluetooth (MTC4BT) MQTT credentials in network_config

Viewing 6 reply threads
  • Author
    Posts
    • #5380
      torobins ...torobins …
      Participant

      1st time posting. Matthias, thank you for this site. it is a wealth of information. I have been able to configure an esp32 with the MTC4BT firmware and use rocrail successfully using a public MQTT broker!! I was wondering if there is a way to specify credentials for my local mqtt broker in the network_config file? my local broker is mosquitto running through home assistant which requires username and password. after much research, i do not think there is a way for the home assistant mosquitto broker to accept anonymous users or null username/password. I have tried to add “password” and “username” lines to the network_config.json file but this does not work. any suggestions? thank you again for this wonderful site.

    • #5381
      Matthias RunteMatthias Runte
      Keymaster

      For the Arduino based controllers (MLC and MTC4PF) it should be quite simple: just add username and password to the connect method of the PubSubClient. Check https://pubsubclient.knolleary.net/api#connect

      I will ask Ray to check how this would be done for the MTC4BT.

    • #5382
      Raymond BrinkRay
      Keymaster

      That’s correct. There’s currently no way you’d be able to specify the credentials to use to connect to MQTT. It’s probably a small addition though, so we’ll try to add it asap.

    • #5391
      torobins ...torobins …
      Participant

      thanks! I look forward to it.

    • #6559
      Henrik WilsHenrik Wils
      Participant

      Any updates on this? I’ve got the same problem, and need to control my train from Home Assistant 🙂

    • #6560
      Matthias RunteMatthias Runte
      Keymaster

      Not yet. We have created a feature request for this request. Once we find the necessary time, we’ll care about it. Maybe around Christmas. Thanks for your patience.

    • #6582
      Henrik WilsHenrik Wils
      Participant

      Happy new year 🙂 Hope that I can soon get my train working automagically from HA. It will actually be a feature for my Twitch channel, where a hype train should kick off the train by itself, so I’m really looking forward to it.

      • #6586
        Matthias RunteMatthias Runte
        Keymaster

        No. I am presently busy motorizing and automating the Orient Express. After that, I will finish a couple of other projects and then hopefully be able to start working on important backlog issues like this one. Thanks for your patience.

Viewing 6 reply threads
  • You must be logged in to reply to this topic.