Scriptfehler von 0.6.0.1078 auf 0.6.0-1229

Hallo,

ich habe festgestellt dass meine Scripte seit dem Update auf 0.6.0-1229 nicht mehr laufen. Das Script wird bei ECO_TEMPERATUR mit exit code 255 beendet.

Das Script:

[code]
#!/usr/bin/env php

<?php $device=27; hg_invoke("setValue", $device, 1, "WINDOW_OPEN_TEMPERATURE", 5.0); hg_invoke("setValue", $device, 1, "ECO_TEMPERATURE", 17.0); hg_invoke("setValue", $device, 1, "COMFORT_TEMPERATURE", 21.0); hg_invoke("setValue", $device, 1, "DECALCIFICATION_TIME", 16); hg_invoke("setValue", $device, 1, "DECALCIFICATION_WEEKDAY", 1); [/code] Log bei 0.6.0.1078 [code] 02/24/16 08:38:09.291 Info: CLI connection accepted. Client number: 13 02/24/16 08:38:09.300 RPC Server (Port 2001): Info: RPC Method called: setValue Parameters: (Integer) 27 (Integer) 1 (String) WINDOW_OPEN_TEMPERATURE (Float) 5 02/24/16 08:38:09.302 RPC Server (Port 2001): Info: RPC Method called: setValue Parameters: (Integer) 27 (Integer) 1 (String) ECO_TEMPERATURE (Float) 17 02/24/16 08:38:09.303 RPC Server (Port 2001): Info: RPC Method called: setValue Parameters: (Integer) 27 (Integer) 1 (String) COMFORT_TEMPERATURE (Float) 21 02/24/16 08:38:09.304 RPC Server (Port 2001): Info: RPC Method called: setValue Parameters: (Integer) 27 (Integer) 1 (String) DECALCIFICATION_TIME (Integer) 16 02/24/16 08:38:09.305 RPC Server (Port 2001): Info: RPC Method called: setValue Parameters: (Integer) 27 (Integer) 1 (String) DECALCIFICATION_WEEKDAY (Integer) 1 02/24/16 08:38:09.305 Script output: #!/usr/bin/env php 02/24/16 08:38:10.402 Module MAX: TI CC110X "My-MAX-CC1101": Info: Sending (My-MAX-CC1101, WOR: yes): 11190011FD6A9E0EA925002A223D09070A03 02/24/16 08:38:10.468 MAX packet received (My-MAX-CC1101, RSSI: 0x30): 0E1902020EA925FD6A9E000118072A 02/24/16 08:38:10.469 Module MAX: Info: CONTROL_MODE on channel 1 of peer 27 with serial number LEQ0096247 was set to 0x00. 02/24/16 08:38:10.470 Module MAX: Info: SET_TEMPERATURE on channel 1 of peer 27 with serial number LEQ0096247 was set to 0x2A. 02/24/16 08:38:10.470 Module MAX: Info: VALVE_STATE on channel 1 of peer 27 with serial number LEQ0096247 was set to 0x07. 02/24/16 08:38:10.512 Module MAX: TI CC110X "My-MAX-CC1101": Info: Sending (My-MAX-CC1101, WOR: no): 0B190002FD6A9E0EA9250000 Planned sending time: 02/24/16 08:38:10.513 02/24/16 08:38:10.570 Module MAX: TI CC110X "My-MAX-CC1101": Info: Sending (My-MAX-CC1101, WOR: no): 111A0011FD6A9E0EA925002A223D09070A03 02/24/16 08:38:14.648 Module MAX: TI CC110X "My-MAX-CC1101": Info: Sending (My-MAX-CC1101, WOR: yes): 111A0011FD6A9E0EA925002A223D09070A03 02/24/16 08:38:14.713 MAX packet received (My-MAX-CC1101, RSSI: 0x30): 0E1A02020EA925FD6A9E000118072A 02/24/16 08:38:14.715 Module MAX: Info: CONTROL_MODE on channel 1 of peer 27 with serial number LEQ0096247 was set to 0x00. 02/24/16 08:38:14.715 Module MAX: Info: SET_TEMPERATURE on channel 1 of peer 27 with serial number LEQ0096247 was set to 0x2A. 02/24/16 08:38:14.715 Module MAX: Info: VALVE_STATE on channel 1 of peer 27 with serial number LEQ0096247 was set to 0x07. 02/24/16 08:38:14.758 Module MAX: TI CC110X "My-MAX-CC1101": Info: Sending (My-MAX-CC1101, WOR: no): 0B1A0002FD6A9E0EA9250000 Planned sending time: 02/24/16 08:38:14.758 02/24/16 08:38:14.815 Module MAX: TI CC110X "My-MAX-CC1101": Info: Sending (My-MAX-CC1101, WOR: no): 111B0011FD6A9E0EA925002A223D09070A03 02/24/16 08:47:51.684 MAX packet received (My-MAX-CC1101, RSSI: 0x45): 0B2806300C19DBFD6A9E0010 02/24/16 08:47:51.685 Module MAX: Info: STATE on channel 1 of peer 1 with serial number KEQ0763954 was set to 0x00. 02/24/16 08:47:51.728 Module MAX: TI CC110X "My-MAX-CC1101": Info: Sending (My-MAX-CC1101, WOR: no): 0B280002FD6A9E0C19DB0000 Planned sending time: 02/24/16 08:47:51.729 02/24/16 08:47:51.773 Module MAX: TI CC110X "My-MAX-CC1101": Info: Sending (My-MAX-CC1101, WOR: no): 0E1C0020FD6A9E0C19DB000EA92501 Planned sending time: 02/24/16 08:47:51.773 02/24/16 08:47:51.839 MAX packet received (My-MAX-CC1101, RSSI: 0x45): 0C1C02020C19DBFD6A9E000110 02/24/16 08:47:51.840 Module MAX: Info: Queue 6 is empty and there are no pending queues. [/code] bei 0.6.0-1229 [code] 02/24/16 09:11:18.917 Info: CLI connection accepted. Client number: 12 02/24/16 09:11:18.918 Script Engine Server: Info: Spawning new script engine process. 02/24/16 09:11:19.032 Script Engine Server: Info: Connection accepted. Client number: 13 02/24/16 09:11:19.034 Script Engine Server: Info: Script engine process successfully spawned. Process id is 2038. Client id is: 0. 02/24/16 09:11:19.034 Script Engine Server: Info: Starting script "/var/lib/homegear/scripts/w_prog_test.php" with id 1. 02/24/16 09:11:19.043 Script Engine Server: Info: Client number 0 is calling RPC method: setValue Parameters: (Integer) 27 (Integer) 1 (String) WINDOW_OPEN_TEMPERATURE (Float) 5 02/24/16 09:11:20.145 Module MAX: TI CC110X "My-MAX-CC1101": Info: Sending (My-MAX-CC1101, WOR: yes): 111F0011FD6A9E0EA925002A223D09070A03 02/24/16 09:11:23.188 Module MAX: TI CC110X "My-MAX-CC1101": Info: Sending (My-MAX-CC1101, WOR: yes): 111F0011FD6A9E0EA925002A223D09070A03 02/24/16 09:11:23.254 MAX packet received (My-MAX-CC1101, RSSI: 0x2F): 0E1F02020EA925FD6A9E0001180014 02/24/16 09:11:23.255 Module MAX: Info: CONTROL_MODE on channel 1 of peer 27 with serial number LEQ0096247 was set to 0x00. 02/24/16 09:11:23.255 Module MAX: Info: SET_TEMPERATURE on channel 1 of peer 27 with serial number LEQ0096247 was set to 0x14. 02/24/16 09:11:23.256 Module MAX: Info: VALVE_STATE on channel 1 of peer 27 with serial number LEQ0096247 was set to 0x00. 02/24/16 09:11:23.299 Module MAX: TI CC110X "My-MAX-CC1101": Info: Sending (My-MAX-CC1101, WOR: no): 0B1F0002FD6A9E0EA9250000 Planned sending time: 02/24/16 09:11:23.299 02/24/16 09:11:23.355 Module MAX: TI CC110X "My-MAX-CC1101": Info: Sending (My-MAX-CC1101, WOR: no): 11200011FD6A9E0EA925002A223D09070A03 02/24/16 09:11:27.401 Module MAX: TI CC110X "My-MAX-CC1101": Info: Sending (My-MAX-CC1101, WOR: yes): 11200011FD6A9E0EA925002A223D09070A03 02/24/16 09:11:27.466 MAX packet received (My-MAX-CC1101, RSSI: 0x30): 0E2002020EA925FD6A9E0001180014 02/24/16 09:11:27.467 Module MAX: Info: Queue 0 is empty and there are no pending queues. 02/24/16 09:11:27.468 Module MAX: Info: CONTROL_MODE on channel 1 of peer 27 with serial number LEQ0096247 was set to 0x00. 02/24/16 09:11:27.468 Module MAX: Info: SET_TEMPERATURE on channel 1 of peer 27 with serial number LEQ0096247 was set to 0x14. 02/24/16 09:11:27.468 Module MAX: Info: VALVE_STATE on channel 1 of peer 27 with serial number LEQ0096247 was set to 0x00. 02/24/16 09:11:27.511 Script Engine Server: Info: Client number 0 is calling RPC method: setValue Parameters: (Integer) 27 (Integer) 1 (String) ECO_TEMPERATURE (Float) 17 02/24/16 09:11:37.586 Info: Script with id 1 finished with exit code 255 02/24/16 09:11:59.936 Info: CLI connection accepted. Client number: 14 [/code] Grüße / Zennix

