Git Product home page Git Product logo

kiwi's Introduction

kiwi

This tiny app makes it easy to find registered devices from your kiwigrid installation and read their values via command line.

kiwi devices prompt

kiwi read prompt

What is "kiwigrid"?

Kiwigrid is a german smart metering platform you might already be using with your PV plant.

If you are using a PV battery from SOLARWATT like I do and you are used to check your stats on their EnergyManager portal, you're ready to go.

Other battery manufacturers might also be supported. In lack of test devices, I could not verify others.

Usage

kiwi requires the ip address from your local API gateway which is sending your data to kiwigrid. Use the ip address with the --ip argument. Read on to find out how to discover your API gateway in your local network.

Your API gateway will provide many measurements for the devices that were registered upfront. You will need to query them with the name of the corresponding device. Read on to find the names of the devices that are available to you. These device names make the argument --device.

kiwi can read one or multiple values for the specified device. Simply define these values with the argument --tag as shown below. Usually, there are a lot of values in the response of your API gateway. Read on to find out which values are available to you.

Querying a single value:

kiwi read --ip=192.168.178.83 --device=MyReserve --tag=StateOfCharge

92.5

Querying multiple values:

kiwi read --ip=192.168.178.83 --device=MyReserve --tag=StateOfCharge --tag=ModeConverter --tag=StateOfHealth
  
{"StateOfCharge":"92.5","ModeConverter":"DISCHARGING","StateOfHealth":"96"}

Include the timestamp of the API request

kiwi read --ip=192.168.178.83 --device=MyReserve --tag=StateOfCharge --add-timestamp
  
{"StateOfCharge":"92.5","UtcTimeStamp":"2022-11-17T18:54:16.1410811Z"}

Full command line reference

kiwi --help

Finding your local API gateway

To use this app, you need to know the ip address of your local API gateway which is sending your data to kiwigrid.

Scan your local network to find this device. If you find possible candidates, try them with this URL template:

You should get a JSON response immediately. If you do, this is you local API gateway.

If you are using SOLARWATT's EnergyManager, you can find the local ip address easily. Just head over to the portal, login and click on the highlighted menu:

How to find the local API gateway with Solarwatt

Verifying registered devices

In case you did not find the device you were looking for or you want to verify whether the found name is the correct one, navigate to your API gateway with your browser (see "Finding your local API gateway") and inspect the JSON response. Look for tag values with name "IdName". You should find one block whose value contains the name of the device you are looking for.

Verifying registered devices

Finding values to read

Once you found the API gateway you might want to inspect the values you can read from there. Simply navigate to your API gateway with your browser (see "Finding your local API gateway") and inspect the JSON response.

In the response, you will find many information blocks that are assigned to a device over a guid. This guid belongs to a device which is linked together in a "IdName" tag value (see image above).

These blocks also contain a tagName which is the metric like "StateOfHealth" and a value which holds the value for this metric.

Verifying device names

In the example above, the following command ...

kiwi read --ip=... --device=... --tag=StateOfHealth

would return the value 96

kiwi's People

Contributors

awaescher avatar

Watchers

 avatar  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.