NEWS
[gelöst] Wert (JSON) an URL senden
-
-
@tofriedrich Exec kannst du aus dem Trigger raus ziehen. Dann wird bei jeden Script Neustart die Funktion ausgeführt.
Was kommt denn im LOG? -
@mcu so?
-
12.9.2021, 01:23:57.857 [silly]: javascript.0 (27672) Objects user redis pmessage */cfg.o.script.js.Kamin_Set:{"common":{"name":"Kamin Set","expert":true,"engineType":"Blockly","engine":"system.adapter.javascript.0","source":"var result;\n\n\nexec('curl --data \"{\\'level\\':5}\" http://192.168.178.24/set_burn_level', async function (error, result, stderr) {\n console.log(result);\n});\n\n//JTNDeG1sJTIweG1sbnMlM0QlMjJodHRwcyUzQSUyRiUyRmRldmVsb3BlcnMuZ29vZ2xlLmNvbSUyRmJsb2NrbHklMkZ4bWwlMjIlM0UlM0N2YXJpYWJsZXMlM0UlM0N2YXJpYWJsZSUyMGlkJTNEJTIybnM4R2t+N3ZSdiU0MCU1RWRhYSUyQkJEcHglMjIlM0VyZXN1bHQlM0MlMkZ2YXJpYWJsZSUzRSUzQyUyRnZhcmlhYmxlcyUzRSUzQ2Jsb2NrJTIwdHlwZSUzRCUyMmV4ZWMlMjIlMjBpZCUzRCUyMk5ZSS0lM0IoJTYwbFIlN0NMLSUzQmNPJTJCWFg3SiUyMiUyMHglM0QlMjI4OCUyMiUyMHklM0QlMjIxODglMjIlM0UlM0NtdXRhdGlvbiUyMHhtbG5zJTNEJTIyaHR0cCUzQSUyRiUyRnd3dy53My5vcmclMkYxOTk5JTJGeGh0bWwlMjIlMjB3aXRoX3N0YXRlbWVudCUzRCUyMnRydWUlMjIlM0UlM0MlMkZtdXRhdGlvbiUzRSUzQ2ZpZWxkJTIwbmFtZSUzRCUyMldJVEhfU1RBVEVNRU5UJTIyJTNFVFJVRSUzQyUyRmZpZWxkJTNFJTNDZmllbGQlMjBuYW1lJTNEJTIyTE9HJTIyJTNFJTNDJTJGZmllbGQlM0UlM0N2YWx1ZSUyMG5hbWUlM0QlMjJDT01NQU5EJTIyJTNFJTNDc2hh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SUzQyUyRnN0YXRlbWVudCUzRSUzQyUyRmJsb2NrJTNFJTNDJTJGeG1sJTNF","debug":true,"verbose":false,"enabled":true},"type":"script","from":"system.adapter.admin.0","user":"system.user.admin","ts":1631402637854,"_id":"script.js.Kamin_Set","acl":{"object":1636,"ownerGroup":"system.group.administrator"}} 12.9.2021, 01:23:57.861 [info ]: javascript.0 (27672) Stop script script.js.Kamin_Set 12.9.2021, 01:23:57.865 [info ]: javascript.0 (27672) Start javascript script.js.Kamin_Set 12.9.2021, 01:23:57.868 [warn ]: javascript.0 (27672) script.js.Kamin_Set: Command curl --data "{'level':5}" http://192.168.178.24/set_burn_level was not executed, while debug mode is active 12.9.2021, 01:23:57.868 [info ]: javascript.0 (27672) script.js.Kamin_Set: registered 0 subscriptions and 0 schedules 12.9.2021, 01:23:57.869 [info ]: javascript.0 (27672) script.js.Kamin_Set: undefined
-
-
@mcu der war in Blockly an. Jetzt ist er aus und der Wert Level ändert sich auf 0
-
@tofriedrich Kommt wieder eine Warnung im LOG?
-
12.9.2021, 01:28:01.071 [silly]: javascript.0 (27672) Objects user redis pmessage */cfg.o.script.js.Kamin_Set:{"common":{"name":"Kamin Set","expert":true,"engineType":"Blockly","engine":"system.adapter.javascript.0","source":"var result;\n\n\nexec('curl --data \"{\\'level\\':5}\" http://192.168.178.24/set_burn_level');\n\nconsole.log(result);\n\n//JTNDeG1sJTIweG1sbnMlM0QlMjJodHRwcyUzQSUyRiUyRmRldmVsb3BlcnMuZ29vZ2xlLmNvbSUyRmJsb2NrbHklMkZ4bWwlMjIlM0UlM0N2YXJpYWJsZXMlM0UlM0N2YXJpYWJsZSUyMGlkJTNEJTIybnM4R2t+N3ZSdiU0MCU1RWRhYSUyQkJEcHglMjIlM0VyZXN1bHQlM0MlMkZ2YXJpYWJsZSUzRSUzQyUyRnZhcmlhYmxlcyUzRSUzQ2Jsb2NrJTIwdHlwZSUzRCUyMmV4ZWMlMjIlMjBpZCUzRCUyMk5ZSS0lM0IoJTYwbFI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1QiglM0FydX5kQSUyNCUyRlBfaSUzQTklM0RWLiUyMiUzRSUzQ2ZpZWxkJTIwbmFtZSUzRCUyMlRFWFQlMjIlM0V0ZXN0JTNDJTJGZmllbGQlM0UlM0MlMkZzaGFkb3clM0UlM0NibG9jayUyMHR5cGUlM0QlMjJ2YXJpYWJsZXNfZ2V0JTIyJTIwaWQlM0QlMjJobXolMjNBVXlEU3c1JTJDNnp6UUMlMkZ6ZSUyMiUzRSUzQ2ZpZWxkJTIwbmFtZSUzRCUyMlZBUiUyMiUyMGlkJTNEJTIybnM4R2t+N3ZSdiU0MCU1RWRhYSUyQkJEcHglMjIlM0VyZXN1bHQlM0MlMkZmaWVsZCUzRSUzQyUyRmJsb2NrJTNFJTNDJTJGdmFsdWUlM0UlM0MlMkZibG9jayUzRSUzQyUyRnhtbCUzRQ==","debug":false,"verbose":false,"enabled":true},"type":"script","from":"system.adapter.admin.0","user":"system.user.admin","ts":1631402881067,"_id":"script.js.Kamin_Set","acl":{"object":1636,"ownerGroup":"system.group.administrator"}} 12.9.2021, 01:28:01.074 [info ]: javascript.0 (27672) Stop script script.js.Kamin_Set 12.9.2021, 01:28:01.079 [info ]: javascript.0 (27672) Start javascript script.js.Kamin_Set 12.9.2021, 01:28:01.090 [info ]: javascript.0 (27672) script.js.Kamin_Set: undefined 12.9.2021, 01:28:01.090 [info ]: javascript.0 (27672) script.js.Kamin_Set: registered 0 subscriptions and 0 schedules 12.9.2021, 01:28:02.948 [silly]: javascript.0 (27672) Objects user redis pmessage */cfg.o.script.js.Kamin_Set:{"common":{"name":"Kamin Set","expert":true,"engineType":"Blockly","engine":"system.adapter.javascript.0","source":"var result;\n\n\nexec('curl --data \"{\\'level\\':5}\" http://192.168.178.24/set_burn_level', async function (error, result, stderr) {\n console.log(result);\n});\n\n//JTNDeG1sJTIweG1sbnMlM0QlMjJodHRwcyUzQSUyRiUyRmRldmVsb3BlcnMuZ29vZ2xlLmNvbSUyRmJsb2NrbHklMkZ4bWwlMjIlM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yMmhsJTQwX3FaQVJwXyU2MFRBTCU2ME1UeCU3Q2olMjIlM0UlM0NmaWVsZCUyMG5hbWUlM0QlMjJTZXZlcml0eSUyMiUzRWxvZyUzQyUyRmZpZWxkJTNFJTNDdmFsdWUlMjBuYW1lJTNEJTIyVEVYVCUyMiUzRSUzQ3NoYWRvdyUyMHR5cGUlM0QlMjJ0ZXh0JTIyJTIwaWQlM0QlMjJsLSU1QiglM0FydX5kQSUyNCUyRlBfaSUzQTklM0RWLiUyMiUzRSUzQ2ZpZWxkJTIwbmFtZSUzRCUyMlRFWFQlMjIlM0V0ZXN0JTNDJTJGZmllbGQlM0UlM0MlMkZzaGFkb3clM0UlM0NibG9jayUyMHR5cGUlM0QlMjJ2YXJpYWJsZXNfZ2V0JTIyJTIwaWQlM0QlMjJobXolMjNBVXlEU3c1JTJDNnp6UUMlMkZ6ZSUyMiUzRSUzQ2ZpZWxkJTIwbmFtZSUzRCUyMlZBUiUyMiUyMGlkJTNEJTIybnM4R2t+N3ZSdiU0MCU1RWRhYSUyQkJEcHglMjIlM0VyZXN1bHQlM0MlMkZmaWVsZCUzRSUzQyUyRmJsb2NrJTNFJTNDJTJGdmFsdWUlM0UlM0MlMkZibG9jayUzRSUzQyUyRnN0YXRlbWVudCUzRSUzQyUyRmJsb2NrJTNFJTNDJTJGeG1sJTNF","debug":false,"verbose":false,"enabled":true},"type":"script","from":"system.adapter.admin.0","user":"system.user.admin","ts":1631402882945,"_id":"script.js.Kamin_Set","acl":{"object":1636,"ownerGroup":"system.group.administrator"}} 12.9.2021, 01:28:02.951 [info ]: javascript.0 (27672) Stop script script.js.Kamin_Set 12.9.2021, 01:28:02.956 [info ]: javascript.0 (27672) Start javascript script.js.Kamin_Set 12.9.2021, 01:28:02.970 [info ]: javascript.0 (27672) script.js.Kamin_Set: registered 0 subscriptions and 0 schedules 12.9.2021, 01:28:03.023 [info ]: javascript.0 (27672) script.js.Kamin_Set: {"response":"OK"}
-
@tofriedrich sagte in Wert (JSON) an URL senden:
{"response":"OK"}
Also hat er den jetzt durchgelassen?
Ändere mal die 5 auf 2. -
@mcu burn_level bleibt auf 0
-
@tofriedrich Dann versuchen wir die Alternative
curl --data {'level':5} http://192.168.178.24/set_burn_level
-
@mcu keine Veränderung
-
@tofriedrich Dann mit String
curl --data "{'level':'5'}" http://192.168.178.24/set_burn_level oder curl --data {'level':'5'} http://192.168.178.24/set_burn_level
-
@mcu auch nicht. burn_level bleibt auf 0
-
@tofriedrich Bald gehen mir die Ideen aus:
curl --header "Content-Type: application/json --data "{'level':'5'}" http://192.168.178.24/set_burn_level oder curl --header "Content-Type: application/json --data {'level':'5'} http://192.168.178.24/set_burn_level
-
@mcu hier gibt der kein response ok mehr aus
-
@tofriedrich Dann muss es wieder raus.
curl -d "{'level':'5'}" http://192.168.178.24/set_burn_level
-
javascript.0 (27672) Objects user redis pmessage */cfg.o.script.js.Kamin_Set:{"common":{"name":"Kamin Set","expert":true,"engineType":"Blockly","engine":"system.adapter.javascript.0","source":"var result;\n\n\nexec('curl -d \"{\\'level\\':\\'50\\'}\" http://192.168.178.24/set_burn_level', async function (error, result, stderr) {\n console.log(result);\n});\n\n//JTNDeG1sJTIweG1sbnMlM0QlMjJodHRwcyUzQSUyRiUyRmRldmVsb3BlcnMuZ29vZ2xlLmNvbSUyRmJsb2NrbHklMkZ4bWwlMjIlM0UlM0N2YXJpYWJsZXMlM0UlM0N2YXJpYWJsZSUyMGlkJTNEJTIybnM4R2t+N3ZSdiU0MCU1RWRhYSUyQkJEcHglMjIlM0VyZXN1bHQlM0MlMkZ2YXJpYWJsZSUzRSUzQyUyRnZhcmlhYmxlcyUzRSUzQ2Jsb2NrJTIwdHlwZSUzRCUyMmV4ZWMlMjIlMjBpZCUzRCUyMk5ZSS0lM0IoJTYwbFIlN0NMLSUzQmNPJTJCWFg3SiUyMiUyMHglM0QlMjItMTIlMjIlMjB5JTNEJTIyMjEzJTIyJTNFJTNDbXV0YXRpb24lMjB4bWxucyUzRCUyMmh0dHA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lM0UlM0MlMkZzaGFkb3clM0UlM0NibG9jayUyMHR5cGUlM0QlMjJ2YXJpYWJsZXNfZ2V0JTIyJTIwaWQlM0QlMjJobXolMjNBVXlEU3c1JTJDNnp6UUMlMkZ6ZSUyMiUzRSUzQ2ZpZWxkJTIwbmFtZSUzRCUyMlZBUiUyMiUyMGlkJTNEJTIybnM4R2t+N3ZSdiU0MCU1RWRhYSUyQkJEcHglMjIlM0VyZXN1bHQlM0MlMkZmaWVsZCUzRSUzQyUyRmJsb2NrJTNFJTNDJTJGdmFsdWUlM0UlM0MlMkZibG9jayUzRSUzQyUyRnN0YXRlbWVudCUzRSUzQyUyRmJsb2NrJTNFJTNDJTJGeG1sJTNF","debug":false,"verbose":false,"enabled":true},"type":"script","from":"system.adapter.admin.0","user":"system.user.admin","ts":1631403883356,"_id":"script.js.Kamin_Set","acl":{"object":1636,"ownerGroup":"system.group.administrator"}}
-
@tofriedrich Kein "response:ok"
-
@mcu doch das ist dabei. Hatte es nur weggelassen weil die andere Meldung neu ist.