Page 1 of 1

PyZW source code

Posted: 07 Aug 2013 15:32
by thegeek
I read that PyZW free and open source solution. I could not find that Python JSON API CODE. I found some PyZW JavaScript but that script also call postJSON method and that method again send HTTP POST to Python JSON API server.

I know that Z-wave.me gives instructions for using JSON API, but I need the source code that api, because I want to create my own API in the Java programming language.

Can someone help me out. Thank you in advance.

Your message is a bit

Posted: 07 Aug 2013 15:32
by PoltoS
Your message is a bit confusing. PyZW (also know as Z-Way.Py, or Z-Way written in Python) is not open source yet (where have you read it?). And more over, it is the old Python version and is not maintained anymore.

The new Z-Way (internally called Z-Way.C, written on C/C++/JavaScript) use JavaScript language and JSON in the API. You don't need sources to write your oen API, since there is the C library with C-level API to make any binding on top of Z-Way library.

May be you can describe us more how do you see your Java API. May be we can help you with sample codes of C API?

C API description?

Posted: 07 Aug 2013 15:32
by rabing
hi, is there a description of the C api? I have C application using Z-Way via JSON/http.
But direct C calls and callback functions would be nice...

Please have a look in include

Posted: 07 Aug 2013 15:32
by PoltoS
Please have a look in include files comming with Z-Way. We will pubish sample code soon too

C sample code

Posted: 07 Aug 2013 15:32
by rabing
Hi, just tried to compile the C sample code from razberry.zwave.me. Compile failed because the header file
"ZDataPrivate.h" is missing. Could you provide this file?

You do not need this file,

Posted: 07 Aug 2013 15:32
by PoltoS
You do not need this file, since it's name reminds that it is private ;)

We have update the sample code. Please download it agin.

Hi PoltoS,

Posted: 07 Aug 2013 15:32
by thegeek
Hi PoltoS,
I'm sorry for the delay response, I founded document on (http://ps.alsenet.com/pub/v9%20PYZW_Manual.pdf). The document states that the controller is written in the programming language Python. The interface layout in the document looks the same as on the device so I figured it was the same software. Am I wrong?
When you open such pyzw_zwave.js on the server side, at the beginning of the commentary says "This file is part of PyZW." The document says it is free under GNU license, but it is not open source, my mistake sorry.

However,
On the internet I read that all used SerialAPI to communicate directly with Zwave network. Since I'm making an application in the Java programming language (My application should be the same as the application on RaZberry, only written in Java). I wanted to create my own API that will communicate directly with Zwave network.

I looked at the JavaScript code that resides on a server and is a JSON API. I saw that API sends the Ajax request "to itself" . In fact I can't see behind what is happening.

Questions:
How a Java application can communicate with the Zwave network without JSON API?
In what way I can create my own API for direct communication with Zwave?
Do I have to use the serial API and where can I find him?
Do you have any suggestions?

thanks a lot,
best regards



The UI part of PyZW is indeed

Posted: 07 Aug 2013 15:32
by PoltoS
The UI part of PyZW is indeed open source. The backend is called Z-Way and is not.

It is not clear what do you mean with your Java app, but to communicate directly with Z-Wave tranciever you need to write/read to/from serial port. Serial API is not open, you need to request it from Sigma Designs - owner of Z-Wave protocol.

You can also make binding from our Z-Way (new version, written in C) to Java without using our C-to-JavaScript binding. This should be the perfect solution to you.