Add support for Hoymiles #1

Closed
opened 2023-01-08 16:08:48 +01:00 by paul · 0 comments
Owner

Hoymiles uses the same way to retrieve data as My Autarco.

For the login, use a POST on https://global.hoymiles.com/platform/api/gateway/iam/auth_login to get the cookies using the body:

{
  "ERROR_BACK": true,
  "LOAD": {
    "loading": true
  },
  "body": { 
    "password": "<some hashed form of the password>",
    "user_name": "<username>"
  },
  "WAITING_PROMISE": true
}

Then, use a POST on https://global.hoymiles.com/platform/api/gateway/pvm-data/data_count_station_real_data to get the using the body (alongside the cookies):

{
  "body": {
    "sid": <UID>
  },
  "WAITING_PROMISE": true
}

The resulting data has the following form:

{
  "status": "0",
  "message": "success",
  "data": {
    "today_eq": "3000.0",
    "month_eq": "55500",
    "year_eq": "55500",
    "total_eq": "55500",
    "real_power": "250.0",
    "co2_emission_reduction": "50000.000",
    "plant_tree": "0",
    "data_time": "2023-01-08 15:57:04",
    "last_data_time": "2023-01-08 15:57:04",
    "capacitor": "10.000",
    "is_balance": 0,
    "is_reflux": 0,
    "reflux_station_data": null
  },
  "systemNotice": null}

Note that the daily value (today_eq) is not part of the monthly/yearly/total value yet and needs to be added because Hoymiles only adds that after the day has finished (?).

Hoymiles uses the same way to retrieve data as My Autarco. For the login, use a POST on <https://global.hoymiles.com/platform/api/gateway/iam/auth_login> to get the cookies using the body: ```json { "ERROR_BACK": true, "LOAD": { "loading": true }, "body": { "password": "<some hashed form of the password>", "user_name": "<username>" }, "WAITING_PROMISE": true } ``` Then, use a POST on <https://global.hoymiles.com/platform/api/gateway/pvm-data/data_count_station_real_data> to get the using the body (alongside the cookies): ```json { "body": { "sid": <UID> }, "WAITING_PROMISE": true } ``` The resulting data has the following form: ```json { "status": "0", "message": "success", "data": { "today_eq": "3000.0", "month_eq": "55500", "year_eq": "55500", "total_eq": "55500", "real_power": "250.0", "co2_emission_reduction": "50000.000", "plant_tree": "0", "data_time": "2023-01-08 15:57:04", "last_data_time": "2023-01-08 15:57:04", "capacitor": "10.000", "is_balance": 0, "is_reflux": 0, "reflux_station_data": null }, "systemNotice": null} ``` Note that the daily value (`today_eq`) is not part of the monthly/yearly/total value yet and needs to be added because Hoymiles only adds that after the day has finished (?).
paul added the
enhancement
label 2023-01-08 16:11:23 +01:00
paul self-assigned this 2023-01-08 16:11:26 +01:00
paul added a new dependency 2023-01-08 16:11:40 +01:00
paul added this to the 0.2.0 milestone 2023-01-08 16:13:19 +01:00
paul closed this issue 2023-01-10 15:50:31 +01:00
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Depends on
Reference: paul/solar-grabber#1
No description provided.