PyZW source code

Discussions about RaZberry - Z-Wave board for Raspberry computer
Post Reply
thegeek
Posts: 2
Joined: 04 Aug 2013 17:47

PyZW source code

Post 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.
User avatar
PoltoS
Posts: 7565
Joined: 26 Jan 2011 19:36

Your message is a bit

Post 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?
rabing
Posts: 31
Joined: 08 Mar 2013 03:00

C API description?

Post 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...
User avatar
PoltoS
Posts: 7565
Joined: 26 Jan 2011 19:36

Please have a look in include

Post by PoltoS »

Please have a look in include files comming with Z-Way. We will pubish sample code soon too
rabing
Posts: 31
Joined: 08 Mar 2013 03:00

C sample code

Post 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?
User avatar
PoltoS
Posts: 7565
Joined: 26 Jan 2011 19:36

You do not need this file,

Post 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.
thegeek
Posts: 2
Joined: 04 Aug 2013 17:47

Hi PoltoS,

Post 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


User avatar
PoltoS
Posts: 7565
Joined: 26 Jan 2011 19:36

The UI part of PyZW is indeed

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