Verfasste Forenbeiträge

Ansicht von 6 Beiträgen – 1 bis 6 (von insgesamt 6)
  • Autor
    Beiträge
  • als Antwort auf: Zwei MTC4BT im Einsatz #8462
    Stephan KnokeStephan Knoke
    Teilnehmer

    Hallo,

    ich habe auch hier weiter getestet. Ich habe jetzt 10 Loks auf zwei ESP-S2 aufgeteilt.
    Ein Testbetrieb mit 5 fahrenden Loks aufgeteit auf die ESPs funkionierte.

    Hatte ich beim ersten Test noch Probleme beim Anmelden der Hubs, ging es mit den identischen ESPs beim zweiten Mal problemlos.

    Ich forsche weiter …

    Viele Grüße

    Stephan

    als Antwort auf: MTC4BT und Fernbedienungen #8460
    Stephan KnokeStephan Knoke
    Teilnehmer

    Hallo,

    ich habe mal etwas weiter getestet.

    Habe jetzt ein ESP32-S3 nur mit den Controllern programmiert.

    Wenn RocRail läuft und alle Controller ausgeschaltet sind, kommt es immer wieder zum Neustart des ESPs. Dies kann man auch am Notebook merken, da sich die serielle Schnittstelle immer wieder an- und abmeldet.

    Die erste serielle Ausgabe sieht so aus:

    
    0029] [1] [INFO] Setup: Initializing BLE...
    [0030] [1] [INFO] Setup: MattzoTrainController for BLE running.
    [0031] [1] [INFO] Setup: Number of locos to discover hubs for: 0
    [0032] [1] [INFO] Setup: Number of remotes to discover hubs for: 3
    [0033] [0] [INFO] BLE : Scanning for 3 hub(s)...
    [0035] [0] [INFO] BLE : Scanning for 3 hub(s) aborted.
    [0036] [1] [INFO] Try mqtt reconnect... 
    [0037] [1] [INFO] MQTT: Connected LegoTrainCtrl3
    [0038] [1] [INFO] Reconnected!
    [0039] [0] [INFO] BLE : Scanning for 3 hub(s)...
    [0040] [0] [INFO] BLE : Scanning for 3 hub(s) aborted.
    [0041] [0] [INFO] BLE : Scanning for 3 hub(s)...
    [0042] [0] [INFO] BLE : Scanning for 3 hub(s) aborted.
    [0043] [0] [INFO] BLE : Scanning for 3 hub(s)...
    [0044] [0] [INFO] BLE : Scanning for 3 hub(s) aborted.
    --- Abbruch der seriellen Verbindung ---
    

    Wenn RocRail nicht gestartet ist, gibt es die Neustarts nicht. Allerdings kann ich beispielsweise die Loks und damit die LED-Farbe auch nicht wechseln.

    Die serielle Ausgabe sieht wie folgt aus:

    
    [0016] [1] [INFO] setup: WiFi Event ID: 4
    [0021] [1] [INFO] Wifi: Connecting to Steinmetznetz.
    [0022] [1] [INFO] Wait for WiFi/ETH... 
    WiFi lost connection. Reason: 202
    [0025] [1] [INFO] MQTT: Connecting to 192.168.XXX.XXX:1883...
    Obtained WiFi IP address: 192.168.XXX.XXX
    WiFi connected
    IP address: 
    192.168.XXX.XXX
     MAC Address: E8:06:90:9D:B6:10
    [0029] [1] [INFO] Setup: Initializing BLE...
    [0030] [1] [INFO] Setup: MattzoTrainController for BLE running.
    [0031] [1] [INFO] Setup: Number of locos to discover hubs for: 0
    [0032] [1] [INFO] Setup: Number of remotes to discover hubs for: 3
    [0033] [0] [INFO] BLE : Scanning for 3 hub(s)...
    [0035] [0] [INFO] BLE : Scanning for 3 hub(s) aborted.
    [0036] [1] [INFO] Try mqtt reconnect... 
    [0037] [1] [INFO] MQTT: Connected LegoTrainCtrl3
    [0038] [1] [INFO] Reconnected!
    [0039] [1] [INFO] MQTT: Received 'shutdown' command. Stopping all locos.
    [0040] [0] [INFO] BLE : Scanning for 3 hub(s)...
    [0041] [0] [INFO] BLE : Scanning for 3 hub(s) aborted.
    [0042] [0] [INFO] BLE : Scanning for 3 hub(s)...
    [0043] [0] [INFO] BLE : Scanning for 3 hub(s) aborted.
    [0044] [0] [INFO] BLE : Scanning for 3 hub(s)...
    [0045] [0] [INFO] BLE : Scanning for 3 hub(s) aborted.
    [0046] [0] [INFO] BLE : Scanning for 3 hub(s)...
    [0047] [0] [INFO] BLE : Scanning for 3 hub(s) aborted.
    [0048] [0] [INFO] BLE : Discovered hub:  (a4:da:32:68:04:8e).
    [0049] [0] [INFO] BLE : Connecting to hub 'a4:da:32:68:04:8e'...
    [0052] [0] [INFO] BLE : Tying to connecto to hub 'a4:da:32:68:04:8e'.
    [0053] [0] [INFO] BLE : Connected to hub 'a4:da:32:68:04:8e'.
    [0055] [0] [INFO] BLE : Watchdog timeout not set for PU hubs
    [0057] [0] [INFO] port 0 is connected with device 37
    [0058] [0] [INFO] port 1 is connected with device 37
    [0059] [0] [INFO] port 34 is connected with device 17
    [0060] [0] [INFO] PU  : Found integrated RGB LED at port 34
    [0061] [0] [INFO] port 3b is connected with device 14
    [0062] [0] [INFO] port 3c is connected with device 38
    [0056] [0] [INFO] Loop: Connected to all remote hubs.
    [0063] [0] [INFO] BLE : Scanning for 2 hub(s)...
    [0064] [0] [INFO] BLE : Scanning for 2 hub(s) aborted.
    [0065] [0] [INFO] BLE : Scanning for 2 hub(s)...
    [0066] [0] [INFO] BLE : Scanning for 2 hub(s) aborted.
    [0067] [0] [INFO] BLE : Scanning for 2 hub(s)...
    
    • Diese Antwort wurde vor 6 Monaten von Stephan KnokeStephan Knoke geändert.
    als Antwort auf: Nutzung von D4 als Sensor #7763
    Stephan KnokeStephan Knoke
    Teilnehmer

    mmh, ja der eine MLC hat beim Booten eine Meldung “Sensor 1 ein” und dann “Sensor 1 aus”, wählt sich aber nicht ins Netzwerk ein.
    Ich habe diese Platine aber inzwischen zurück geschickt und kann nicht mehr nachschauen.

    Meine Konfiguration:

    // PCA9685 port expander used?
    #define USE_PCA9685 false
    
    // PCA9685 OE pin supported?
    #define PCA9685_OE_PIN_INSTALLED false
    const uint8_t PCA9685_OE_PIN = D0;
    
    // Number of chained PCA9685 port extenders
    #define NUM_PCA9685s 1
    
    // MCP23017 WIRING CONFIGURATION
    
    // MCP23017 port expander used?
    #define USE_MCP23017 false
    
    // Number of chained MCP23017 port extenders
    #define NUM_MCP23017s 1
    
    // SERVO WIRING CONFIGURATION
    
    // Servos are used for motorizing switches and form signals
    
    // Number of servos
    #define NUM_SERVOS 2
    
    TServoConfiguration servoConfiguration[NUM_SERVOS] =
    {
        {
            .pin = D0,
            .pinType = 0,
            .detachAfterUsage = true
        },
        {
            .pin = D1,
            .pinType = 0,
            .detachAfterUsage = true
        }
    };
    
    // LED WIRING CONFIGURATION
    
    // LEDs are used in signals, level crossing lights or bascule bridge lights
    // As an example, 2 LEDs are required for a light signal with 2 aspects
    
    // Number of LEDs
    #define NUM_LEDS 0
    
    TLEDConfiguration ledConfiguration[NUM_LEDS] =
    {
    };
    
    // SENSOR WIRING CONFIGURATION
    
    // Sensors are generally used to indicate that a train have reached a specific position on the layout
    // Special forms are remote and virtual sensors (see below)
    
    // Number of sensors connected or connectable to the controller
    #define NUM_SENSORS 10
    
    // A special form of a sensor is the "remote sensor"
    // Remote sensors are not electrically connected to this controller, they are triggered via Rocrail commands.
    // Remote sensors can be used for level crossings in Autonomous Mode.
    // Set REMOTE_SENSORS_ENABLED to true to generally enable remote sensors.
    // If you do not control a level crossing in Autonomous Mode with this controller, set to false!
    #define REMOTE_SENSORS_ENABLED false
    
    TSensorConfiguration sensorConfiguration[NUM_SENSORS] =
    {
        {
            .pin = D2,
            .pinType = LOCAL_SENSOR_PIN_TYPE,
            .remoteMattzoControllerId = -1
        },
        {
            .pin = D3,
            .pinType = LOCAL_SENSOR_PIN_TYPE,
            .remoteMattzoControllerId = -1
        },
        {
            .pin = D4,
            .pinType = LOCAL_SENSOR_PIN_TYPE,
            .remoteMattzoControllerId = -1
        },
        {
            .pin = D5,
            .pinType = LOCAL_SENSOR_PIN_TYPE,
            .remoteMattzoControllerId = -1
        },	
        {
            .pin = D6,
            .pinType = LOCAL_SENSOR_PIN_TYPE,
            .remoteMattzoControllerId = -1
        },
        {
            .pin = D7,
            .pinType = LOCAL_SENSOR_PIN_TYPE,
            .remoteMattzoControllerId = -1
        },
        {
            .pin = -1,
            .pinType = VIRTUAL_SENSOR_PIN_TYPE,
            .remoteMattzoControllerId = -1
        },
        {
            .pin = -1,
            .pinType = VIRTUAL_SENSOR_PIN_TYPE,
            .remoteMattzoControllerId = -1
        },
        {
            .pin = -1,
            .pinType = VIRTUAL_SENSOR_PIN_TYPE,
            .remoteMattzoControllerId = -1
        },
        {
            .pin = -1,
            .pinType = VIRTUAL_SENSOR_PIN_TYPE,
            .remoteMattzoControllerId = -1
        }    
    };
    
    // STATUS LED WIRING CONFIGURATION
    
    // Digital output pin to monitor controller operation (typically a LED)
    // Set to false if no status LED is installed
    const bool STATUS_LED_PIN_INSTALLED = true;
    // If installed, the pin controlling the status LED
    const uint8_t STATUS_LED_PIN = D8;
    // If installed, set to true to flip high/low state of the status led pin
    const bool STATUS_LED_REVERSE = false;
    // Power level of the status LED (0..1023)
    // Recommended max. power levels: white: 800, blue: 600, green: 500, yellow: 350, red: 300
    const int STATUS_LED_POWER = 300;
    
    // ****************************
    // LOGICAL OBJECT CONFIGURATION
    // ****************************
    
    // SWITCH CONFIGURATION
    
    // Number of switches
    #define NUM_SWITCHES 2
    
    TSwitchConfiguration switchConfiguration[NUM_SWITCHES] =
    {
        {
            .rocRailPort = 1,
            .servoIndex = 0,
            .servo2Index = -1,
            .servo2Reverse = false,
            .triggerSensors = true,
            .sensorIndex = { 6, 7 }
        },
        {
            .rocRailPort = 2,
            .servoIndex = 1,
            .servo2Index = -1,
            .servo2Reverse = false,
            .triggerSensors = true,
            .sensorIndex = { 8, 9 }
        }
    };
    
    // SIGNAL CONFIGURATION
    
    // Number of signals
    #define NUM_SIGNALS 0
    // Maximum number of signal aspects (e.g. 2 for red/green, 3 for red/green/yellow etc.)
    #define NUM_SIGNAL_ASPECTS 2
    // Number of signal LEDs (usually equal to NUM_SIGNAL_ASPECTS)
    #define NUM_SIGNAL_LEDS 2
    // Maximum number of servos for form signals (e.g. one for the primary and another one for the secondary semaphore)
    // If no form signals are used, just set to 0
    #define NUM_SIGNAL_SERVOS 0
    
    TSignalConfiguration signalConfiguration[NUM_SIGNALS] =
    {
    };
    
    // LEVEL CROSSING CONFIGURATION
    
    // General switch for level crossing (false = no level crossing connected; true = level crossing connected)
    #define LEVEL_CROSSING_CONNECTED false
    
    // Number of boom barrier servos configured for the level crossing
    #define LC_NUM_BOOM_BARRIERS 4
    
    // Number of signals configured for the level crossing
    #define LC_NUM_LEDS 4
    
    // Number of level crossing sensors
    #define LC_NUM_SENSORS 4
    
    // Number of tracks leading over the level crossing
    #define LC_NUM_TRACKS 2
    
    TLevelCrossingConfiguration levelCrossingConfiguration = {};
    
    // BASCULE BRIDGE CONFIGURATION
    
    // General switch for bascule bridge (false = no bridge connected; true = bridge connected)
    #define BASCULE_BRIDGE_CONNECTED false
    
    // Number of bridge Leafs (equals number of bridge servos)
    #define NUM_BASCULE_BRIDGE_LEAFS 0
    
    TBridgeConfiguration bridgeConfiguration = {};
    
    // SPEEDOMETER CONFIGURATION
    
    // General switch for speedometer (false = no speedometer connected; true = speedometer connected)
    #define SPEEDOMETER_CONNECTED false
    
    TSpeedometerConfiguration speedometerConfiguration = {};
    
    // ****************
    // NETWORK SETTINGS
    // ****************
    
    // Trigger emergency brake upon disconnect
    const bool TRIGGER_EBREAK_UPON_DISCONNECT = true;
    
    // WiFi Hostname
    // Allowed characters: a-z, A-Z, 0-9. From 2nd character, hyphens ("-") may also be used.
    const char *MC_HOSTNAME = "LegoTrackControler";
    
    // Syslog application name
    const char *SYSLOG_APP_NAME = "MLC";
    
    als Antwort auf: MTC4BT und RocRail #7745
    Stephan KnokeStephan Knoke
    Teilnehmer

    Hi Joos,

    I used the Power-Function (that what I called Nothalt), but nothing happend. The trains don’t react :o( .

    The communication between new loc and train controller seems to be ok, because the lights flash.
    The communication between mqtt and train controller seems to be ok, too – because other trains are working.
    The same for the communication between RocRail and mqtt …

    So, perhaps the train controller did n ot accept the new loc or did not route the mqtt signals to the new loc ?!?

    als Antwort auf: locoConfigs für MTC4BT #7733
    Stephan KnokeStephan Knoke
    Teilnehmer

    Das hat sich auch erledigt. War ein Komma zu viel :o( .
    Jetzt sind die Loks per Rocrail steuerbar :o)

    als Antwort auf: Programmierung MTC4BT #7731
    Stephan KnokeStephan Knoke
    Teilnehmer

    Hat sich erledigt. Ich habe meinen Fehler gefunden.

Ansicht von 6 Beiträgen – 1 bis 6 (von insgesamt 6)