Skip to content
  • Home
  • Recent
  • Tags
  • 0 Unread 0
  • Categories
  • Unreplied
  • Popular
  • GitHub
  • Docu
  • Hilfe
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
ioBroker Logo

Community Forum

donate donate
  1. ioBroker Community Home
  2. Deutsch
  3. Einsteigerfragen
  4. Einbindung von Geräten
  5. Samsung TV: Cannot read property 'ws' of undefined

NEWS

  • Monatsrückblick Januar/Februar 2026 ist online!
    BluefoxB
    Bluefox
    16
    1
    262

  • Jahresrückblick 2025 – unser neuer Blogbeitrag ist online! ✨
    BluefoxB
    Bluefox
    17
    1
    4.6k

  • Neuer Blogbeitrag: Monatsrückblick - Dezember 2025 🎄
    BluefoxB
    Bluefox
    13
    1
    1.3k

Samsung TV: Cannot read property 'ws' of undefined

Scheduled Pinned Locked Moved Einbindung von Geräten
3 Posts 3 Posters 446 Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    pipsen
    wrote on last edited by
    #1

    Hallo,

    ich habe einen Samsung QLED Fernseher aus dem Jahr 2019. Folgende Dinge habe ich gemacht:

    npm install iobroker.samsung
    -> Version 0.5.8 wurde installiert
    Adapter Instanz angelegt und so konfiguriert:

    • IP Adresse des Fernsehers
    • MAC Adresse im Format xx:xx:xx:xx:xx:xx
    • Token Feld leer gelassen wegen Hinweis
      only needed with SamsungTV API, should be in Log after first connect
    • APIType: SamsungTV weil neuer als 2016
    • PIN Feld leer, da nur für H / J benötigt

    Anschließend Plugin gestartet und am Fernseher kam die Mledung, dass ich die Verbindung zulassen soll. Habe ich gemacht und der ioBroker steht jetzt in der Liste der erlaubten Geräte.

    Trotzdem sieht mein Log so aus:

    samsung.0 2022-04-29 11:52:33.262	error	Connection to TV failed. Is the IP correct? Is the TV switched on? TypeError: Cannot read property 'ws' of undefined
    samsung.0 2022-04-29 11:52:28.021	info	starting. Version 0.5.8 in /opt/iobroker/node_modules/iobroker.samsung, node: v14.19.0, js-controller: 4.0.23
    samsung.0 2022-04-29 11:52:28.002	info	Plugin sentry Sentry Plugin disabled for this process because sending of statistic data is disabled for the system
    host.ioBroker 2022-04-29 11:52:27.485	info	instance system.adapter.samsung.0 started with pid 1682
    host.ioBroker 2022-04-29 11:52:24.947	info	instance system.adapter.samsung.0 terminated with code 11 (ADAPTER_REQUESTED_TERMINATION)
    host.ioBroker 2022-04-29 11:52:24.471	info	stopInstance system.adapter.samsung.0 send kill signal
    samsung.0 2022-04-29 11:52:24.432	info	Terminated (ADAPTER_REQUESTED_TERMINATION): Without reason
    samsung.0 2022-04-29 11:52:24.432	info	terminating
    samsung.0 2022-04-29 11:52:24.431	info	Got terminate signal TERMINATE_YOURSELF
    host.ioBroker 2022-04-29 11:52:24.430	info	stopInstance system.adapter.samsung.0 (force=false, process=true)
    

    Die Verbindung schlägt also fehl und eine TokenID finde ich leider auch nicht im log.
    Hat jemand eine Idee?

    Danke!

    madjack84M 1 Reply Last reply
    0
    • P pipsen

      Hallo,

      ich habe einen Samsung QLED Fernseher aus dem Jahr 2019. Folgende Dinge habe ich gemacht:

      npm install iobroker.samsung
      -> Version 0.5.8 wurde installiert
      Adapter Instanz angelegt und so konfiguriert:

      • IP Adresse des Fernsehers
      • MAC Adresse im Format xx:xx:xx:xx:xx:xx
      • Token Feld leer gelassen wegen Hinweis
        only needed with SamsungTV API, should be in Log after first connect
      • APIType: SamsungTV weil neuer als 2016
      • PIN Feld leer, da nur für H / J benötigt

      Anschließend Plugin gestartet und am Fernseher kam die Mledung, dass ich die Verbindung zulassen soll. Habe ich gemacht und der ioBroker steht jetzt in der Liste der erlaubten Geräte.

      Trotzdem sieht mein Log so aus:

      samsung.0 2022-04-29 11:52:33.262	error	Connection to TV failed. Is the IP correct? Is the TV switched on? TypeError: Cannot read property 'ws' of undefined
      samsung.0 2022-04-29 11:52:28.021	info	starting. Version 0.5.8 in /opt/iobroker/node_modules/iobroker.samsung, node: v14.19.0, js-controller: 4.0.23
      samsung.0 2022-04-29 11:52:28.002	info	Plugin sentry Sentry Plugin disabled for this process because sending of statistic data is disabled for the system
      host.ioBroker 2022-04-29 11:52:27.485	info	instance system.adapter.samsung.0 started with pid 1682
      host.ioBroker 2022-04-29 11:52:24.947	info	instance system.adapter.samsung.0 terminated with code 11 (ADAPTER_REQUESTED_TERMINATION)
      host.ioBroker 2022-04-29 11:52:24.471	info	stopInstance system.adapter.samsung.0 send kill signal
      samsung.0 2022-04-29 11:52:24.432	info	Terminated (ADAPTER_REQUESTED_TERMINATION): Without reason
      samsung.0 2022-04-29 11:52:24.432	info	terminating
      samsung.0 2022-04-29 11:52:24.431	info	Got terminate signal TERMINATE_YOURSELF
      host.ioBroker 2022-04-29 11:52:24.430	info	stopInstance system.adapter.samsung.0 (force=false, process=true)
      

      Die Verbindung schlägt also fehl und eine TokenID finde ich leider auch nicht im log.
      Hat jemand eine Idee?

      Danke!

      madjack84M Offline
      madjack84M Offline
      madjack84
      wrote on last edited by madjack84
      #2

      @pipsen
      Hey, ich hab exakt das gleiche verhalten .... Wäre über eine Lösung auch sehr glücklich.

      Das hier ist der Codeschnipsel an dem wir scheitern. Der log ist also die Errormessage die da zurück kommt :(

      } else if (adapter.config.apiType === 'SamsungTV') {
              var remoteSTV = new SamsungTV(adapter.config.ip, adapter.config.mac);
              if (adapter.config.token)
                  remoteSTV.token = adapter.config.token;
              try {
                  await remoteSTV.connect('ioBroker');
              } catch (err) {
                  adapter.log.error(`Connection to TV failed. Is the IP correct? Is the TV switched on? ${err}`);
                  return
              }
              adapter.log.info('-----------------------------------------');
              adapter.log.info('Confirm on your TV to get a Token');
              adapter.log.info('-----------------------------------------');
              adapter.log.info(`Token: ${remoteSTV.token}`);
              adapter.log.info('-----------------------------------------');
              remote = { powerKey: 'KEY_POWER', send: (cmd) => remoteSTV.sendKey(cmd) };
              createObjectsAndStates();
      

      nuc i3, Proxmox, raspimatic (PI3), 15 shellies, shelly 4pro/25/RGB, wled sonoff, 7x xiaomi sensoren, 4xEchos, 4 Tasmota Steckdosen, motionEye, nspanel, Ring, hoymiles usw

      A 1 Reply Last reply
      0
      • madjack84M madjack84

        @pipsen
        Hey, ich hab exakt das gleiche verhalten .... Wäre über eine Lösung auch sehr glücklich.

        Das hier ist der Codeschnipsel an dem wir scheitern. Der log ist also die Errormessage die da zurück kommt :(

        } else if (adapter.config.apiType === 'SamsungTV') {
                var remoteSTV = new SamsungTV(adapter.config.ip, adapter.config.mac);
                if (adapter.config.token)
                    remoteSTV.token = adapter.config.token;
                try {
                    await remoteSTV.connect('ioBroker');
                } catch (err) {
                    adapter.log.error(`Connection to TV failed. Is the IP correct? Is the TV switched on? ${err}`);
                    return
                }
                adapter.log.info('-----------------------------------------');
                adapter.log.info('Confirm on your TV to get a Token');
                adapter.log.info('-----------------------------------------');
                adapter.log.info(`Token: ${remoteSTV.token}`);
                adapter.log.info('-----------------------------------------');
                remote = { powerKey: 'KEY_POWER', send: (cmd) => remoteSTV.sendKey(cmd) };
                createObjectsAndStates();
        
        A Offline
        A Offline
        Aiouh
        wrote on last edited by
        #3

        @madjack84 @pipsen same here :( habt Ihr mittlerweile eine Lösung gefunden ?

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        Support us

        ioBroker
        Community Adapters
        Donate

        588

        Online

        32.7k

        Users

        82.5k

        Topics

        1.3m

        Posts
        Community
        Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
        ioBroker Community 2014-2025
        logo
        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Home
        • Recent
        • Tags
        • Unread 0
        • Categories
        • Unreplied
        • Popular
        • GitHub
        • Docu
        • Hilfe