P.S. die Hälfte könnte aus der JSON jeweils rausgeworfen werden- bin da aber ehrlich gesagt auch immer zu faul Ü
P.P.S. was mir noch einfällt: hängt der Drucker am richtigen Pin/Port des PIs ? Mein Banana unterscheidet sich da evtl. zum Raspi - Obacht!
Code: Alles auswählen
# Configuration examples for piTelex
# requirements: commentjson, argparse (other see sections)
{
  "devices": {
    # screen output and kwyboard input (for debugging)
    "screen": {
      "type": "screen",
      "enable": true,
      "show_BuZi": true,
      "show_ctrl": true,
      "show_info": false,
      "show_capital": false
    },
    # BONTelex EPSON TM-T88 Seriex
    # requirements: pyserial
    "Printer TM-T88": {
      "type": "terminal",
      "enable": true,
      "portname": "/dev/ttyS2",    # port name. On Windows e.g. COM3. On Linux e.g. /dev/ttyUSB0 or /dev/ttyS0
      "baudrate": 19200,
      "bytesize": 8,
      "stopbits": 1,
      "parity": "N",
      "dsrdtr": false,
      "rtscts": false,
      "xonxoff": false,
      "RS485": false,
      "show_BuZi": false,
      "show_ctrl": false,
      "show_info": false,
      "show_capital": false,
      "send_only": true,
      "auto_CRLF": 0,   # number of chars in a line before CR LF
      "init": "[1B]M1\r\n -= BONTelex =-\r\n",   # clear display   cursor off   vert. scroll
      "replace_char": {
        "~": "[B1]",     # null
        "%": "[EA]",     # bell
      },
      "replace_esc":{
        "ZZ": "\r\n\r\n\r\n\r\n[1B6D]" #cut paper
      }
    },
# Vacuum Flourescent Display (VFD) on serial port with TEC/LIUST protocol
    # requirements: pyserial
    "VFD TEC/LIUST": {
      "type": "terminal",
      "enable": false,
      "portname": "/dev/ttyS0",    # port name. On Windows e.g. COM3. On Linux e.g. /dev/ttyUSB0 or /dev/zzyS0
      "baudrate": 9600,    # default is 9600. Some VFDs come with 19200 or 38400
      "dsrdtr": false,
      "rtscts": false,
      "xonxoff": false,
      "show_BuZi": true,
      "show_ctrl": true,
      "show_info": false,
      "show_capital": true,
      "send_only": true,
      "auto_CRLF": 20,
      "init": "[1B 5B 32 4A][1B 5C 3F 4C 44 35][1F 5C 3F 4C 43 31]\r -= piTelex VFD =-\r\n",   # clear display   brightness   cursor mode
      "replace_char": {
        "\r": "[AE]",     # WR
        "\n": "[F2]",     # ZL
        "<":  "[DC]",     # Bu
        ">":  "[DF]",     # Zi
        "~":  "[F8]",     # null
        "%":  "[DB]",     # bell
        " ":  "_"         # space
      }
    },
# Vacuum Flourescent Display (VFD) on serial port with EPSON ESC/POS protocol
    # requirements: pyserial
    "Terminal VFD ESC/POS": {
      "type": "terminal",
      "enable": false,
      "portname": "/dev/ttyS0",    # port name. On Windows e.g. COM3. On Linux e.g. /dev/ttyUSB0 or /dev/zzyS0
      "baudrate": 9600,    # default is 9600. Some VFDs come with 19200 or 38400
      "show_BuZi": true,
      "show_ctrl": true,
      "show_info": false,
      "show_capital": true,
      "send_only": true,
      "init": "[0C][1F 58 04][1F 43 01][1F 02] -= piTelex VFD =-\r\n",   # clear display   brightness   cursor on   vert. scroll
      "replace_char": {
        "\r": "[AE]",     # WR
        "\n": "[F0]",     # ZL
        "<":  "[DC]",     # Bu
        ">":  "[DF]",     # Zi
        " ":  "[FA]",     # space
        "~":  "[B1]",     # null
        "%":  "[EA]"      # bell
      }
    },
    # TW39 or V10 teletype over USB-serial-adapter CH340
    # requirements: pyserial
    "CH340TTY": {
      "type": "CH340TTY",
      "enable": false,
      "portname": "COM5",
      "baudrate": 100,
      "mode": "EDS",   # modes: "TW39", "TWM", "V10", "EDS"
      "coding": 0,   # 0=ITA2
      "loopback": false
    },
    # ED1000 teletype over USB-sound-card
    # requirements: numpy scipy
    "ED1000": {
      "type": "ED1000",
      "enable": false,
      "devindex": null,
      "zcarrier": false,
      "baudrate": 50,
      "send_f0": 500,
      "send_f1": 700,
      "recv_f0": 2250,
      "recv_f1": 3150,
      "recv_squelch": 100,
      "recv_debug": false,
      "unres_threshold": 100
    },
    # TW39 or V10 teletype with FSG over GPIO pins of Raspberry Pi - FULL EXAMPLE
    # requirements: pigpio (deamon and lib)
    "RPiTTY": {
      "type": "RPiTTY",
      "enable": false,
      "mode": "TW39",
      "pin_txd": 17,
      "pin_rxd": 27,
      "inv_rxd": false,
      "pin_relay": 22,
      "inv_relay": false,
      "pin_online": 0,
      "pin_dir": 0,
      "pin_number_switch": 6,
      "baudrate": 50,
      "coding": 0,   # 0=ITA2
      "loopback": true
    },
    "RPiTTY_noFSG": {
      "type": "RPiTTY",
      "enable": false,
      "mode": "TWM",
      "pin_txd": 17,
      "pin_rxd": 27,
      "inv_rxd": false,
      "pin_relay": 22,
      "inv_relay": false,
      "pin_online": 0,
      "pin_dir": 0,
      "pin_number_switch": 0,
      "baudrate": 50,
      "coding": 0,   # 0=ITA2
      "loopback": true,
      "use_observe_line": false
    },
    "RPiTTY_T68d": {
      "type": "RPiTTY",
      "enable": false,
      "__mode": "TWM",
      "pin_txd": 17,
      "pin_rxd": 27,
      "___inv_rxd": false,
      "pin_relay": 22,
      "___inv_relay": false,
      "___pin_dir": 0,
      "xx_pin_number_switch": 6,
      "___inv_number_switch": false,
      "baudrate": 50,
      "___coding": 0,   # 0=ITA2
      "___loopback": true,
      "___use_observe_line": true,
      "WB_pulse_length": 50
    },
    "RPiTTY_SEU-M_Oe-AGT": {
      "type": "RPiTTY",
      "enable": false,
      "mode": "AGT",
      "pin_txd": 17,
      "pin_rxd": 27,
      "inv_rxd": false,
      "pin_relay": 22,
      "inv_relay": true,
      "pin_power": 9,
      "inv_power": false,
      "pin_number_switch": 10,
      "inv_number_switch": true,
      "baudrate": 50,
      "coding": 0,   # 0=ITA2
      "loopback": false,
      "WB_pulse_length": 60
    },
    "RPiTTY_SEU-M_LO2000": {
      "type": "RPiTTY",
      "enable": false,
      "mode": "TWM",
      "pin_txd": 17,
      "pin_rxd": 27,
      "inv_rxd": false,
      "pin_relay": 22,
      "inv_relay": false,
      "baudrate": 100,   # 50, 75, 100
      "coding": 0,   # 0=ITA2
      "loopback": false
    },
    "RPiCtrl": {
      "type": "RPiCtrl",
      "enable": false,
      "pin_number_switch": 0,
      "pin_button_1T": 8,
      "pin_button_AT": 0,
      "pin_button_ST": 0,
      "pin_button_LT": 0,
      "pin_button_U1": 0,
      "pin_button_U2": 0,
      "pin_button_U3": 0,
      "pin_button_U4": 0,
      "pin_LED_A": 0,
      "pin_LED_WB": 0,
      "pin_LED_WB_A": 11,
      "pin_LED_status_R": 23,
      "pin_LED_status_G": 24
    },
    "i-Telex": {
      "type": "i-Telex",
      "enable": true,
      "port": 2360,
      # WARNING
      # Setting tns-dynip-number to anything except 0 will enable dynamic IP
      # updates with i-Telex TNS (Teilnehmerserver, Subscriber Server).
      #
      # Leave at 0 if you've chosen a static TNS entry!
      # Change to something nonzero if and only if
      # - you've got your number approved by i-Telex administrators, and
      # - you've chosen dynamic IP update and told i-Telex administrators so, and
      # - you've set your TNS pin properly.
      "tns-dynip-number": 27170,
      "tns-pin": 27170
    },
    "log": {
      "type": "log",
      "enable": true,
      "filename": "/home/pi/piTelex/data.log"
    },
    "news": {
      "type": "news",
      "enable": false,
      "newspath": "/data/piTelex/news/"
    },
    "archive": {
      "type": "archive",
      "enable": false,
      "path": "/data/piTelex/"
    },
    "shellcmd": {
      "type": "shellcmd",
      "enable": false,
      "LUT": {
        "TP1": "curl -s -o null http://fs200.fritz.box/cm?cmnd=Power%20On",
        "TP0": "curl -s -o null http://fs200.fritz.box/cm?cmnd=Power%20Off",
        "x": "explorer"
      }
    }
  },
  "verbose": true,
  "wru_id": "27170 sbad d",
  "wru_replace_always": true,
  "wru_fallback": false,
  "dial_timeout": 0,
  "continue_with_no_printer": true,
  "debug": 3,
  "errorlog_path": "/home/pi/piTelex/"
}