Verfasste Forenbeiträge

Ansicht von 25 Beiträgen – 1 bis 25 (von insgesamt 31)
  • Autor
    Beiträge
  • als Antwort auf: Implementation of V1.2.2 #8552
    Hilbert BHilbert B
    Administrator

    Des,

    I wouldn’t do the PU version, but the MTC4BT version for those esp32’s, do not use the esp32-s3 profile in vscode, that won’t upload because it is an other processor.
    Adding a W5500 module to the esp32 will improve things!

    Hilbert

    • Diese Antwort wurde vor 3 Wochen, 4 Tage von Hilbert BHilbert B geändert.
    als Antwort auf: Implementation of V1.2.2 #8515
    Hilbert BHilbert B
    Administrator

    Hi Des,

    No problem, I have put some time in the coding of this part 😉

    Yes, you can remove those includes.

    I have tested it with 4 hubs (2 lego and 2 buwizz) and one remote. So it should work (5 devices), I think Mattze tested with even more devices.

    It is however highly recommended that when you use a lot of BLE devices on one ESP32 to use a W5500 module for the network connection. The reason for this is that every ESP32 has only one radio, the same is used for both WiFi and BLE. By adding a W5500 (wired Ethernet) we offload the wifi to wired Ethernet thus removing the WiFi and BLE switching, this greatly improved the performance and stability.

    We used seeed_xiao_esp32-s3 with external antenna and that one handles 4 BLE devices with ease (a BLE device is either a hub or a remote).

    In the Readme.md included in the MTC4BT map. Search for “Wired Ethernet” there you will find how to connect and configure the W5500 module.

    Regards, Hilbert

    als Antwort auf: Implementation of V1.2.2 #8512
    Hilbert BHilbert B
    Administrator

    Des,

    Can you try and do the same but then with 4 configured devices?

    
    [0077] [1] [INFO] Setup: Number of locos to discover hubs for: 4
    [0078] [1] [INFO] Setup: Number of remotes to discover hubs for: 4
    

    At the moment you have 8 devices configured, this keeps the program scanning for all 8. 4 Should be no problem in any case.

    With the wired interface you could try more devices.

    As a general rule, do not configure more devices than that you are going to use!

    Hilbert

    als Antwort auf: Implementation of V1.2.2 with W5500 #8511
    Hilbert BHilbert B
    Administrator

    Hi Des,

    I am not seeing anything that it is trying to make a wired connection. In the file “network_config.json” have you something like this:

    
        "network" : {
            "hostname": "mtc4bt001",
            "otaPassword": "foobar",
            "type" : "wired"
    

    If "type" : "wired" is not there it won’t do wired.

    And use the [env:esp32] in platformio, this does a -DWIRED which makes the the W5500 code active.

    Without these two you never get a wired connection. In the log you should see that it is trying the wired connection.

    You should see an message with Obtained ETH IP address this indicates that you are using the wired connection.

    Hope this helps.

    Hilbert

    als Antwort auf: Implementation of V1.2.2 #8507
    Hilbert BHilbert B
    Administrator

    Hi Des,

    Sorry for the late reply, please post the startup log from your ESP, most of the time this gives us enough hints on where it went/goes wrong. (in debug mode)

    Regarding the W5500, again, post the startup log (in debug moode)

    Without these it is impossible to help.

    Regards, Hilbert

    PS use the “code” formatting, this helps the readability!

    als Antwort auf: Issue with W5500: UNKNOWN NETWORK TYPE #8494
    Hilbert BHilbert B
    Administrator

    Hi Mitja,

    At this point you are connected via ETH to your network.

    There should come a message that you are connected to MQTT.

    Did you get this message?

    Hilbert

    als Antwort auf: Blunami from Soundtraxx #8456
    Hilbert BHilbert B
    Administrator

    Hi Ulrich,

    No we haven’t made any attempt, neither of us has one, and we need to have one, and the documentation, to get it supported.

    If it supports the BLE standard, it is probably do-able. You can have a look at the BuWizz2Hub.cpp or SBrickHub.cpp to see how we did those.

    You can play a sound if you deceode use the ‘f’ functions, and if you want to couple it to the train speed, you need to program that in the decoder. (the *.cpp files that is)

    Hilbert

    als Antwort auf: MTC4BT und Fernbedienungen #8437
    Hilbert BHilbert B
    Administrator

    Stephan,

    Without the serial log, I am guessing what is going on.

    Most of the time the serial log will give away what is going on.

    What we have seen and put in the configuration that at the time of writing, more than 5 ble devices on a Seeed Xiao ESP32-S3 are not possible, we have seen 9 on a regular esp32.

    Also it is not a good practice to configure more devices than you are using!

    Hilbert

    als Antwort auf: Zwei MTC4BT im Einsatz #8436
    Hilbert BHilbert B
    Administrator

    Stephan,

    Without the serial log, I am guessing what is going on.

    Most of the time the serial log will give away what is going on.

    Hilbert

    als Antwort auf: BT und Esp32 LAN8720 #8113
    Hilbert BHilbert B
    Administrator

    Hallo ChrisRey,

    Ehm, not entirely, please read:

    Mattzobricks MTC4BT README.md

    Using the W5500 Ethernet module

    It is now possible to make a wired network connection using the W5500 module. To enable it in the code, add -DWIRED in my_platformio.ini.

    For now the pins should be connected as follows:

    W5500 pin ESP32 pin
    RESET GPIO 26
    CS/SS GPIO 5
    MOSI GPIO 23
    MISO GPIO 19
    SCK GPIO 18
    GND and 3V3 are also connected, the other pins are not connected.

    If the code is compiled with the -DWIRED, it will try and connect to the network using the W5500 module. If there is no network cable connected, it will fall back to wifi. This is only done at the STARTUP of the module, it will NOT FALLBACK to WiFI if you disconnect the cable during normal operation, you have to restart the ESP!

    OTA will not work when the network connection is over the cable, disconnect the cable and restart the module so it starts in WiFi mode. This limitation is caused by the ArduinoOTA library being hard wired (pun intended) to Wifi.h (at the time of writing).

    The IP address is different for Wifi and cable because an other MAC address is used.

    If a status LED is configured, it will turn on solid in network discovery. This will get the other statuses when out of setup and in the regular operation mode.

    At the moment we only support the W5500 module with this wiring, we are in the process of rewriting the Ethernet/WiFi part to support other wiring schemes of this module.

    The board you are using, could work, but we do not support that module because the W5500 chipset does other things than the module mentioned by you.

    We are in the process of supporting this board:

    esp32-s3-eth

    Hilbert

    als Antwort auf: First configuration of MTC4BT – how connect to the Lego hub? #8088
    Hilbert BHilbert B
    Administrator

    There a two hubs defined, but only one has an address.

    
    [0010] [1] [INFO] Setup: Number of locos to discover hubs for: 1
    

    It is looking for one hub.

    And it will show BLE devices in the log that the ESP is “seeing”.

    Flashing two times means the hub is searching, it should turn solid if it is discovered by MTC4BT.

    The serial log should tell you something similar.

    Hilbert

    als Antwort auf: Beginn meiner Automatisierung #8031
    Hilbert BHilbert B
    Administrator

    Wie kommt man an den Quellcode von mattzobricks?

    Versuchen Sie es in einem neuen Ordner:

    git clone https://github.com/Mattzobricks/MattzoControllers.git

    Dann öffne vscode und öffne den “workspace”, der sich in dem neuen Ordner befindet und „MattzConrtrollers“, er heißt „MattzoControllers.code-workspace“

    Erstellen Sie eine Kopie von „my_platformio.ini.example“ und benennen Sie sie in „my_platformio.ini“ um.

    Weiter:

    Wenn Sie platformio in vccode installiert haben, sehen Sie unten in der Leiste: „develop“ und es sollte auch etwas wie „env:“ mit etwas dahinter stehen.

    Klicken Sie darauf und wählen Sie: am oberen Rand des Fensters „env:esp32doit-devkit-v1“.

    Warum sage ich das, ich sehe Monitorgeschwindigkeit 9600 straan, aber in unserer platformio.ini steht 115200

    Wenn Sie jetzt auf das Häkchen unten in der Leiste (neben dem kleinen Haus) klicken, sollte alles anfangen zu bauen.

    Möglicherweise müssen Sie den „upload_com_port“ in „my_platformio.ini“ ändern, damit er Ihrer Situation gerecht wird.

    als Antwort auf: help with connecting to RocRail #7831
    Hilbert BHilbert B
    Administrator

    Hello Maiko,

    You don’t have to install anything in rocrail. Just make sure that:
    – rocrail is connected to that mqtt server (reload/restart that layout if you changed it);
    – the rocrail locomotive address is the same as the one in your config file;
    – start the layout.

    On the serial console you should see messages that it received an lc command, if you don’t see the command any of the uper things went wrong.

    als Antwort auf: Cannot find ControllerID in new MTC4BT #7824
    Hilbert BHilbert B
    Administrator

    Dave,

    I think you are in the ‘brake’ state. You have to power up the layout in RocRail, the big poweron/off button in rocrail.
    After that the ‘brake’ will be off and the motors should start to run.

    The serial log will indicate having received an lc command with its speed, and the motor should spinning.

    Hilbert

    als Antwort auf: Cannot find ControllerID in new MTC4BT #7822
    Hilbert BHilbert B
    Administrator

    Dave,

    Wrong tree 😉 the controllerId is only for MLC and MTC4PF because its configuration is different.

    What you need are the address fields in the configuration file, this address is used in Rocrail associate the locomotive with an address in the configuration file.

    Hope this helps.

    Hilbert

    als Antwort auf: Cannot find ControllerID in new MTC4BT #7818
    Hilbert BHilbert B
    Administrator

    Hi Dave,

    There will never be a controllerID posted. But if you are looking for hub mac addresses? Then an empty controller file like:

    
    {
      "name": "MTC4BT",
      "espPins": [
        {
          "pin": 2,
          "inverted": false,
          "attachedDevice": "status"
        }
      ]
    }
    

    Will put the controller in scan mode and this wil produce a log like:

    [0016] [1] MQTT: Connecting to 192.168.70.10:1883...
    [0017] [1] Setup: MattzoTrainController for BLE running.
    [0018] [0] MQTT: Subscriber configuring last will...
    [0019] [1] Setup: Number of locos to discover hubs for: 0
    [0020] [0] MQTT: Subscriber attempting to connect...
    [0021] [1] No locomotives found in the configuration, going into BLE scan mode.
    [0022] [0] MQTT: Subscriber connected
    [0023] [0] MQTT: Subscriber subscribed to topic 'rocrail/service/command'
    [0024] [0] BLE : Scanning for 0 hub(s) aborted.
    [0025] [0] BLE : Scanning for 0 hub(s)...
    [0026] [0] BLE : Discovered unknown device:  (9c:8c:6e:5a:ef:a9).
    [0027] [0] BLE : Discovered unknown device: HwZ_fb0e3dbbb9002b1710 (00:a0:50:*).
    [0028] [0] BLE : Discovered unknown device:  (67:45:23:56:*).
    [0029] [0] BLE : Scanning for 0 hub(s) aborted.
    [0030] [0] BLE : Scanning for 0 hub(s)...
    [0031] [0] BLE : Discovered unknown device: HwZ_fb0e3dbbb9002b1710 (00:a0:50:*).
    [0032] [0] BLE : Discovered unknown device:  (67:45:23:*).
    [0033] [0] BLE : Discovered unknown device:  (9c:8c:6e:*).
    

    The address strating with 90:... are lego Pu hubs, addresses starting with 50:... are the new BuWizz 2.0 hubs.

    BTW this is the development branch (which I am using and developing on, I consider it stable).

    Hilbert

    als Antwort auf: Cannot find ControllerID in new MTC4BT #7816
    Hilbert BHilbert B
    Administrator

    Hi,

    The line
    Config: Failed to read config file: deserializeJson() failed with code InvalidInput
    indicates that there is something wrong with your controller_config.json.

    This should be fixed first, before anything else!

    Hilbert

    als Antwort auf: Bill of Material fehlt in der “MTC4 Mini with batterie” #7767
    Hilbert BHilbert B
    Administrator

    Hallo,

    Es solte ein “MX1616 1.5A Dual Motor Driver Module” sein.

    Hilbert

    als Antwort auf: MLC build goes wrong #6514
    Hilbert BHilbert B
    Administrator

    Hi,

    It looks like you have no or empty configuration files.

    In main.cpp you have on the top op the file:

    #include

    #include “../conf/my/controller_config.h”
    #include “../conf/my/network_config.h”

    #include “MLC_check.h”

    The ../conf/my include files may not me empty, the easiest thing to do is to copy the default ones (situated in ../conf/default) alter them to fit your configuration.

    As a best practice, do not edit the ../conf/default one’s, these will be overwritten when you update/download new versions of the source.

    Hilbert

    als Antwort auf: MTC4BT not booting #6365
    Hilbert BHilbert B
    Administrator

    Hi Martin,

    There should be my_platformio.ini.example I assume you renamed/copied it to my_platformio.ini

    And I see that there is missing a [my_common] section, we added this because we saw that platformio wasn’t merging variables as expected. This section could be empty:
    [my_common]
    build_flags =

    (I did not test this) or otherwise you can try
    [my_common]
    build_flags = -DFOO

    This makes sure the section is defined, the -DFOO does not influence the build, just makes platformio happy.

    I openend a ticket, not sure how fast we pick this one up, because of summer and being more outside, than behind the screen 😉

    Hilbert

    als Antwort auf: MLC sendet an den Port Extender aber keine Reaktion der Weichenmotoren #5712
    Hilbert BHilbert B
    Administrator

    Sorry for replying in English, my German writing is really bad.

    But did you wire it according to the article on the site? If so can you test if the vcc has 5 volt? Some breadboards have the two outer lines split in half, if that is the case the pca9685 board does not get the 5 volt needed to power the servo.

    als Antwort auf: Rockrail – step-by-step? #5554
    Hilbert BHilbert B
    Administrator

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

    als Antwort auf: Rockrail – step-by-step? #5553
    Hilbert BHilbert B
    Administrator

    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

    als Antwort auf: Big Layout with 23 MLC #5403
    Hilbert BHilbert B
    Administrator

    Hi David,
    To bad to hear that it did not workout for you.
    Hilbert

    als Antwort auf: Big Layout with 23 MLC #5401
    Hilbert BHilbert B
    Administrator

    Hi,
    Sorry for the late reply.

    It looks like bad wifi coverage. What is the distance to your wifi access point (AP) and is it on the same floor?
    In the Netherlands, it is common to have laminate flooring with a subfloor in which aluminium foil has been used. If the AP is not on the same floor, you have very poor wifi conerage.
    Hilbert

Ansicht von 25 Beiträgen – 1 bis 25 (von insgesamt 31)