Page 1 of 1

query php

Posted: 07 Mar 2014 19:52
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

Re: query php

Posted: 07 Mar 2014 21:35
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');

Re: query php

Posted: 08 Mar 2014 11:43
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

Re: query php

Posted: 08 Mar 2014 22:52
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.

Re: query php

Posted: 09 Mar 2014 12:27
by bou-fon
thanks so much

i ll try
phil

Re: query php

Posted: 09 Mar 2014 21:17
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 ;)