Slow API

Discussions about Z-Way software and Z-Wave technology in general
Post Reply
Jeppo
Posts: 4
Joined: 12 Feb 2018 09:13

Slow API

Post 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!
Attachments
z-way-server.zip
(4.76 KiB) Downloaded 174 times
User avatar
PoltoS
Posts: 7579
Joined: 26 Jan 2011 19:36

Re: Slow API

Post 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
Post Reply