1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Solar Frontierの太陽光発電システムから発電・売買電・消費電力を取得する

1
Last updated at Posted at 2018-12-27

Solar Frontierの太陽光発電システムの計測表示ユニット(KP-MU1P-SET-SS)から,発電,売買電,消費電力のデータを取得するAPIを調べたメモ.誰得.

初期設定

  • 計測ユニットを家庭LANに組み込む.
    • 自分の環境では業者から引き渡された状態でAPモードに設定されていたので,STAモードにした.
  • 計測ユニットに割り当てられたIPアドレスを調べておく.(計測ユニットのIPアドレス表示ボタンでわかる)

取得アドレス

http://計測ユニットのIPアドレス/asyncquery.cgi?type=Navi

例えば

$ curl http://10.0.0.1/asyncquery.cgi?type=Navi

結果 (本当は1行)

{
    "dateTime": {
        "year": 2018,
        "month": 12,
        "day": 27,
        "hour": 16,
        "minute": 1,
        "second": 30
    },
    "msrInfo": {
        "pconMode": 2,
        "supVol": 0,
        "supTemp": 0,
        "supVolDisp": 1,
        "supTempDisp": 1,
        "pcsActiveCount": 1,
        "pConCommErr": 1,
        "sysInitState": 127
    },
    "attainment": 0,
    "isStartDateEventDisp": 1,
    "eventAnniversary": 0,
    "isEnergyEventDisp": 1,
    "eventAttainment": 0,
    "isAutoFirmwareUpdatedDisp": 0,
    "eventAutoFirmwareUpdated": 0,
    "returnCode": 0,
    "instantPower": {
        "pcsGeneratedPower": 914,
        "externalGeneratedPower": 0,
        "consumedPower": 2069,
        "tradedPower": 1155,
        "todayEnergy": 125,
        "totalEnergy": 120099
    },
    "scaleDaily": 4
}

うちはガス発電などは入れていないので,externalGeneratedPowerは0.
pcsGeneratedPower,consumedPower,tradedPower が発電,消費電,売買電.

/scripts/base.js を解析するとtypeパラメータに渡す値が分かる.

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?