Giter Club home page Giter Club logo

raineagle's Introduction

Python class for Rainforest Eagle

Python Class for utilizing the Rainforest Automation Eagle ( RFA-Z109 ) socket API

version = "0.1.7"

Example :

    import RainEagle

    raineagle = RainEagle.Eagle( debug=0 , addr="10.1.1.39")
    ret_data = raineagle.list_devices()

    print "device MacID = ", ret_data['DeviceInfo']['DeviceMacId']

API Call list :

    # Socket API based commands
    list_devices()
    get_device_data(macid)
    get_history_data(macid, starttime='0x00000000', endtime=None, frequency=None)
    get_instantaneous_demand(macid)
    get_summation_values(macid, interval='day')
    get_fast_poll_status(macid)
    set_fast_poll(macid, frequency='0x04', duration='0xFF')


    # Web API based calls
    cloud_reset()
    confirm_message(id)
    factory_reset()
    get_demand_values(macid, interval='hour', frequency=None)
    get_device_config()
    get_device_list()
    get_gateway_info()
    get_historical_data(period='day')
    get_message()
    get_price()
    set_price(price)
    set_price_auto()
    get_remote_management()
    get_setting_data()
    get_usage_data()
    get_time_source(macid)
    set_time_source(macid, source='internet')
    get_timezone()
    get_uploader()
    get_uploaders()
    set_cloud(url, authcode='', email='')
    set_message_read()
    set_remote_management(macid, status='on')

API Calls return dictionarys containing data results, raises exception or returns None if error

External Documentation

raineagle's People

Contributors

evilpete avatar owendelong avatar jeffsf avatar steve-gh avatar

Watchers

Aron Silverton avatar

raineagle's Issues

Document Web APIs with curl commands

The idea here is to create a set of Bash scripts that use curl to invoke the web-based APIs (i.e., CGI and Cloud). These scripts can be useful to verify functionality when new FW releases are pushed to the Eagle. They may also be useful in creating unit tests for the Python code.

Re-enable the socket API

Working off of the 'dev' branch, it appears that the socket API code is present, but the corresponding class is not inherited by the superclass. Re-enable the socket API before trying to make any other changes.

Update for Python 3 compatibility

Some of the code doesn't appear to with Python 3.4 or newer. Update code for Python 2 / Python 3 compatibility using "futurize" from python-future and whatever additional manual fixes are needed.

PEP8 Cleanup

Cloning to my MAC and/or importing to PyCharm made a mess of the code and that's causing all sorts of other problems (e.g., because of indentation errors.)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.