Hallo Zennix,

ich habe die Skriptengine stark überarbeitet. Vor allem wird diese jetzt in einem separaten Prozess ausgeführt, damit Skriptabstürze Homegear nicht zum Abstürzen bringen können. Außerdem muss die maximale Skriptzahl jetzt nicht mehr begrenzt werden. In dem Zuge hatte ich viele der “funktionalen Funktionen” entfernt, so dass diese nur noch über das Homegear-Objekt zugänglich waren (siehe auch die neue Referent: https://ref.homegear.eu. Aber aus Kompatibilitätsgründen war das eine doofe Idee. Ich habe die alten Funktionen jetzt also mal wieder aufgenommen. Falls mit der aktuellen Version (0.6.0-1254) immer noch Probleme auftreten, schau bei dir mal ins Skriptengine-Log (/var/log/homegear/homegear-scriptengine.log). Das sagt dir dann, wo genau das Problem liegt.

Viele Grüße

Sathya

Hallo,

habs jetzt mit der 0.6.0.1265 nochmal getestet. Leider klappts immer noch nicht.

Hier ein Auszug aus dem homegear-scriptengine.log

03/08/16 09:53:21.098 Script Engine (4985): Connected. 03/08/16 09:53:21.100 Script Engine (4985): Info: Server is calling RPC method: executeScript 03/08/16 09:53:21.100 Script Engine (4985): Info: Client registered to server. 03/08/16 09:53:22.284 Script Engine (4985): Info: Server is calling RPC method: broadcastEvent 03/08/16 09:53:22.318 Script Engine (4985): Info: Server is calling RPC method: broadcastEvent 03/08/16 09:53:32.391 Scriptengine (/var/lib/homegear/scripts/w_prog_test.php): PHP Fatal error: Uncaught Homegear\HomegearException: No answer from device. in /var/lib/homegear/scripts/w_prog_test.php:9 Stack trace: #0 /var/lib/homegear/scripts/w_prog_test.php(9): hg_invoke('setValue', 27, 1, 'ECO_TEMPERATURE', 17) #1 {main} thrown in /var/lib/homegear/scripts/w_prog_test.php on line 9 03/08/16 09:53:32.398 Info: Script 1 exited with code 255.

Hier steht dass er das Gerät nicht erreichen kann. Die Daten landen aber in der richtigen Queue. Den ersten Befehl(WINDOW_OPEN_TEMPERATUR) führte er erfolgreich aus. Beim zweiten (ECO_TEMPERATURE) kommt dann 255 zurück. Wenn ich über openhab die Temperatur des Stellers setze, kommt die Änderung einwandfrei an.

Hier das Homegear.log

03/08/16 09:53:20.940 Info: CLI connection accepted. Client number: 213 03/08/16 09:53:20.941 Script Engine Server: Info: Spawning new script engine process. 03/08/16 09:53:21.098 Script Engine Server: Info: Connection accepted. Client number: 214 03/08/16 09:53:21.099 Script Engine Server: Info: Script engine process successfully spawned. Process id is 4985. Client id is: 0. 03/08/16 09:53:21.099 Script Engine Server: Info: Starting script "/var/lib/homegear/scripts/w_prog_test.php" with id 1. 03/08/16 09:53:21.112 Script Engine Server: Info: Client number 0 is calling RPC method: setValue Parameters: (Integer) 27 (Integer) 1 (String) WINDOW_OPEN_TEMPERATURE (Float) 5 03/08/16 09:53:22.215 Module MAX: TI CC110X "My-MAX-CC1101": Info: Sending (My-MAX-CC1101, WOR: yes): 113F0011FD6A9E0EA925002A223D09070A03 03/08/16 09:53:22.280 MAX packet received (My-MAX-CC1101, RSSI: 0x48): 0E3F02020EA925FD6A9E0001181222 03/08/16 09:53:22.280 Module MAX: Info: Queue 0 is empty and there are no pending queues. 03/08/16 09:53:22.281 RPC client: Info: Calling RPC method "system.multicall" on server 127.0.0.1. 03/08/16 09:53:22.281 Module MAX: Info: CONTROL_MODE on channel 1 of peer 27 with serial number LEQ0096247 was set to 0x00. 03/08/16 09:53:22.281 Info: Connecting to host 127.0.0.1 on port 9123... 03/08/16 09:53:22.281 Module MAX: Info: SET_TEMPERATURE on channel 1 of peer 27 with serial number LEQ0096247 was set to 0x22. 03/08/16 09:53:22.282 Module MAX: Info: VALVE_STATE on channel 1 of peer 27 with serial number LEQ0096247 was set to 0x12. 03/08/16 09:53:22.283 Info: Connected to host 127.0.0.1 on port 9123. Client number is: 215 03/08/16 09:53:22.287 RPC client: Info: Calling RPC method "system.multicall" on server 127.0.0.1. 03/08/16 09:53:22.287 Info: Connecting to host 127.0.0.1 on port 9123... 03/08/16 09:53:22.289 Info: Connected to host 127.0.0.1 on port 9123. Client number is: 216 03/08/16 09:53:22.319 RPC client: Info: Calling RPC method "system.multicall" on server 127.0.0.1. 03/08/16 09:53:22.319 Info: Connecting to host 127.0.0.1 on port 9123... 03/08/16 09:53:22.320 Script Engine Server: Info: Client number 0 is calling RPC method: setValue Parameters: (Integer) 27 (Integer) 1 (String) ECO_TEMPERATURE (Float) 17 03/08/16 09:53:22.322 Info: Connected to host 127.0.0.1 on port 9123. Client number is: 217 03/08/16 09:53:32.397 Info: Script with id 1 finished with exit code 255 03/08/16 09:54:14.943 RPC Server (Port 2001): Info: Connection from 127.0.0.1:46123 accepted. Client number: 218 03/08/16 09:54:14.944 RPC Server (Port 2001): Info: RPC server client id for client number 218 is: 162 03/08/16 09:54:14.945 RPC Server (Port 2001): Info: Client number 218 is calling RPC method: getAllValues Parameters: (Boolean) 1 03/08/16 09:54:15.124 RPC Server (Port 2001): Info: Connection to client number 218 closed (3). 03/08/16 09:56:45.430 MAX packet received (My-MAX-CC1101, RSSI: 0x48): 0F8D04600EA9250000000018082200E1 03/08/16 09:56:45.431 Module MAX: Info: ACTUAL_TEMPERATURE on channel 1 of peer 27 with serial number LEQ0096247 was set to 0x00E1. 03/08/16 09:56:45.431 Module MAX: Info: CONTROL_MODE on channel 1 of peer 27 with serial number LEQ0096247 was set to 0x00. 03/08/16 09:56:45.432 Module MAX: Info: SET_TEMPERATURE on channel 1 of peer 27 with serial number LEQ0096247 was set to 0x22. 03/08/16 09:56:45.432 Module MAX: Info: VALVE_STATE on channel 1 of peer 27 with serial number LEQ0096247 was set to 0x08. 03/08/16 09:56:45.432 RPC client: Info: Calling RPC method "system.multicall" on server 127.0.0.1. 03/08/16 09:56:45.432 Info: Connecting to host 127.0.0.1 on port 9123... 03/08/16 09:56:45.435 Info: Connected to host 127.0.0.1 on port 9123. Client number is: 219 03/08/16 09:56:45.443 RPC client: Info: Calling RPC method "system.multicall" on server 127.0.0.1. 03/08/16 09:56:45.444 Info: Connecting to host 127.0.0.1 on port 9123... 03/08/16 09:56:45.445 Info: Connected to host 127.0.0.1 on port 9123. Client number is: 220

Grüße / Zennix

Hallo Zennix,

das ist komisch. Irgendetwas ist da faul, das Paket wird offenbar gar nicht gesendet. Magst du mir einmal dein Testskript posten, dann probiere ich es einmal bei mir.

Viele Grüße

Sathya

Hallo Sathya,

aber gerne.

[code]#!/usr/bin/env php

<?php //Wochenprogramm fuer Testventil //Geraete ID aus Homegear $device=27; hg_invoke("setValue", $device, 1, "WINDOW_OPEN_TEMPERATURE", 5.0); hg_invoke("setValue", $device, 1, "ECO_TEMPERATURE", 17.0); hg_invoke("setValue", $device, 1, "COMFORT_TEMPERATURE", 21.0); hg_invoke("setValue", $device, 1, "DECALCIFICATION_TIME", 16); hg_invoke("setValue", $device, 1, "DECALCIFICATION_WEEKDAY", 1); ?>

[/code]

Grüße / Zennix

Hallo Zennix,

ist gefixt und in der nächsten Version wird es wieder funktionieren. Danke dir!!!

Viele Grüße

Sathya

Hi Sathya,

mit Version 0.6.0-1269 geht’s wieder, vielen Dank.

Grüße / Zennix