Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. ioBroker Allgemein
    4. [gelöst] simpleApi kann nicht %B0 aber °

    NEWS

    • Wir empfehlen: Node.js 22.x

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker goes Matter ... Matter Adapter in Stable

    [gelöst] simpleApi kann nicht %B0 aber °

    This topic has been deleted. Only users with topic management privileges can see it.
    • K
      klassisch Most Active last edited by

      @apollon77:

      Musst jetzt kn der E-Mail das encoding korrekt setzen dann sollte das weg sein `
      Ich habe weder in meiner gmx-app noch in Thunderbird eine Einstellmöglichkeit gefunden.

      Was aber funktioniert: Im Script, welches den via simpleApi übertragenen String in den email-Adapter einspeist, habe ich mit

      var text = getState("data.0.email.text"/*text*/).val + 'Content-Type:text/plain; charset="UTF-8"';
      

      den Befehl

       'Content-Type:text/plain; charset="UTF-8"'
      

      angehängt. Dann kommt die Mail sowohl in thunderbird als auch in der gmx-mail app korrekt an.

      Hänge ich den Befehlsstring bereits beim Sender (z.B. Browserzeile) an, dann wird an die email

      Content-Type:text/plain; charset
      

      angehängt und auch im email-Programm angezeigt. Das````
      ="UTF-8"

      {
      "id": "data.0.email.text",
      "value": "\r\nGarten-IR-T-Sky\r\n192.178.99.99 \r\nFreezepoint: 2017-11-16 02:38:41 Temp: 0.80 °C \r\nfreezeP: 0.30 °C \r\n IR Temp: -24.51 °C \r\nContent-Type:text/plain; charset",
      "val": "\r\nGarten-IR-T-Sky\r\n192.178.99.99 \r\nFreezepoint: 2017-11-16 02:38:41 Temp: 0.80 °C \r\nfreezeP: 0.30 °C \r\n IR Temp: -24.51 °C \r\nContent-Type:text/plain; charset"
      }

      Wahrscheinlich wird das = als delimiter für einen neuen Wert interpretiert. Wird wohl einige Zeichen wie = oder ? oder & geben, die in den Emailtexten nicht auftreten dürfen.
      
      Wie auch immer, wenn ich die utf-8 Umschaltung per script im ioBroker anhefte funktioniert es und macht auch noch den zu übertragenden String kleiner.
      
      Einziger Nachteil, der für mich als pain text email fan derzeit nicht wirklich wichtig ist: Ich muss mich jetzt an utf-8 und plain text halten. Wenn ich eine html-Mail übertragen wollte, könnte es Schwierigkeiten geben. Da müßte ich in das Transfer-Skript eine Art html-Erkennung einbauen.
      
      Also für mich gelöst und vielen Dank nochmals!
      1 Reply Last reply Reply Quote 0
      • K
        klassisch Most Active last edited by

        Muß jetzt doch nochmals nachfragen.

        Bei der stufenweise Umstellung von email via CCU auf email via ioBroker ist mit aufgefallen, daß % Zeichen den gleichen Effekt haben. simpleApi wird neu gestartet

        Beispiel:

        http://IP:8087/setBulk?data.0.email.to=email@email.de&data.0.email.subject=High%20humidity%20warning%20-%20Garten-IR-T-Sky&data.0.email.text=Garten-IR-T-Sky%20%20%0D%0A192.178.99.99%20%0D%0AHigh%20Humidity:%202017-11-26%20%20%2009:57:19%20rel%20Humid:%2088.39%25%20%20%0D%0A%20&prettyPrint
        

        [http://IP:8087/setBulk?data.0.email.to= … %2088.39b]%25%20%20%0D%0A%20&prettyPrint

        Habe das %-Zeichen als %25 kodiert. Scheint aber nicht zu gehen. Auch ein einfaches % Zeichen ohne daraufolgende Kodierung scheint nicht zu gehen.

        Blicke bei deiesen verschiedenen Kodierungen und deren Ausprägungen bzw. Verwendungen (%0A vs \x0A vs U+000A) nicht wirklich durch.

        1 Reply Last reply Reply Quote 0
        • apollon77
          apollon77 last edited by

          Welche exakte Fehlermeldung kommt denn im Log?

          1 Reply Last reply Reply Quote 0
          • K
            klassisch Most Active last edited by

            Habe das Log mal auf "silly" gestellt:

            ! ````
            simple-api.0 2017-11-26 18:05:45.179 debug Add to Response-Get: {"id":"data.0.heating.Keller.p-red","val":1027.83,"value":1027.83}
            simple-api.0 2017-11-26 18:05:45.178 debug Add to Response-Get: {"id":"data.0.heating.Keller.Dew-T","val":5.27,"value":5.27}
            simple-api.0 2017-11-26 18:05:45.176 debug Add to Response-Get: {"id":"data.0.heating.Keller.H-abs","val":6.67,"value":6.67}
            simple-api.0 2017-11-26 18:05:45.135 debug Add to Response-Get: {"id":"data.0.heating.Keller.H-rel","val":50.59,"value":50.59}
            simple-api.0 2017-11-26 18:05:45.120 debug Add to Response-Get: {"id":"data.0.heating.Keller.Temp","val":15.47,"value":15.47}
            simple-api.0 2017-11-26 18:05:45.107 debug GET-setBulk for id=data.0.heating.Keller.p-red, oid=p-redused=data.0.heating.Keller.p-red, value=1027.83
            simple-api.0 2017-11-26 18:05:45.106 debug GET-setBulk for id=data.0.heating.Keller.Dew-T, oid=Dew-Tused=data.0.heating.Keller.Dew-T, value=5.27
            simple-api.0 2017-11-26 18:05:45.106 debug GET-setBulk for id=data.0.heating.Kelle.H-abs, oid=H-absused=data.0.heating.Keller.H-abs, value=6.67
            simple-api.0 2017-11-26 18:05:45.105 debug GET-setBulk for id=data.0.heating.Keller.H-rel, oid=H-relused=data.0.heating.Keller.H-rel, value=50.59
            simple-api.0 2017-11-26 18:05:45.105 debug GET-setBulk for id=data.0.heating.Keller.Temp, oid=Tempused=data.0.heating.Keller.Temp, value=15.47
            simple-api.0 2017-11-26 18:05:45.071 debug Values: {"data.0.heating.Keller.Temp":"15.47","data.0.heating.Keller.H-rel":"50.59","data.0.heating.Keller.H-abs":"6.67","data.0.heating.Keller.Dew-T":"5.27","data.0.heating.Keller
            simple-api.0 2017-11-26 18:05:35.749 info http server listening on port 8087
            simple-api.0 2017-11-26 18:05:35.748 info Allow states only when user is owner: false
            simple-api.0 2017-11-26 18:05:35.747 info simpleAPI server listening on port 8087
            simple-api.0 2017-11-26 18:05:35.746 info starting. Version 1.6.0 in /opt/iobroker/node_modules/iobroker.simple-api, node: v4.8.5
            host.orangepiplus2e 2017-11-26 18:05:33.132 info instance system.adapter.simple-api.0 started with pid 3841
            nut.0 2017-11-26 18:05:24.976 info All Nut values set
            nut.0 2017-11-26 18:05:24.803 info Start NUT update
            host.orangepiplus2e 2017-11-26 18:05:03.058 info Restart adapter system.adapter.simple-api.0 because enabled
            host.orangepiplus2e 2017-11-26 18:05:03.057 error instance system.adapter.simple-api.0 terminated with code 0 (OK)
            simple-api.0 2017-11-26 18:04:25.715 debug Add to Response-Get: {"id":"data.0.dehumid01.distWaterTank","val":53.33,"value":53.33}
            simple-api.0 2017-11-26 18:04:25.715 debug Add to Response-Get: {"id":"data.0.dehumid01.state","val":1,"value":1}
            simple-api.0 2017-11-26 18:04:25.714 debug Add to Response-Get: {"id":"data.0.dehumid01.p-red","val":1027.31,"value":1027.31}
            simple-api.0 2017-11-26 18:04:25.714 debug Add to Response-Get: {"id":"data.0.dehumid01.DewT","val":14.32,"value":14.32}
            simple-api.0 2017-11-26 18:04:25.713 debug Add to Response-Get: {"id":"data.0.dehumid01.H-abs","val":11.88,"value":11.88}
            simple-api.0 2017-11-26 18:04:25.674 debug Add to Response-Get: {"id":"data.0.dehumid01.H-rel","val":52.42,"value":52.42}
            simple-api.0 2017-11-26 18:04:25.673 debug Add to Response-Get: {"id":"data.0.dehumid01.Temp","val":24.72,"value":24.72}
            simple-api.0 2017-11-26 18:04:25.645 debug GET-setBulk for id=data.0.dehumid01.distWaterTank, oid=distWaterTankused=data.0.dehumid01.distWaterTank, value=53.33
            simple-api.0 2017-11-26 18:04:25.644 debug GET-setBulk for id=data.0.dehumid01.state, oid=stateused=data.0.dehumid01.state, value=1
            simple-api.0 2017-11-26 18:04:25.643 debug GET-setBulk for id=data.0.dehumid01.p-red, oid=p-redused=data.0.dehumid01.p-red, value=1027.31
            simple-api.0 2017-11-26 18:04:25.643 debug GET-setBulk for id=data.0.dehumid01.DewT, oid=DewTused=data.0.dehumid01.DewT, value=14.32

            In ursächlichem Zusammenhang mit der %25 sehe ich
            
            >! ````
            simple-api.0	2017-11-26 18:05:35.747	info	simpleAPI server listening on port 8087
            simple-api.0	2017-11-26 18:05:35.746	info	starting. Version 1.6.0 in /opt/iobroker/node_modules/iobroker.simple-api, node: v4.8.5
            host.orangepiplus2e	2017-11-26 18:05:33.132	info	instance system.adapter.simple-api.0 started with pid 3841
            nut.0	2017-11-26 18:05:24.976	info	All Nut values set
            nut.0	2017-11-26 18:05:24.803	info	Start NUT update
            host.orangepiplus2e	2017-11-26 18:05:03.058	info	Restart adapter system.adapter.simple-api.0 because enabled
            host.orangepiplus2e	2017-11-26 18:05:03.057	error	instance system.adapter.simple-api.0 terminated with code 0 (OK)
            >! ````
            Mit dem Log auf "debug"
            
            >! ````
            host.orangepiplus2e	2017-11-26 18:11:26.104	info	Restart adapter system.adapter.simple-api.0 because enabled
            host.orangepiplus2e	2017-11-26 18:11:26.102	error	instance system.adapter.simple-api.0 terminated with code 0 (OK)
            simple-api.0	2017-11-26 18:11:26.050	info	terminating
            simple-api.0	2017-11-26 18:11:26.031	info	terminating http server on port 8087
            simple-api.0	2017-11-26 18:11:26.027	error	at HTTPParser.parserOnHeadersComplete (_http_common.js:97:23)
            simple-api.0	2017-11-26 18:11:26.027	error	at HTTPParser.parserOnIncoming [as onIncoming] (_http_server.js:539:12)
            simple-api.0	2017-11-26 18:11:26.027	error	at Server.emit (events.js:172:7)
            simple-api.0	2017-11-26 18:11:26.027	error	at emitTwo (events.js:87:13)
            simple-api.0	2017-11-26 18:11:26.027	error	at Server.requestProcessor (/opt/iobroker/node_modules/iobroker.simple-api/main.js:81:23)
            simple-api.0	2017-11-26 18:11:26.027	error	at SimpleAPI.restApi (/opt/iobroker/node_modules/iobroker.simple-api/lib/simpleapi.js:387:79)
            simple-api.0	2017-11-26 18:11:26.027	error	at decodeURIComponent (native)
            simple-api.0	2017-11-26 18:11:26.027	error	URIError: URI malformed
            simple-api.0	2017-11-26 18:11:26.013	error	uncaught exception: URI malformed
            
            1 Reply Last reply Reply Quote 0
            • apollon77
              apollon77 last edited by

              Bitte installiere mal die Version vom GitHub (1.6.1) und schick dann nochmal die debug-Ausgabe bitte

              1 Reply Last reply Reply Quote 0
              • K
                klassisch Most Active last edited by

                Vielen Dank für Deine Mühen!

                ! ````
                simple-api.0 2017-11-26 22:02:39.636 info http server listening on port 8087
                simple-api.0 2017-11-26 22:02:39.636 info Allow states only when user is owner: false
                simple-api.0 2017-11-26 22:02:39.635 info simpleAPI server listening on port 8087
                simple-api.0 2017-11-26 22:02:39.635 info starting. Version 1.6.1 in /opt/iobroker/node_modules/iobroker.simple-api, node: v4.8.5
                host.orangepiplus2e 2017-11-26 22:02:37.014 info instance system.adapter.simple-api.0 started with pid 4545
                host.orangepiplus2e 2017-11-26 22:02:06.932 info Restart adapter system.adapter.simple-api.0 because enabled
                host.orangepiplus2e 2017-11-26 22:02:06.930 error instance system.adapter.simple-api.0 terminated with code 0 (OK)
                simple-api.0 2017-11-26 22:02:06.847 info terminating http server on port 8087
                simple-api.0 2017-11-26 22:02:06.843 error at HTTPParser.parserOnHeadersComplete (_http_common.js:97:23)
                simple-api.0 2017-11-26 22:02:06.843 error at HTTPParser.parserOnIncoming [as onIncoming] (_http_server.js:539:12)
                simple-api.0 2017-11-26 22:02:06.843 error at Server.emit (events.js:172:7)
                simple-api.0 2017-11-26 22:02:06.843 error at emitTwo (events.js:87:13)
                simple-api.0 2017-11-26 22:02:06.843 error at Server.requestProcessor (/opt/iobroker/node_modules/iobroker.simple-api/main.js:81:23)
                simple-api.0 2017-11-26 22:02:06.843 error at SimpleAPI.restApi (/opt/iobroker/node_modules/iobroker.simple-api/lib/simpleapi.js:405:79)
                simple-api.0 2017-11-26 22:02:06.843 error at decodeURIComponent (native)
                simple-api.0 2017-11-26 22:02:06.843 error URIError: URI malformed
                simple-api.0 2017-11-26 22:02:06.829 error uncaught exception: URI malformed
                simple-api.0 2017-11-26 22:01:05.209 info http server listening on port 8087
                simple-api.0 2017-11-26 22:01:05.199 info Allow states only when user is owner: false
                simple-api.0 2017-11-26 22:01:05.197 info simpleAPI server listening on port 8087
                simple-api.0 2017-11-26 22:01:05.113 info starting. Version 1.6.1 in /opt/iobroker/node_modules/iobroker.simple-api, node: v4.8.5
                simple-api.0 2017-11-26 22:01:04.978 debug statesDB connected
                simple-api.0 2017-11-26 22:01:04.837 debug objectDB connected
                host.orangepiplus2e 2017-11-26 22:01:01.702 info instance system.adapter.simple-api.0 started with pid 4535
                host.orangepiplus2e 2017-11-26 22:00:59.227 info instance system.adapter.simple-api.0 terminated with code 0 (OK)

                Man sieht noch die Instalation der 1.6.1.
                
                Ansonsten sehe ich nicht viel Neues. Als Laie würde ich sagen, das kommt tief aus einer JS engine…
                

                simple-api.0 2017-11-26 22:02:06.843 error at decodeURIComponent (native)
                simple-api.0 2017-11-26 22:02:06.843 error URIError: URI malformed
                simple-api.0 2017-11-26 22:02:06.829 error uncaught exception: URI malformed

                1 Reply Last reply Reply Quote 0
                • apollon77
                  apollon77 last edited by

                  Ok, installiere bitte mal von Github. Versionsnummer ist die gleiche ich habe beim Dekodieren aber Debug Logging eingebaut. Also bitte nochmal in Debug laufen lassen und dann hier posten was Log sagt.

                  Danke

                  1 Reply Last reply Reply Quote 0
                  • K
                    klassisch Most Active last edited by

                    Guten Morgen,

                    vielen Dank, hier mit der neuesten Version….

                    ! ````
                    simple-api.0 2017-11-27 06:29:15.330 info http server listening on port 8087
                    simple-api.0 2017-11-27 06:29:15.329 info Allow states only when user is owner: false
                    simple-api.0 2017-11-27 06:29:15.328 info simpleAPI server listening on port 8087
                    simple-api.0 2017-11-27 06:29:15.328 info starting. Version 1.6.1 in /opt/iobroker/node_modules/iobroker.simple-api, node: v4.8.5
                    host.orangepiplus2e 2017-11-27 06:29:12.655 info instance system.adapter.simple-api.0 started with pid 5415
                    host.orangepiplus2e 2017-11-27 06:28:42.568 info Restart adapter system.adapter.simple-api.0 because enabled
                    host.orangepiplus2e 2017-11-27 06:28:42.566 error instance system.adapter.simple-api.0 terminated with code 0 (OK)
                    simple-api.0 2017-11-27 06:28:42.506 info terminating
                    simple-api.0 2017-11-27 06:28:42.487 info terminating http server on port 8087
                    simple-api.0 2017-11-27 06:28:42.483 error at HTTPParser.parserOnHeadersComplete (_http_common.js:97:23)
                    simple-api.0 2017-11-27 06:28:42.483 error at HTTPParser.parserOnIncoming [as onIncoming] (_http_server.js:539:12)
                    simple-api.0 2017-11-27 06:28:42.483 error at Server.emit (events.js:172:7)
                    simple-api.0 2017-11-27 06:28:42.483 error at emitTwo (events.js:87:13)
                    simple-api.0 2017-11-27 06:28:42.483 error at Server.requestProcessor (/opt/iobroker/node_modules/iobroker.simple-api/main.js:81:23)
                    simple-api.0 2017-11-27 06:28:42.483 error at SimpleAPI.restApi (/opt/iobroker/node_modules/iobroker.simple-api/lib/simpleapi.js:406:79)
                    simple-api.0 2017-11-27 06:28:42.483 error at decodeURIComponent (native)
                    simple-api.0 2017-11-27 06:28:42.483 error URIError: URI malformed
                    simple-api.0 2017-11-27 06:28:42.469 error uncaught exception: URI malformed
                    simple-api.0 2017-11-27 06:28:42.447 debug
                    simple-api.0 2017-11-27 06:28:42.447 debug High Humidity: 2017-11-26 09:57:19 rel Humid: 88.39%
                    simple-api.0 2017-11-27 06:28:42.447 debug 192.178.99.99
                    simple-api.0 2017-11-27 06:28:42.447 debug Try Decode 2: Garten-IR-T-Sky
                    simple-api.0 2017-11-27 06:28:42.445 debug Decode Result 1: High humidity warning - Garten-IR-T-Sky
                    simple-api.0 2017-11-27 06:28:42.444 debug Try Decode 1: High humidity warning - Garten-IR-T-Sky
                    simple-api.0 2017-11-27 06:28:42.443 debug Decode Result 0: email@gmx.de
                    simple-api.0 2017-11-27 06:28:42.440 debug email@gmx.de
                    host.orangepiplus2e 2017-11-27 06:28:13.850 info Update repository "default" under "http://download.iobroker.net/sources-dist.json"
                    iobroker 2017-11-27 06:28:13.057 info exit 0
                    iobroker 2017-11-27 06:28:12.922 info upload [0] simple-api.admin /opt/iobroker/node_modules/iobroker.simple-api/admin/index.html index.html text/html
                    iobroker 2017-11-27 06:28:12.796 info upload [1] simple-api.admin /opt/iobroker/node_modules/iobroker.simple-api/admin/simple-api.png simple-api.png image/png
                    iobroker 2017-11-27 06:28:12.767 info got /opt/iobroker/node_modules/iobroker.simple-api/admin
                    iobroker 2017-11-27 06:28:12.606 info iobroker.simple-api@1.6.1 opt/iobroker/node_modules/iobroker.simple-api
                    iobroker 2017-11-27 06:27:22.524 info npm install https://github.com/ioBroker/ioBroker.simple-api/tarball/master --production --prefix "/opt/iobroker" (System call)
                    iobroker 2017-11-27 06:27:21.988 info install https://github.com/ioBroker/ioBroker.simple-api/tarball/master
                    iobroker 2017-11-27 06:27:19.750 info url "https://github.com/ioBroker/ioBroker.simple-api/tarball/master" simple-api --debug

                    1 Reply Last reply Reply Quote 0
                    • apollon77
                      apollon77 last edited by

                      Bitte 1.6.2 vom Github versuchen, sollte das Problem fixen

                      1 Reply Last reply Reply Quote 0
                      • K
                        klassisch Most Active last edited by

                        Vielen Dank, but not really_

                        ! ````
                        simple-api.0 2017-11-27 08:55:05.035 info http server listening on port 8087
                        simple-api.0 2017-11-27 08:55:05.035 info Allow states only when user is owner: false
                        simple-api.0 2017-11-27 08:55:05.034 info simpleAPI server listening on port 8087
                        simple-api.0 2017-11-27 08:55:05.034 info starting. Version 1.6.2 in /opt/iobroker/node_modules/iobroker.simple-api, node: v4.8.5
                        host.orangepiplus2e 2017-11-27 08:55:02.445 info instance system.adapter.simple-api.0 started with pid 5837
                        host.orangepiplus2e 2017-11-27 08:54:32.359 info Restart adapter system.adapter.simple-api.0 because enabled
                        host.orangepiplus2e 2017-11-27 08:54:32.356 error instance system.adapter.simple-api.0 terminated with code 0 (OK)
                        simple-api.0 2017-11-27 08:54:32.283 info terminating
                        simple-api.0 2017-11-27 08:54:32.224 info terminating http server on port 8087
                        simple-api.0 2017-11-27 08:54:32.218 error at HTTPParser.parserOnHeadersComplete (_http_common.js:97:23)
                        simple-api.0 2017-11-27 08:54:32.218 error at HTTPParser.parserOnIncoming [as onIncoming] (_http_server.js:539:12)
                        simple-api.0 2017-11-27 08:54:32.218 error at Server.emit (events.js:172:7)
                        simple-api.0 2017-11-27 08:54:32.218 error at emitTwo (events.js:87:13)
                        simple-api.0 2017-11-27 08:54:32.218 error at Server.requestProcessor (/opt/iobroker/node_modules/iobroker.simple-api/main.js:81:23)
                        simple-api.0 2017-11-27 08:54:32.218 error at SimpleAPI.restApi (/opt/iobroker/node_modules/iobroker.simple-api/lib/simpleapi.js:406:79)
                        simple-api.0 2017-11-27 08:54:32.218 error at decodeURIComponent (native)
                        simple-api.0 2017-11-27 08:54:32.218 error URIError: URI malformed
                        simple-api.0 2017-11-27 08:54:32.197 error uncaught exception: URI malformed
                        simple-api.0 2017-11-27 08:54:32.146 debug
                        simple-api.0 2017-11-27 08:54:32.146 debug High Humidity: 2017-11-26 09:57:19 rel Humid: 88.39%
                        simple-api.0 2017-11-27 08:54:32.146 debug 192.178.99.99
                        simple-api.0 2017-11-27 08:54:32.146 debug Try Decode 2: Garten-IR-T-Sky
                        simple-api.0 2017-11-27 08:54:32.144 debug Decode Result 1: High humidity warning - Garten-IR-T-Sky
                        simple-api.0 2017-11-27 08:54:32.143 debug Try Decode 1: High humidity warning - Garten-IR-T-Sky
                        simple-api.0 2017-11-27 08:54:32.141 debug Decode Result 0: email@email.de
                        simple-api.0 2017-11-27 08:54:32.138 debug Try Decode 0: email@email.de
                        host.orangepiplus2e 2017-11-27 08:54:10.954 info Update repository "default" under "http://download.iobroker.net/sources-dist.json"
                        iobroker 2017-11-27 08:54:10.244 info exit 0
                        iobroker 2017-11-27 08:54:10.108 info upload [0] simple-api.admin /opt/iobroker/node_modules/iobroker.simple-api/admin/index.html index.html text/html
                        iobroker 2017-11-27 08:54:09.967 info upload [1] simple-api.admin /opt/iobroker/node_modules/iobroker.simple-api/admin/simple-api.png simple-api.png image/png
                        iobroker 2017-11-27 08:54:09.939 info got /opt/iobroker/node_modules/iobroker.simple-api/admin
                        iobroker 2017-11-27 08:54:09.781 info iobroker.simple-api@1.6.2 opt/iobroker/node_modules/iobroker.simple-api

                        
                        Warte noch einen Moment. Eben hat es mit einem Teilstring geklappt. Das % kam durch, lass mich noch etwas schauen…
                        
                        Sehr seltsam. Jetzt hat die Übetrtragung ein paarmal geklappt, dann das
                        
                        >! ````
                        simple-api.0	2017-11-27 09:06:13.075	info	http server listening on port 8087
                        simple-api.0	2017-11-27 09:06:13.075	info	Allow states only when user is owner: false
                        simple-api.0	2017-11-27 09:06:13.074	info	simpleAPI server listening on port 8087
                        simple-api.0	2017-11-27 09:06:13.074	info	starting. Version 1.6.2 in /opt/iobroker/node_modules/iobroker.simple-api, node: v4.8.5
                        host.orangepiplus2e	2017-11-27 09:06:10.503	info	instance system.adapter.simple-api.0 started with pid 5860
                        host.orangepiplus2e	2017-11-27 09:05:40.430	info	Restart adapter system.adapter.simple-api.0 because enabled
                        host.orangepiplus2e	2017-11-27 09:05:40.428	error	instance system.adapter.simple-api.0 terminated with code 0 (OK)
                        simple-api.0	2017-11-27 09:05:40.356	info	terminating http server on port 8087
                        simple-api.0	2017-11-27 09:05:40.355	error	URIError: URI malformed at decodeURI (native) at SimpleAPI.restApi (/opt/iobroker/node_modules/iobroker.simple-api/lib/simpleapi.js:397:19) at Server.requestProcessor (/opt/iobroker/node_m
                        simple-api.0	2017-11-27 09:05:40.353	error	uncaught exception: URI malformed
                        nut.0	2017-11-27 09:05:26.876	info	All Nut values set
                        nut.0	2017-11-27 09:05:26.778	info	Start NUT update
                        email.0	2017-11-27 09:04:39.738	info	sent to email@email.de
                        email.0	2017-11-27 09:04:38.671	info	Send email: {"from":"email.email@gmail.com","to":"email@email.de","subject":"High humidity warning - Garten-IR-T-Sky","text":"Garten-IR-T-Sky \r\n192.178.99.99 \r\nHigh Humidity: 2017-11-2
                        simple-api.0	2017-11-27 09:04:38.622	debug	Add to Response-Get: {"id":"data.0.email.text","val":"Garten-IR-T-Sky \r\n192.178.99.99 \r\nHigh Humidity: 2017-11-26 09:57:19 rel Humid: 88.39% \r\n ","value":"Garten-IR-T-Sky \r\n192.178.99.99
                        simple-api.0	2017-11-27 09:04:38.603	debug	Add to Response-Get: {"id":"data.0.email.subject","val":"High humidity warning - Garten-IR-T-Sky","value":"High humidity warning - Garten-IR-T-Sky"}
                        simple-api.0	2017-11-27 09:04:38.581	debug	GET-setBulk for id=data.0.email.text, oid=textused=data.0.email.text, value=Garten-IR-T-Sky 192.178.99.99 High Humidity: 2017-11-26 09:57:19 rel Humid: 88.39%
                        simple-api.0	2017-11-27 09:04:38.579	debug	GET-setBulk for id=data.0.email.subject, oid=subjectused=data.0.email.subject, value=High humidity warning - Garten-IR-T-Sky
                        simple-api.0	2017-11-27 09:04:38.556	debug	Values: {"data.0.email.subject":"High humidity warning - Garten-IR-T-Sky","data.0.email.text":"Garten-IR-T-Sky \r\n192.178.99.99 \r\nHigh Humidity: 2017-11-26 09:57:19 rel Humid: 88.39% \r\n ","p
                        

                        Ich starte jetzt mal den Browser neu und den Adapter neu. Dann sehen wir weiter.

                        1 Reply Last reply Reply Quote 0
                        • apollon77
                          apollon77 last edited by

                          Versuch nochmal. DU hast nach dem Update den Adapter nicht neu gestartet … da lief noch die Vorgängerversion 🙂 (die neue hat das Debug-Logging gar nicht mehr). Aber die läuft jetzt ... so please :-))

                          1 Reply Last reply Reply Quote 0
                          • K
                            klassisch Most Active last edited by

                            Sorry, war auch gerade dabei alles neu zu starten.

                            Bisher sieht es gut aus….

                            ! ````
                            simple-api.0 2017-11-27 09:11:58.178 debug Add to Response-Get: {"id":"data.0.email.text","val":"Garten-IR-T-Sky \r\n192.178.99.99 \r\nHigh Humidity: 2017-11-26 09:57:19 rel Humid: 88.39% \r\n ","value":"Garten-IR-T-Sky \r\n192.178.99.9
                            simple-api.0 2017-11-27 09:11:58.172 debug Add to Response-Get: {"id":"data.0.email.subject","val":"High humidity warning - Garten-IR-T-Sky","value":"High humidity warning - Garten-IR-T-Sky"}
                            simple-api.0 2017-11-27 09:11:58.155 debug
                            simple-api.0 2017-11-27 09:11:58.155 debug High Humidity: 2017-11-26 09:57:19 rel Humid: 88.39%
                            simple-api.0 2017-11-27 09:11:58.155 debug 192.178.99.99
                            simple-api.0 2017-11-27 09:11:58.155 debug GET-setBulk for id=data.0.email.text, oid=textused=data.0.email.text, value=Garten-IR-T-Sky
                            simple-api.0 2017-11-27 09:11:58.149 debug GET-setBulk for id=data.0.email.subject, oid=subjectused=data.0.email.subject, value=High humidity warning - Garten-IR-T-Sky
                            simple-api.0 2017-11-27 09:11:58.133 debug Values: {"data.0.email.subject":"High humidity warning - Garten-IR-T-Sky","data.0.email.text":"Garten-IR-T-Sky \r\n192.178.99.99 \r\nHigh Humidity: 2017-11-26 09:57:19 rel Humid: 88.39% \r\n ","
                            simple-api.0 2017-11-27 09:11:45.691 info http server listening on port 8087
                            simple-api.0 2017-11-27 09:11:45.681 info Allow states only when user is owner: false
                            simple-api.0 2017-11-27 09:11:45.679 info simpleAPI server listening on port 8087
                            simple-api.0 2017-11-27 09:11:45.606 info starting. Version 1.6.2 in /opt/iobroker/node_modules/iobroker.simple-api, node: v4.8.5
                            simple-api.0 2017-11-27 09:11:44.714 debug statesDB connected
                            simple-api.0 2017-11-27 09:11:44.574 debug objectDB connected

                            1 Reply Last reply Reply Quote 0
                            • K
                              klassisch Most Active last edited by

                              Vielen Dank nochmals! Habe noch etwas gespielt und bisher hat es funktioniert.

                              Bei unerlaubten Symbolen wie dem %B0 statt dem %C2%B0 schmiert der Adapter noch ab.

                              Aber es funktioniert jetzt z.B. ein gueltiges°C Symbol %e2%84%83.

                              Was es alles gibt. So ists, wenn man noch mit ASCII aufgewachsen ist und sich um den neumodischen Designerkram nicht geschert hat…

                              1 Reply Last reply Reply Quote 0
                              • apollon77
                                apollon77 last edited by

                                Hast Du da nochnmal debug, dann fange ich den Fehler da auch ab und es wird dann halt einfach nicht decoded

                                1 Reply Last reply Reply Quote 0
                                • K
                                  klassisch Most Active last edited by

                                  Ja, mit der 1.6.2 kommt natürlich nicht so viel rüber

                                  ! ````
                                  simple-api.0 2017-11-27 09:54:05.382 info http server listening on port 8087
                                  simple-api.0 2017-11-27 09:54:05.382 info Allow states only when user is owner: false
                                  simple-api.0 2017-11-27 09:54:05.381 info simpleAPI server listening on port 8087
                                  simple-api.0 2017-11-27 09:54:05.380 info starting. Version 1.6.2 in /opt/iobroker/node_modules/iobroker.simple-api, node: v4.8.5
                                  host.orangepiplus2e 2017-11-27 09:54:02.618 info instance system.adapter.simple-api.0 started with pid 5970
                                  host.orangepiplus2e 2017-11-27 09:53:32.521 info Restart adapter system.adapter.simple-api.0 because enabled
                                  host.orangepiplus2e 2017-11-27 09:53:32.518 error instance system.adapter.simple-api.0 terminated with code 0 (OK)
                                  simple-api.0 2017-11-27 09:53:32.385 error uncaught exception: URI malformed

                                  
                                  Und der Browserstring war
                                  
                                  >! ````
                                  http://IP:8087/setBulk?data.0.email.text=Garten-IR-T-Sky%20%20%0D%0A192.178.99.99%20%0D%0AHigh%20Humidity:%202017-11-26%20%20%2009:57:19%20rel%20Humid:%2088.39%25%20%20%20%0D%0A%20%B0&prettyPrint
                                  

                                  Die %B0 war ganz am Ende.

                                  1 Reply Last reply Reply Quote 0
                                  • apollon77
                                    apollon77 last edited by

                                    Next try please …. sollte jetzt "warn" loggen und im zweifel einfach nicht dekodieren

                                    1 Reply Last reply Reply Quote 0
                                    • K
                                      klassisch Most Active last edited by

                                      Super, vielen Dank sieht an meinem Beispiel sehr gut aus:

                                      ! ````
                                      simple-api.0 2017-11-27 10:13:30.482 debug Add to Response-Get: {"id":"data.0.email.text","val":"Garten-IR-T-Sky%20%20%0D%0A192.178.99.99%20%0D%0AHigh%20Humidity:%202017-11-26%20%20%2009:57:19%20rel%20Humid:%2088.39%25%20%20%20%0D%0A%20%B0","v
                                      simple-api.0 2017-11-27 10:13:30.454 debug GET-setBulk for id=data.0.email.text, oid=textused=data.0.email.text, value=Garten-IR-T-Sky%20%20%0D%0A192.178.99.99%20%0D%0AHigh%20Humidity:%202017-11-26%20%20%2009:57:19%20rel%20Humid:%2088.39%25%20
                                      simple-api.0 2017-11-27 10:13:30.447 debug Values: {"data.0.email.text":"Garten-IR-T-Sky%20%20%0D%0A192.178.99.99%20%0D%0AHigh%20Humidity:%202017-11-26%20%20%2009:57:19%20rel%20Humid:%2088.39%25%20%20%20%0D%0A%20%B0","prettyPrint":true,"user":
                                      simple-api.0 2017-11-27 10:13:30.446 warn Malformed URL encoding: URIError: URI malformed
                                      simple-api.0 2017-11-27 10:13:30.444 warn Malformed URL encoding: URIError: URI malformed
                                      simple-api.0 2017-11-27 10:13:18.274 info http server listening on port 8087
                                      simple-api.0 2017-11-27 10:13:18.264 info Allow states only when user is owner: false
                                      simple-api.0 2017-11-27 10:13:18.262 info simpleAPI server listening on port 8087
                                      simple-api.0 2017-11-27 10:13:18.189 info starting. Version 1.6.2 in /opt/iobroker/node_modules/iobroker.simple-api, node: v4.8.5
                                      simple-api.0 2017-11-27 10:13:18.103 debug statesDB connected
                                      simple-api.0 2017-11-27 10:13:17.218 debug objectDB connected

                                      
                                      Interessant ist das
                                      
                                      ….````
                                      %0A%20%B0","v
                                      

                                      Da hat er ein

                                      ,"v

                                      zugefügt.

                                      Browserausgabe

                                      ! ````
                                      [
                                      {
                                      "id": "data.0.email.text",
                                      "val": "Garten-IR-T-Sky%20%20%0D%0A192.178.99.99%20%0D%0AHigh%20Humidity:%202017-11-26%20%20%2009:57:19%20rel%20Humid:%2088.39%25%20%20%20%0D%0A%20%B0",
                                      "value": "Garten-IR-T-Sky%20%20%0D%0A192.178.99.99%20%0D%0AHigh%20Humidity:%202017-11-26%20%20%2009:57:19%20rel%20Humid:%2088.39%25%20%20%20%0D%0A%20%B0"
                                      }
                                      ]

                                      Und die email wird dann komplett "unkodiert":
                                      
                                      >! ````
                                      Garten-IR-T-Sky%20%20%0D%0A192.178.99.99%20%0D%0AHigh%20Humidity:%202017-11-26%20%20%2009:57:19%20rel%20Humid:%2088.39%25%20%20%20%0D%0A%20%B0
                                      

                                      Da sieht man gleich, dass was was faul war. Weiss aber nicht, ob es so gedacht war.

                                      1 Reply Last reply Reply Quote 0
                                      • apollon77
                                        apollon77 last edited by

                                        Ist das erinfachste eas geht. Wenn es beim Dekodieren einen Fehler gibt, dann einfach nicht dekodieren.

                                        Man könnte jetzt Libraries suchen die vllt "Fehlertoleranter" dekodieren … da fehlt mir aber gerade die Zeit zu 🙂

                                        1 Reply Last reply Reply Quote 0
                                        • K
                                          klassisch Most Active last edited by

                                          Ja, klar man könnte auch aus dem simpleApi einen fullApi machen … 😉

                                          Herzlichen Dank für Deine Zeit!

                                          Mir reicht der simplaApi (derzeit 🙂 ). Hauptsache der Adapter schmiert nicht mehr "kommentarlos" ab und bedient die erlaubten Zeichen richtig. Wahrscheinlich nutze ich ihn schon weit über sein urspruengliches "mission profile", knapp am abuse.

                                          Wenn er nicht mehr kodiert, dann weiss ich gleich, dass ich in der schoenen neuen Codewelt wieder was vermasselt habe und kann zielgerichteter suchen.

                                          Einen schoenen und erfolgreichen Tag noch!

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

                                          Support us

                                          ioBroker
                                          Community Adapters
                                          Donate
                                          FAQ Cloud / IOT
                                          HowTo: Node.js-Update
                                          HowTo: Backup/Restore
                                          Downloads
                                          BLOG

                                          767
                                          Online

                                          32.0k
                                          Users

                                          80.5k
                                          Topics

                                          1.3m
                                          Posts

                                          2
                                          25
                                          2314
                                          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