Anomaly in the API

3 comments started 2023-12-19 last 2023-12-19
BugsCloud Portal
#1 Icarus

Just curious about an API observation.

If I do a GET inverter/{inverter_serial_number}/settings
I retrieve the IDs of all the settings for the inverter, such as...

  }, {
    "id" : "28",
    "name" : "AC Charge 2 Start Time",
    "validation" : "Value format should be HH:mm. Use correct time range for hour and minutes",
    "validation_rules" : [ "date_format:H:i" ]
  }, {
    "id" : "29",
    "name" : "AC Charge 2 End Time",
    "validation" : "Value format should be HH:mm. Use correct time range for hour and minutes",
    "validation_rules" : [ "date_format:H:i" ]
  }, {

However, having played with changing my AC Charge 2 schedule, I revisted the list of settings again and find:

}, {
"id" : "102",
"name" : "AC Charge 2 Start Time",
"validation" : "Value format should be HH:mm. Use correct time range for hour and minutes",
"validation_rules" : [ "date_format:H:i" ]
}, {
"id" : "103",
"name" : "AC Charge 2 End Time",
"validation" : "Value format should be HH:mm. Use correct time range for hour and minutes",
"validation_rules" : [ "date_format:H:i" ]
}, {

Is there some subtle difference between "28" / "102" or perhaps ths is just a defect ?

#2 hoggy

Is this perhaps firmware related?
The older kit didn't have a second slot (well, ones that worked) whereas later versions now do?
I think the registers underneath moved as part of this, so perhaps this is why the IDs are translated to different ones?

D
#3 DD

Icarus That's interesting... looking back at an old list of settings I had retrieved (when playing with the API), I see I have both 28 and 102 labelled as "AC Charge 2 Start Time". 102 to 127 are a contiguous group of settings for charge slots 2 through 10. 64 and 65 are slot 1 start end end, and 101 is slot 1's limit.
These don't seem to match the register definitions in givenergy_modbus.

On the subject of the API, is there a difference between 'presets' and 'settings' ? Is that again historical ?