NEWS
[gelöst] simpleApi kann nicht %B0 aber °
-
Aber gerne:
Zuerst ein Beispiel welches funktioniert
http://IP:8087/set/data.0.email.text?value=Garten-IR-T-Sky%0D%0A192.178.99.99%20%0D%0AFreezepoint:%202017-11-16%20%20%2002:38:41%20Temp:%200.80%20%C2%B0C%20%0D%0AfreezeP:%200.30%20%C2%B0C%20%20%0D%0A%20IR%20Temp:%20-24.51%20%°C%20%20%0D%0A%20&prettyPrint
Und jetzt eines, welches nicht funktioniert:
http://IP:8087/set/data.0.email.text?value=Garten-IR-T-Sky%0D%0A192.178.99.99%20%0D%0AFreezepoint:%202017-11-16%20%20%2002:38:41%20Temp:%200.80%20%C2%B0C%20%0D%0AfreezeP:%200.30%20%C2%B0C%20%20%0D%0A%20IR%20Temp:%20-24.51%20%B0C%20%20%0D%0A%20&prettyPrint
host.orangepiplus2e 2017-11-16 19:17:22.406 warn instance system.adapter.simple-api.0 already running with pid 4515 simple-api.0 2017-11-16 19:17:10.977 info http server listening on port 8087 simple-api.0 2017-11-16 19:17:10.966 info Allow states only when user is owner: false simple-api.0 2017-11-16 19:17:10.963 info simpleAPI server listening on port 8087 simple-api.0 2017-11-16 19:17:10.872 info starting. Version 1.6.0 in /opt/iobroker/node_modules/iobroker.simple-api, node: v4.8.5 host.orangepiplus2e 2017-11-16 19:17:08.470 info instance system.adapter.simple-api.0 started with pid 4515 host.orangepiplus2e 2017-11-16 19:17:08.387 info object change system.adapter.simple-api.0 host.orangepiplus2e 2017-11-16 19:16:52.396 info Restart adapter system.adapter.simple-api.0 because enabled host.orangepiplus2e 2017-11-16 19:16:52.393 error instance system.adapter.simple-api.0 terminated with code 0 (OK) simple-api.0 2017-11-16 19:16:52.332 info terminating simple-api.0 2017-11-16 19:16:52.313 info terminating http server on port 8087 simple-api.0 2017-11-16 19:16:52.307 error at HTTPParser.parserOnHeadersComplete (_http_common.js:97:23) simple-api.0 2017-11-16 19:16:52.307 error at HTTPParser.parserOnIncoming [as onIncoming] (_http_server.js:539:12) simple-api.0 2017-11-16 19:16:52.307 error at Server.emit (events.js:172:7) simple-api.0 2017-11-16 19:16:52.307 error at emitTwo (events.js:87:13) simple-api.0 2017-11-16 19:16:52.307 error at Server.requestProcessor (/opt/iobroker/node_modules/iobroker.simple-api/main.js:81:23) simple-api.0 2017-11-16 19:16:52.307 error at SimpleAPI.restApi (/opt/iobroker/node_modules/iobroker.simple-api/lib/simpleapi.js:379:19) simple-api.0 2017-11-16 19:16:52.307 error at decodeURI (native) simple-api.0 2017-11-16 19:16:52.307 error URIError: URI malformed simple-api.0 2017-11-16 19:16:52.280 error uncaught exception: URI malformed simple-api.0 2017-11-16 19:16:43.979 debug Add to Response-Get: {"id":"data.0.dehumid01.state","val":1,"value":1} simple-api.0 2017-11-16 19:16:43.974 debug Add to Response-Get: {"id":"data.0.dehumid01.p-red","val":1026.15,"value":1026.15} simple-api.0 2017-11-16 19:16:43.968 debug Add to Response-Get: {"id":"data.0.dehumid01.DewT","val":15.13,"value":15.13} simple-api.0 2017-11-16 19:16:43.964 debug Add to Response-Get: {"id":"data.0.dehumid01.H-abs","val":12.49,"value":12.49} simple-api.0 2017-11-16 19:16:43.947 debug Add to Response-Get: {"id":"data.0.dehumid01.H-rel","val":53.28,"value":53.28} simple-api.0 2017-11-16 19:16:43.943 debug Add to Response-Get: {"id":"data.0.dehumid01.Temp","val":25.32,"value":25.32} simple-api.0 2017-11-16 19:16:43.916 debug GET-setBulk for id=data.0.dehumid01.state, oid=stateused=data.0.dehumid01.state, value=1 simple-api.0 2017-11-16 19:16:43.912 debug GET-setBulk for id=data.0.dehumid01.p-red, oid=p-redused=data.0.dehumid01.p-red, value=1026.15 simple-api.0 2017-11-16 19:16:43.909 debug GET-setBulk for id=data.0.dehumid01.DewT, oid=DewTused=data.0.dehumid01.DewT, value=15.13 simple-api.0 2017-11-16 19:16:43.904 debug GET-setBulk for id=data.0.dehumid01.H-abs, oid=H-absused=data.0.dehumid01.H-abs, value=12.49 simple-api.0 2017-11-16 19:16:43.897 debug GET-setBulk for id=data.0.dehumid01.H-rel, oid=H-relused=data.0.dehumid01.H-rel, value=53.28 simple-api.0 2017-11-16 19:16:43.879 debug GET-setBulk for id=data.0.dehumid01.Temp, oid=Tempused=data.0.dehumid01.Temp, value=25.32 simple-api.0 2017-11-16 19:16:43.823 debug Values: {"data.0.dehumid01.Temp":"25.32","data.0.dehumid01.H-rel":"53.28","data.0.dehumid01.H-abs":"12.49","data.0.dehumid01.DewT":"15.13","data.0.dehumid01.p-red":"1026.15","data.0.dehumid01.state":
-
Dein %B0 ist faktisch falsch, weil das Standard-encoding was angenommen ist UTF-8 ist. Da dein zeichen in dem bereich von UTF-8 liegt wo zwei Byte zur kodierung genutzt werden generierst Du einen Fehler.
Das Gradzeichen ist UTF-8 kodiert nämlich %C2%B0
Versuch das mal
-
Vielen Dank,
also misuse. Vom Browser aus funktioniert es so und auch die ESPs können ihre Mails jetzt absetzen.
Allerdings kommt in der email jetzt vor das ° noch ein A mit accent grave. Aber mit solchen Schönheitsfehlern kann ich leben. Sind der babylonischen Codeverwirrung geschuldet.
-
Musst jetzt kn der E-Mail das encoding korrekt setzen dann sollte das weg sein
-
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!
-
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.
-
Welche exakte Fehlermeldung kommt denn im Log?
-
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.32In 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
-
Bitte installiere mal die Version vom GitHub (1.6.1) und schick dann nochmal die debug-Ausgabe bitte
-
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 -
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
-
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 -
Bitte 1.6.2 vom Github versuchen, sollte das Problem fixen
-
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-apiWarte 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.
-
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 :-))
-
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 -
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…
-
Hast Du da nochnmal debug, dann fange ich den Fehler da auch ab und es wird dann halt einfach nicht decoded
-
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 malformedUnd 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.
-
Next try please …. sollte jetzt "warn" loggen und im zweifel einfach nicht dekodieren