When I address my solar Battery by opening its server by typing
URL/solar_api/v1/GetStorageRealtimeData.cgi?Scope=System
into the the search field of Firefox I get the correct JSON page:
{
"Body" : {
"Data" : {
"0" : {
"Controller" : {
"Capacity_Maximum" : 7800,
"Current_DC" : 4.2128463476070523,
"DesignedCapacity" : 7800,
"Details" : {
"Manufacturer" : "BYD",
"Model" : "BYD Battery-Box Premium HV",
"Serial" : "P030T020Z2006013382 "
},
"Enable" : 1,
"StateOfCharge_Relative" : 59.399999999999999,
"Status_BatteryCell" : 3,
"Temperature_Cell" : 19,
"TimeStamp" : 1693995454,
"Voltage_DC" : 158.80000000000001
},
"Modules" : []
}
}
},
"Head" : {
"RequestArguments" : {
"DeviceClass" : "Storage",
"Scope" : "System"
}
However if I charge "HTTP GET" of MacroDroid (MD) with the same
argument and ask it to store the result in a variable then some
think went wrong and I get what is shown in "var-sy-proto.JPG"
by opening the Systemprotocol.
Next I open the MD Wiki and looked for Magic Text (MT) but there
no explanation of what MT is how how to use MT nor a simple example
is given.
So pls, can anyone help me for this 1. step?
What i'm after is the value of
"StateOfCharge_Relative" : 59.399999999999999,
within the JSON page which I intent to use for further actions in MD.
Can anyone give a hint how to isolate this value to use it in compare action like "if var>xy then action1"?
Thanks in advance Joerg
URL/solar_api/v1/GetStorageRealtimeData.cgi?Scope=System
into the the search field of Firefox I get the correct JSON page:
{
"Body" : {
"Data" : {
"0" : {
"Controller" : {
"Capacity_Maximum" : 7800,
"Current_DC" : 4.2128463476070523,
"DesignedCapacity" : 7800,
"Details" : {
"Manufacturer" : "BYD",
"Model" : "BYD Battery-Box Premium HV",
"Serial" : "P030T020Z2006013382 "
},
"Enable" : 1,
"StateOfCharge_Relative" : 59.399999999999999,
"Status_BatteryCell" : 3,
"Temperature_Cell" : 19,
"TimeStamp" : 1693995454,
"Voltage_DC" : 158.80000000000001
},
"Modules" : []
}
}
},
"Head" : {
"RequestArguments" : {
"DeviceClass" : "Storage",
"Scope" : "System"
}
However if I charge "HTTP GET" of MacroDroid (MD) with the same
argument and ask it to store the result in a variable then some
think went wrong and I get what is shown in "var-sy-proto.JPG"
by opening the Systemprotocol.
Next I open the MD Wiki and looked for Magic Text (MT) but there
no explanation of what MT is how how to use MT nor a simple example
is given.
So pls, can anyone help me for this 1. step?
What i'm after is the value of
"StateOfCharge_Relative" : 59.399999999999999,
within the JSON page which I intent to use for further actions in MD.
Can anyone give a hint how to isolate this value to use it in compare action like "if var>xy then action1"?
Thanks in advance Joerg