Ecowitt Gateway
Features
- Gets Live Data
- Gets Device Information
- Get/Set Custom Server Configuration
Requirements
- NodeJS 8+
- Ecowitt Gateway Firmware 1.5.7+ (1.5.9+ for CO2 and 1.6.4+ for Rain commands)
Methods
constructor('IP_ADDRESS', PORT, USE_RAIN_DATA, DEBUG)
getSensors({
type: 'WH65',
status: 'active'
})
getLiveData(includeRain = true, filterActiveSensors = false)
getRainData()
getRain()
getSoilMoistureCalibration()
getPM25Offset()
getCO2Offset()
getFirmwareVersion()
getSystemParams()
getMacAddr()
getCustomServerInfo()
setCustomServerInfo({
station: 'STATION ID',
key: 'KEY',
server: '192.168.X.X',
port: 3000,
interval: 60,
protocol: 'wunderground',
enabled: true,
path_ecowitt: '/weather',
path_wunderground: '/weather'
})
static discover(timeout)
Example
const EWG = require('ecowitt-gateway');
const gw = new EWG('192.168.X.X', 45000);
gw.getLiveData()
.then(data => {
console.log(JSON.stringify(data));
});
Future Development
- Get & Set more configuration settings