Search found 4 matches

by devtone
Wednesday 30 November 2016 1:53
Forum: PHP and all others
Topic: Custom Arduino Sensor/Script
Replies: 3
Views: 1646

Re: Custom Arduino Sensor/Script

Solved.

Can anyone explain the diff between nvalue and svalue? Can't find any info on it..
by devtone
Wednesday 30 November 2016 0:27
Forum: PHP and all others
Topic: Custom Arduino Sensor/Script
Replies: 3
Views: 1646

Re: Custom Arduino Sensor/Script

Got some data with:

s = request['content'];

local light = domoticz_applyXPath(s,'//current/light/@value')
local co2 = domoticz_applyXPath(s,'//current/co2/@value')
local temp = domoticz_applyXPath(s,'//current/temp/@value')
local presure = domoticz_applyXPath(s,'//current/presure/@value ...
by devtone
Tuesday 29 November 2016 23:54
Forum: PHP and all others
Topic: Custom Arduino Sensor/Script
Replies: 3
Views: 1646

Re: Custom Arduino Sensor/Script

Bonuscode (Arduino):

#include <SPI.h>
#include <Ethernet.h>
#include <Adafruit_BMP085.h>
#include <Wire.h>

Adafruit_BMP085 bmp;
int SensorCO2Value;
int SensorLightValue;
const int SensorCO2=1;
const int SensorLight=0;
byte mac[] = {
0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED
};
IPAddress ip(192, 168, 68 ...
by devtone
Tuesday 29 November 2016 23:48
Forum: PHP and all others
Topic: Custom Arduino Sensor/Script
Replies: 3
Views: 1646

Custom Arduino Sensor/Script

I have a Arduino with 4 sensors, LAN connected.

It runs a HTTP server that responds with:

<current>
<light value="630"/>
<co2 value="238"/>
<temp value="25.70"/>
<presure value="103239"/>
</current>


I've created a HTTP poller running the following LUA script:


s = request['content'];
local ...