Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Einsteigerfragen
    4. Connection Error get set Port 8087 [gelöst]

    NEWS

    • Wir empfehlen: Node.js 22.x

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker goes Matter ... Matter Adapter in Stable

    Connection Error get set Port 8087 [gelöst]

    This topic has been deleted. Only users with topic management privileges can see it.
    • C
      Chronos81 last edited by Chronos81

      Hallo zusammen ich habe eine iobroker Installation via Docker auf meinem OMV Server installiert. Hier habe ich 2 Datenpunkte welche über einen HTTP request aus einem python skript befüllt werden sollen. Das Skript läuft auf einem RaspberryPi welcher sich ebenfalls im gleichen Netzwerk befindet. Das hat auch schon mal geklappt. Allerdings musste ich nun den IOBROKER neu aufsetzen und nun klappt es nicht mehr.
      Ich habe den benötigten Port offen und die Datenpunkte passen auch. Leider kann ich jedoch keine Verbindung aufbauen.
      Habt ihr mir einen Tipp woran das liegen kann?
      2023-04-03 21_08_38-Portainer _ local.png

      2023-04-03 21_10_01-Portainer _ local.png

      2023-04-03 21_11_27-objects - iobroker.png
      Hier der Ausschnitt des requests:

      
              url = "http://192.168.0.10:8087"
              point = "0_userdata.0.Heizoel.dp_fullwert"
              cmd = "/get/"
      
      
              apiurl_1 = url + cmd + point
              print(apiurl_1)
      
              headers = {'Content-Type': 'text/html'}
              payload={}
      
              #Making http post request
              response = requests.request("GET", apiurl_1, headers=headers, data=payload)
              print(response.json())
      
       cmd = "/set/"
              value = "?value=66"
              apiurl_2 = url + cmd + point + value
              print(apiurl_2)
              payload={}
      
              response = requests.request("GET", apiurl_2, headers=headers, data=payload)
              print(response.json())
      
              response = requests.request("GET", apiurl_1, headers=headers, data=payload)
              print(response.json())
      
              #HTTP Request für Heizoel Liter
      
              url = "http://192.168.0.10:8087"
              point = "0_userdata.0.Heizoel.dp_liter"
              cmd = "/get/"
      
      
              apiurl_1 = url + cmd + point
              print(apiurl_1)
      
              headers = {'Content-Type': 'text/html'}
              payload={}
      
              #Making http post request
              response = requests.request("GET", apiurl_1, headers=headers, data=payload)
              print(response.json())
      
              cmd = "/set/"
              value = "?value=666"
              apiurl_2 = url + cmd + point + value
              print(apiurl_2)
              payload={}
      
              response = requests.request("GET", apiurl_2, headers=headers, data=payload)
              print(response.json())
      
              response = requests.request("GET", apiurl_1, headers=headers, data=payload)
              print(response.json())
      
              #HTTP Aufruf beendet
      
      

      Das geschieht beim Ausführen:
      ./heizoeltestiobrokerresetvalues.py

      http://192.168.0.10:8087/get/0_userdata.0.Heizoel.dp_fullwert
      Traceback (most recent call last):
      File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 159, in _new_conn
      (self._dns_host, self.port), self.timeout, **extra_kw)
      File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 80, in create_connection
      raise err
      File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 70, in create_connection
      sock.connect(sa)
      ConnectionRefusedError: [Errno 111] Connection refused

      During handling of the above exception, another exception occurred:

      Traceback (most recent call last):
      File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 600, in urlopen
      chunked=chunked)
      File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 354, in _make_request
      conn.request(method, url, **httplib_request_kw)
      File "/usr/lib/python3.7/http/client.py", line 1260, in request
      self._send_request(method, url, body, headers, encode_chunked)
      File "/usr/lib/python3.7/http/client.py", line 1306, in _send_request
      self.endheaders(body, encode_chunked=encode_chunked)
      File "/usr/lib/python3.7/http/client.py", line 1255, in endheaders
      self._send_output(message_body, encode_chunked=encode_chunked)
      File "/usr/lib/python3.7/http/client.py", line 1030, in _send_output
      self.send(msg)
      File "/usr/lib/python3.7/http/client.py", line 970, in send
      self.connect()
      File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 181, in connect
      conn = self._new_conn()
      File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 168, in _new_conn
      self, "Failed to establish a new connection: %s" % e)
      urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x75dea450>: Failed to establish a new connection: [Errno 111] Connection refused

      During handling of the above exception, another exception occurred:

      Traceback (most recent call last):
      File "/usr/local/lib/python3.7/dist-packages/requests/adapters.py", line 499, in send
      timeout=timeout,
      File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 638, in urlopen
      _stacktrace=sys.exc_info()[2])
      File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 398, in increment
      raise MaxRetryError(_pool, url, error or ResponseError(cause))
      urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='192.168.0.10', port=8087): Max retries exceeded with url: /get/0_userdata.0.Heizoel.dp_fullwert (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x75dea450>: Failed to establish a new connection: [Errno 111] Connection refused'))

      During handling of the above exception, another exception occurred:

      Traceback (most recent call last):
      File "./heizoeltestiobrokerresetvalues.py", line 142, in <module>
      main()
      File "./heizoeltestiobrokerresetvalues.py", line 86, in main
      response = requests.request("GET", apiurl_1, headers=headers, data=payload)
      File "/usr/local/lib/python3.7/dist-packages/requests/api.py", line 59, in request
      return session.request(method=method, url=url, **kwargs)
      File "/usr/local/lib/python3.7/dist-packages/requests/sessions.py", line 587, in request
      resp = self.send(prep, **send_kwargs)
      File "/usr/local/lib/python3.7/dist-packages/requests/sessions.py", line 701, in send
      r = adapter.send(request, **kwargs)
      File "/usr/local/lib/python3.7/dist-packages/requests/adapters.py", line 565, in send
      raise ConnectionError(e, request=request)
      requests.exceptions.ConnectionError: HTTPConnectionPool(host='192.168.0.10', port=8087): Max retries exceeded with url: /get/0_userdata.0.Heizoel.dp_fullwert (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x75dea450>: Failed to establish a new connection: [Errno 111] Connection refused'))

      1 Reply Last reply Reply Quote 0
      • arteck
        arteck Developer Most Active last edited by

        @chronos81 du brauchst den simple.api adapter oder den web.. der hat die includiert

        C 1 Reply Last reply Reply Quote 1
        • C
          Chronos81 @arteck last edited by

          @arteck Asche über mein Haupt. Jetzt sitze ich da gestern 3h dran und habe nicht gemerkt dass ich den IOBROKER über ein Backup installiert habe in dem ich den SIMPLEAPI Adapter noch gar nicht installiert hatte.
          Super das war meine Rettung. Danke.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post

          Support us

          ioBroker
          Community Adapters
          Donate

          784
          Online

          32.0k
          Users

          80.3k
          Topics

          1.3m
          Posts

          2
          3
          315
          Loading More Posts
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes
          Reply
          • Reply as topic
          Log in to reply
          Community
          Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
          The ioBroker Community 2014-2023
          logo