query php

Discussions about RaZberry - Z-Wave board for Raspberry computer
Post Reply
bou-fon
Posts: 3
Joined: 07 Mar 2014 19:38

query php

Post by bou-fon »

hi guys

i want to make a php query to my razberry. i want to get value from a sensor and put it in my sql base. in this forum i read by e.g. http://@IP:8083/ZwaveAPI/..... ????
please, can somebody help me?
my sensor is a svm301

best regards
vwirus
Posts: 12
Joined: 25 Feb 2014 00:12

Re: query php

Post by vwirus »

PHP or different language doesn't matter. One thing you need to figure out is url which has to be called. This URL can be called from browser or any other way. IF you firure it out jus simply call it by f.e.

Code: Select all

<?php
echo file_get_contents('http://yourUrl');
bou-fon
Posts: 3
Joined: 07 Mar 2014 19:38

Re: query php

Post by bou-fon »

yes i understand that language is not important but to get the value from a sensor and put it in a variable. i need a command. i don't found it in Zapi
thanks
Phil
vwirus
Posts: 12
Joined: 25 Feb 2014 00:12

Re: query php

Post by vwirus »

Have you seen this:
http://docs.zwayhomeautomation.apiary.io/

It looks like for now what you can do is very limited but... I'm hoping this will be evolving.
Use this for start:
[url]your_Rpi_ip:port/ZAutomation/api/v1/devices[/url]
after listing all devices you might be able to update with PUT request.
bou-fon
Posts: 3
Joined: 07 Mar 2014 19:38

Re: query php

Post by bou-fon »

thanks so much

i ll try
phil
User avatar
PoltoS
Posts: 7571
Joined: 26 Jan 2011 19:36

Re: query php

Post by PoltoS »

In fact the new version we are publishing this week already contain a module called SensorValueLogging with the ability to send data via GET request. You can fetch it from github (develop tree) if you are impassion ;)
Post Reply