FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Help request - query value · Issue #171 · python-kasa/python-kasa · GitHub

Repository navigation

Help request - query value #171

Closed
Closed

Description

Is it possible to query a host for a specific value? I am looking to just get the on_time value for some switches & outlets (hs200 & kp200) so that I can ultimately run a perl script that will get the data, put it to an snmp oid and then mrtg/rrdtool will graph them. these 2 devices dont support emeter. Here is the sysinfo output:

{'active_mode': 'none',
'alias': 'switch',
'dev_name': 'Smart Wi-Fi Light Switch',
'deviceId': '80063E87CCEE06CAEE0810C430C1FBFE1D4077C7',
'err_code': 0,
'feature': 'TIM',
'hwId': 'F30CA3404523AE331168A102F897B7F0',
'hw_ver': '3.0',
'icon_hash': '',
'latitude_i': xxxx,
'led_off': 0,
'longitude_i': -xxxx,
'mac': '3C:84:6A:1C:E1:AC',
'mic_type': 'IOT.SMARTPLUGSWITCH',
'model': 'HS200(US)',
'next_action': {'type': -1},
'oemId': '59F15C39F35FEBCF7E5A84FF7620AFA1',
'on_time': 174,
'relay_state': 1,
'rssi': -36,
'status': 'new',
'sw_ver': '1.1.4 Build 200814 Rel.105352',
'updating': 0}

Activity

  1. kirichkov commented on Jun 11, 2021

    Contributor

    Given that this is a JSON, why not extract the value you're interested in in the Perl script itself?

  2. rytilahti commented on Oct 4, 2021

    Member

    Slightly related to #209, but I see no reason to add any sort of facilities to extract individual data fields so I'm closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL