Welcome to MattzoBricks › Forums › MattzoBricks General Forum › Rockrail – step-by-step?
- This topic has 5 replies, 4 voices, and was last updated 1 year, 3 months ago by Razvan Anghel.
-
AuthorPosts
-
-
October 31, 2022 at 03:43 #5552Tomas SadilekParticipant
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.
-
October 31, 2022 at 05:26 #5553Hilbert BModerator
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 -
October 31, 2022 at 05:28 #5554Hilbert BModerator
Host open, should be host ip (entering this on my phone and something like autocorrect)
-
October 31, 2022 at 06:05 #5555Károly LónichParticipant
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.
-
October 31, 2022 at 19:53 #5558Tomas SadilekParticipant
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.
-
June 16, 2023 at 20:36 #6320Razvan AnghelParticipant
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.
-
-
AuthorPosts
- You must be logged in to reply to this topic.