Giter VIP home page Giter VIP logo

zytel-dsl's Introduction

I quit using this method and am using a Home Assistant custom component. https://github.com/fancygaphtrn/pk5001z

zytel-dsl

Retrieve JSON formatted WAN information from a Zytel PK5001Z modem

I use this to get information about my DSL modem into Home Assistant

usage: GetWANDSLInfo.py [-h] [-v] host user pw

Retrieve JSON formatted WAN information from a Zytel PK5001Z modem

positional arguments: host DSL modem hostname/IP address user DSL modem user name pw DSL modem password

optional arguments: -h, --help show this help message and exit -v, --verbose verbose prints debug information

Return data: {"download": "1.792", "upload": "0.605", "dslStatus": "CONNECTED", "internetStatus": "CONNECTED", "modemIP": "xx.xx.xx.xx", "RemoteIP": "xx.xx.xx.xx"}

Home assistant

configuration.yaml

sensor:
  - platform: command_line
    name: DSL download
    unit_of_measurement: Mbps
    scan_interval: 300
    command: !secret dsl_command
    value_template: '{{ value_json.download }}'
  - platform: command_line
    name: DSL upload
    unit_of_measurement: Mbps
    scan_interval: 300
    command: !secret dsl_command
    value_template: '{{ value_json.upload }}'

secerts.yaml

dsl_command: '/usr/src/dsl/GetWANDSLInfo.py x.x.x.x user password'

zytel-dsl's People

Contributors

fancygaphtrn avatar

Watchers

 avatar

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.