Page 1 of 1

Slow API

Posted: 15 Sep 2020 05:53
by Jeppo
Hello.

I have a Raspberry Pi 3 set up with a Razberry2 and ZWay from image file. SD card is class A2 at 60MB/s.
The problem is, that the API is very slow to respond. First command works right away but the second command takes literally minutes to execute.

I am using the following PHP code to interact with Zway:

Code: Select all

$open = file_get_contents('http://login:removed@192.168.0.10:8083/ZAutomation/api/v1/devices/ZWayVDev_zway_5-0-37/command/on');
sleep(4);
$close = file_get_contents('http://login:removed@192.168.0.10:8083/ZAutomation/api/v1/devices/ZWayVDev_zway_5-0-37/command/off');
I have tried several devices (locks and outlets), all with the same result. I have also tried with a UZB1 stick instead of Razberry2.

Please help!

Re: Slow API

Posted: 15 Sep 2020 19:26
by PoltoS
If you look on "ZWayVDev_zway_5-0-37 performCommand processing" line in the log, you will see that the command arrived indeed too late to the Z-Way. I would say your sender (the PHP script) is working slow. May be use tcpdump/wireshark to see how long does it take to make the first connection and when the second is initiated.

Also don't use login/pass but token for authentication