chrisweather / RocMQTTdisplay

Dynamic Passenger Information system with multiple displays for Model Railroad Stations controlled by Rocrail, Node-RED or other sources.
BSD 3-Clause "New" or "Revised" License
6 stars 1 forks source link

Alternative raspberry pi? #20

Closed ksw2404 closed 2 years ago

ksw2404 commented 2 years ago

Now that the displays have still not worked, I am looking for an alternative raspberry pi, that is mainly that here in the Netherlands they are completely sold out, you will hear the same from every IT store, problems with obtaining chips, among other things. That's why I looked for an alternative, and could that be a windows server? on which you can then put the mosquitto broker on it, that mosquitto broker is a huge stumbling block to make your display, I have asked several server companies and nobody knows the phenomenon Mosquitto broker, I thought that was bizarre, you can not adjust the display like that that the Mosquitto broker no longer needs? I have recently delved into it a lot and especially notice that since version 2.0 there are major problems with the ip address localhost, which has to make many adjustments. I still don't know what the problem is why the display doesn't work and I'm very sorry, I've spent 45 hours on it in the past week if not anymore but still to no avail. Your display is the only one where a logo of the train carrier can be displayed and that is a requirement for me, but so far pull in on dead horse, it does not work and if there is no good solution, it will not work . By the way could you post a serial monitor upload report if you upload the sketch to the eps8266 so I can see what it looks like when it does work, mine still says ip address is disabled, seems to be more common.

I don't know a raspberry pi, but does it have its own ip address and why is it better to install the msquitto broker on it?

do you think the only problem is why the display doesn't work or do you think i forgot to enter some more stuff? with, for example, data to be entered in the RocMQTTdisplay.ino?

I hope for a solution

Greetings

chrisweather commented 2 years ago

You can run the MQTT broker on your Windows PC. No need to buy a windows server or a raspberry. If I understand correctly you run Rocrail and the MQTT broker on the same Windows PC. In that case open in Rocrail the Help menu and click on Info... In that dialog you see the IP address of your PC. Use this IP address in your Rocrail configuration instead of 'localhost'. Also use this IP address in the Roc-MQTT-Display controller as the MQTT broker IP address. In the controller Configuration set 'Enable debug messages' to 1. This will show more detailed messages at startup in the serial monitor of the Arduino IDE. There you can see if the connection to the MQTT broker was successful or not. If not, you have either network configuration issues in your network or need to allow the communication in your desktop firewall settings on your PC.

ksw2404 commented 2 years ago

Hi, I ran it as you said and you will indeed get a complete report.

this came out:

WiFi: Connecting to FRITZ!Box 7581 AS ... (240.987000s) WiFi: Connected (245.076000s), ip : 192.168.178.33 MQTT: Connecting to broker "192.168.178.27" with client name "DESKTOP-TSQFTKL" and username "***" ... (245.592000s)unable to connect (250.733000s), reason: MQTT_CONNECT_FAILED MQTT: Retrying to connect in 10 seconds. MQTT!: Failed MQTT connection count: 1 MQTT: Connecting to broker "192.168.178.27" with client name "DESKTOP-TSQFTKL" and username "**" ... (260.750000s)unable to connect (266.031000s), reason: MQTT_CONNECT_FAILED

So apparently it is a mosquitto broker problem, and 1,2,3 have no solution for that, is there also another mosquitto broker connect program than MQTT explorer? if you neatly enter localhost then it connects, if you change that in the ip address, it refuses connection. this is apparently the problem and if this is not solved then the display will not work.

do you have a solution to a tip that I can perform so that the mqtt broker makes contact.

By the way, does it still matter if rocrail is on the D: write and mosquitto is on the c: write? and your program also on the c: write?

Greetings

ksw2404 commented 2 years ago

hi, i made a copy of the info from rocrail, there are 2 ip addresses, which one should i use? Schermopname (1372)

chrisweather commented 2 years ago

If you run a 2.x version of the MQTT broker you could try the latest 1.x version. There are some changes in 2.x that are a challenge for many users if I look at MQTT related forums.

chrisweather commented 2 years ago

Just successfully tested it with Mosquitto 2.0.15 on Windows 10 x64. See some more details for configuration in the Wiki / 9. Troubleshooting.

ksw2404 commented 2 years ago

Hi,

