Welcome to MattzoBricks Forums MattzoBricks General Forum Rockrail – step-by-step?

Viewing 5 reply threads
  • Author
    Posts
    • #5552
      Tomas SadilekTomas Sadilek
      Participant

      Hello,

      First, thank you so much for putting this wonderful project together.

      I have managed – thus far – to this point:

      1) ESP32 flashed and connected to WiFi/MQTT. I can see PINGREQ/PINGREST commands in the CMD mosquitto window.
      2) My locomotive hub is successfully connected (the PU Hub indicator color is red) with the following configuration:

      {
      “address”: 3,
      “name”: “PT60197”,
      “speedStep”: 8,
      “brakeStep”: 50,
      “bleHubs”: [
      {
      “type”: “PU”,
      “address”: “90:84:2b:bf:09:5a”,
      “channels”: [
      {
      “channel”: “A”,
      “attachedDevice”: “motor”,
      “direction”: “forward”
      },
      {
      “channel”: “B”,
      “attachedDevice”: “motor”,
      “direction”: “reverse”
      }
      ]
      }
      ]
      },

      However, I am having an issue connecting Rocrail to the MQTT server. It is likely a simple issue though I have not yet been successful.

      This is what I have done so far:
      1) Start Rocview
      2) Use the DEMO workspace
      3) Delete all locomotives
      4) Add a new one with address (3) – other parameters on the same line are 0, OID 0, UID 0
      5) Set the interface to “vcs-1”
      6) Set decoder steps to 255, the other box is 28 (default value)
      7) Rockrail properties –> Service tab –> MQTT service (hostname = (blank), port = 1883, userid = localhost, password = (blank)).

      Rocrail does not seem to connect to the MQTT service. The main window also shows (bottom tab) this: “localhost : 8051”, though this could be a different service from my MQQT service.

      Thank you – I would be happy to post some screenshots, though I do not know how.

    • #5553
      Hilbert BHilbert B
      Moderator

      Hi Tomas,
      My guess would be that mqtt hostname cannot be blank. Please enter the mqtt host open in hostname and leave userid blank.
      It should probably be the same up address you entered in the network configuration json file. Then it should probably work.
      Hilbert

    • #5554
      Hilbert BHilbert B
      Moderator

      Host open, should be host ip (entering this on my phone and something like autocorrect)

    • #5555
      Károly LónichKároly Lónich
      Participant

      If your MQTT server running on the same machine where your rocrail installed then use localhost for MQTT Service hostname. For userid use whatever you want but don’t leave it blank.

    • #5558
      Tomas SadilekTomas Sadilek
      Participant

      Dear all, thank you for your suggestions.

      This is what I have done:

      1) Hostname: localhost
      2) UserID: Tomas
      3) Port: 1883
      4) Password: –blank–

      I actually had to restart Rocview/Rocserver for these changes to take effect. Once I have done so, I saw a lot of MQTT traffic in the CMD window running MQTT (mosquitto -c mosquitto.conf -v).

      Then I moved the slider on the locomotive control – and bam, the PU bogie connected to the hub started spinning away. Love it! It is a first step toward automating my mini layout.

    • #6320
      Razvan AnghelRazvan Anghel
      Participant

      Hello.

      I can not configure Rocrail to run my train in automatic.
      Anyone have any tips whhat to be configured? or can share his configuration?
      Thanks.

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