wburgers / Open-Zwave-Socket-Server

Open-Zwave Socket Server
http://willemburgers.nl/zwave/open-zwave-socket-server
9 stars 8 forks source link

demand processing problem #14

Closed spatchola closed 8 years ago

spatchola commented 8 years ago

the server receives the message, but it doesn't understand :/

starting websocket server... [2016/06/28 16:16:36:4910] NOTICE: lws_protocol_init Socket connection established Received socket data: ALIST/home/pi/libsocket/C++/streamclient.cpp:130: >>(std::string) input: Error while reading! (Connection reset by peer) errno code: 104Socket client closed the connection


and somtimes it dn't understand the type of message and it show me _bad cast error _ !!

wburgers commented 8 years ago

Hey,

I am very sorry for not responding earlier. I have been busy moving to a new apartment...

Which client do you use? Is it the PHP client or something you have written yourself?

As for the second problem... Can you tell me which command you are trying to execute when you get a bad cast?

Best regards, Willem

spatchola commented 8 years ago

i use the php client in the exemple of the project also i wrote other client with other methode of php but i still have the same problem :/ when i exécute action on device it s work fine but o to take a string i got this error

wburgers commented 8 years ago

As I specified in the readme.md file: "Please note that the PHP client is no longer updated." I forked this project from someone else. He made the PHP client. I decided to deprecate it, in favor of the Polymer client. If you want to use the PHP client, I am not really able to help, let alone update the client. If you are able to fix the client, please submit a pull request.

The PHP client probably closes the socket connection to the server a little bit too soon, but I have no idea why. The server does not crash when the PHP client closes the connection, right?

Have you read the Commandlist.md file? It specifies which commands are valid syntax. A bad cast means you are trying to give input that the Server can not convert to Z-wave internals. For example: If you want to turn on a switch, you can use: "SETNODE~<number>~SWITCH=1" But "SETNODE~<number>~SWITCH=true" will not work. I have tried to make the server cast both "1" and "true" to a boolean, but that was not working well, therefore, it only accepts "0" and "1" as booleans. Since you didn't tell which command you tried to use, I can't really say what is going wrong.

I hope this helps.

Best regards, Willem

wburgers commented 8 years ago

Closed, because there is no response.