Ich werde es morgen testen, aber ein paar Fragen, benutzt du einen PC oder Laptop? und die Internetverbindung, verwendest du das Ethernet oder das WLAN? und die firewall, nur die windows oder alle pc sicherheit, komischerweise habe ich bei der arbeit den mqtt broker per explorer auf dem windows server 2022 getestet und dort konnte ich statt localhost die ip adresse des server/windows eingeben, aber auf meiner home pc, ich kann nur den localhost oder die entsprechende ip-adresse verwenden, aber nicht die ip-adresse, die auch bei rocrail aufgeführt ist, sehr speziell, beim mqtt explorer zu hause kann man sich nicht verbinden, sehr seltsam, aber ich machs Lass es morgen laufen und schau, ob es endlich funktioniert, andernfalls rufe ich einen IT-Mitarbeiter hinzu, der nachschaut, warum es nicht funktioniert, vielleicht ist die PC-Sicherheit zu schwer. Wir werden sehen.

Grüße

ksw2404 commented 2 years ago

Hi, as you could probably expect, the display still doesn't work, after I executed everything from wiki.9 , but nothing, maybe that 1 point is different and that is that I think rocrail is now in contact with the mosquitto broker , I add a photo, but nothing else has changed, the mosquitto broker does not make contact with the Wemos D1, very special, I also took a photo of this. So tell me what am I doing wrong. By the way, is it possible that you take a picture of the connections on the switchboard with 1 display and then that you note exactly which pin should go in which connection. So I don't know what I'm doing wrong, but still hope it can be solved, but this is a very long-term project.

The hardware connections are currently

Wemos D1 ----> Display GND ----> GND 5v----->VCC D2-----> SCX D1 -----> SDA

Greetings

ksw2404 commented 2 years ago

Schermopname (1374) Schermopname (1375)

chrisweather commented 2 years ago

Wiring should be like described in the Wiki: Wemos D1 ----> Display GND ----> GND 5v----->VCC D1-----> SCX D2-----> SDA

chrisweather commented 2 years ago

Don't use localhost or 127.0.0.1! These are IP addresses that work only on a system but not over a network connection. In the Rocrail info you can see the IP address of your PC. Add that address to the Roc-MQTT-Display configuration as the MQTT broker IP address.

ksw2404 commented 2 years ago

Hi, I took over the ip address and put it in the conference, unfortunately without result, I did make a video with what is shown and then stop.

I've run out of options, maybe you know something else that could be the cause.

something must have gone wrong between wiki 1 and 6, have neatly configured the demo at rocrail, what is the file that is separate with the demo folder? "rmdflow" should it also be placed somewhere?

By the way, the IP address is from the internet connection and not the WiFi connection and entering it at broker is not possible, it does not take that

I will hear from you if you know the solution

Greetings Schermopname (1376)

ksw2404 commented 2 years ago

Hi,

Have you already found a solution for the last mentioned problems, have you posted a picture of the display that does appear on the display?

is it not possible to rewrite the code so that the display can run via arduino, also don't understand that it works for you and not for me, while just doing the same steps, i have run examples that are in the arduino ide and that just appeared on the display. So there must be something else. I don't know

Greetings

chrisweather commented 2 years ago

Open this dialog in your Rocrail: 187150963-75410cac-c31c-411e-9e41-4ef0a057b5a0

and enter the IP address from the Rocrail window into the Roc-MQTT-Display configuration like on the example picture below: grafik

If it doesn't work then, you have a desktop firewall that blocks the network connection. I cannot help any further with your network settings.

ksw2404 commented 2 years ago

Hi,

display still doesn't work, but there is something crazy I think, the wemos d1 does connect via the broker with rocrail, there are all kinds of texts in the monitor, but the display does start with those words, but after that the image goes black , I don't know what the problem is with this, so I don't know why the display is black

here is the copy of the monitor report after uploading

WiFi: Connected (16.282000s), ip : 192.168.178.33 MQTT: Connecting to broker "192.168.178.27" with client name "FRITZ!Box 7581 AS" and username "***" ... (16.795000s) - ok. (16.819000s) MQTT: Subscribed to [rocrail/service/info/clock] MQTT: Subscribed to [rocrail/service/info/tx] MQTT >> [rocrail/service/info/clock]

MQTT >> [rocrail/service/info/tx]

Received message:

Received payload: ZZAMSG#D01D02D03D04D05D06D07D08########### Converted payload: ZZAMSG#D01D02D03D04D05D06D07D08########### MQTT >> [rocrail/service/info/clock]

MQTT >> [rocrail/service/info/clock]

MQTT >> [rocrail/service/info/clock]

MQTT >> [rocrail/service/info/clock]

chrisweather commented 2 years ago

looks good so far!

What happens when you press the red Demo 1, Demo 2 or Demo 3 button? rr