andgineer / ambientweather_livedata

Get sensor's temperature and humidity data from Ambient Weather IPObserver page LiveData.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status

Extract data from Ambient Weather stations

Python3 library that extracts information from Ambient Weather stations.

It collects sensor's data (temperature and humidity) from the IPObserver LiveData tab of the IPObserver web-page. You can get this page from the IPObserver - just open the IPObserver IP adddress in your web-brawser to see it.

The library uses xpath and lxml.

Example:

    import ambientweather_livedata

    inSensor, outSensor = ambientweather_livedata.get('http://10.0.0.176/LiveData.html')
    print('Time: {}\n'.format(inSensor.time))
    print('''Indoor\n{delimiter}\nTemperature: {temp}\nHumidity: {humidity}
Absolute preassure: {abs_press}\nRelative preassure: {rel_press}\nBattery status: {battery}\n'''.format(
        delimiter='='*20,
        temp=inSensor.temp,
        humidity=inSensor.humidity,
        abs_press=inSensor.abs_press,
        rel_press=inSensor.rel_press,
        battery=inSensor.battery
    ))
    print('''Outdoor\n{delimiter}\nTemperature: {temp}\nHumidity: {humidity}
Battery status: {battery}\n'''.format(
        delimiter='='*20,
        temp=inSensor.temp,
        humidity=inSensor.humidity,
        battery=inSensor.battery
    ))

About

Get sensor's temperature and humidity data from Ambient Weather IPObserver page LiveData.html


Languages

Language:HTML 70.0%Language:Python 22.5%Language:Shell 7.3%Language:Makefile 0.3%