C API plus web server

Discussions about RaZberry - Z-Wave board for Raspberry computer
Post Reply
jucs
Posts: 35
Joined: 28 Dec 2016 17:56

C API plus web server

Post by jucs »

Hi there,

I'm currently playing around with the C API of the Z-Way server. I'm using the example project from http://razberry.z-wave.me/index.php?id=15. As noted in several threads in the forum, I have to stop the regular server before I start my own tool since they both use the controller.

My question now is: How can I both use the web interface and use the C API? Is there a way to start the regular web server from my own C code so that I get web access as well?

Thanks!
User avatar
PoltoS
Posts: 7579
Joined: 26 Jan 2011 19:36

Re: C API plus web server

Post by PoltoS »

Unfortunatelly no. But you can write a module for v8 JS engine in C to access same zway object out of your code.
jucs
Posts: 35
Joined: 28 Dec 2016 17:56

Re: C API plus web server

Post by jucs »

Thanks; is there a tutorial for that somewhere?
User avatar
PoltoS
Posts: 7579
Joined: 26 Jan 2011 19:36

Re: C API plus web server

Post by PoltoS »

well, you can write a v8 C++ module to export your stuff in JS and then just use Z-Wave API in JS: zway.devices[xx]....
tromper
Posts: 5
Joined: 11 Oct 2017 20:38

Re: C API plus web server

Post by tromper »

Hi jucs, I am currently doing a project for my university which involves creating a GUI and sending data to it from my zwave sensor using razberry and the c library API. I am using netbeans to try to compile the program but i keep struggling as it is telling me that the header file zwaylib.h and zlogging.h can not be found. It would mean the world to me if you show me how to propperly use this API in order to be able to see something in the future GUI i have to develop (i am still learning a lot on these areas).
Thanks
Post Reply