These meters were manually edited in the past. I am working on automating it. This is the error I get when I submit a meter reading via a REST call -
Here is the meter info -
The previously entered reading was 7742. The current instrument reading is 8680. Since the rollover is 8000 hours, I have to POST a 680 reading.
{
"_responsedata": {
"Error": {
"extendedError": {
"moreInfo": {
"href": "http:\/\/localhost\/maxrest\/oslc\/error\/messages\/BMXAA2890E"
}
},
"reasonCode": "BMXAA2890E",
"message": "BMXAA2890E - The new reading (680) entered on 1\/27\/21 7:21 AM should be greater than the previous reading (7,742.00) entered on 7\/20\/20 8:57 AM unless the new reading is a delta or meter 8000 HR on Location 1126 has a rollover value and Rollover is selected.",
"statusCode": "400"
}
},
"_responsemeta": {
"status": "400"
}
POST Request
https://maximosite:8443/maxrest/oslc/os/MXMETERDATA?lean=1
JSON payload
{
"_data":{
"siteid": "ENG",
"inspector": "OSI",
"location": 1126,
"metername": "8000 HR",
"newreading": 680,
"rollover": 8000,
"dorollover": "True",
"newreadingdate": "2021-01-27T07:21:00"
},
"_meta":{
"method": "PATCH",
"patchtype":"MERGE"
}
}
I am able to manually edit the reading. I am wondering how this can be overcome with a REST call.
The Rollover? checkbox overwrote the 7742 value. The REST call with "dorollover": "True" doesn't seem to be cutting it.
How do I force a rollover just like we can in the GUI manually as shown above.
#Integrations