We are having some problems with passing alphanumeric values over mango Serotonin while using MySQL database. Namely, I'm able to see the point value and the point value is cached, but it's not written to the MySQL database. I don't seem to have the same problem for numeric values. There is a rarely occurring Write timeout in the logs, but it seems sporadic. Any advice?
Posts made by Igor Zhalkin
-
Problems with Alphanumeric values on serotonin persistent.
-
RE: Adding/updating points via the REST API.
@terrypacker I was able to update/create points for a BACnet device using the JSON format. So it seems that it works, at least partially.
Thanks for your help.
-
RE: Adding/updating points via the REST API.
That's exactly what I tried, and I still get 406 response. Here is the body I get:
{
"enabled": true,
"templateXid": "Binary_Default",
"loggingProperties": {
"tolerance": 0,
"discardExtremeValues": false,
"discardLowLimit": -1.7976931348623157e+308,
"discardHighLimit": 1.7976931348623157e+308,
"loggingType": "ON_CHANGE",
"intervalLoggingType": "INSTANT",
"intervalLoggingPeriod": {
"periods": 15,
"type": "MINUTES"
},
"overrideIntervalLoggingSamples": false,
"intervalLoggingSampleWindowSize": 0,
"cacheSize": 1
},
"textRenderer": {
"zeroLabel": "zero",
"zeroColour": "blue",
"oneLabel": "one",
"oneColour": "black",
"type": "textRendererBinary"
},
"chartRenderer": {
"limit": 10,
"type": "chartRendererTable"
},
"modelType": "DATA_POINT",
"validationMessages": [
{
"message": "Required value",
"level": "ERROR",
"property": "alternateBooleanChange.startValue"
}
],
"dataSourceId": 0,
"deviceName": "A",
"chartColour": "blue",
"plotType": "STEP",
"purgeOverride": false,
"purgePeriod": {
"periods": 1,
"type": "YEARS"
},
"pointLocator": {
"dataType": "BINARY",
"settable": false,
"changeType": "ALTERNATE_BOOLEAN",
"modelType": "PL.VIRTUAL",
"relinquishable": false
},
"readPermission": "superadmin",
"setPermission": "superadmin",
"dataSourceXid": "teat 2-DS",
"pointFolderId": 0,
"unit": "",
"useIntegralUnit": false,
"integralUnit": "s",
"useRenderedUnit": false,
"renderedUnit": "",
"dataSourceName": null,
"id": 18,
"xid": "DP_519610",
"name": "A"
}The only difference from the get is the dataSourceId and Name that became 0 and null respectively. Any advice?
-
Adding/updating points via the REST API.
We're trying to use the API to add and update points, but it doesn't seem to work.
When I try using "put /v1/data-points/{xid}:Update an existing data point", I get a 406 response.
{
"Date": "Wed, 09 Dec 2015 07:23:42 GMT",
"Errors": "Validation error",
"Content-Type": "application/json; charset=UTF-8",
"Transfer-Encoding": "chunked",
"Server": "Jetty(9.2.12.v20150709)"
}When I try to use the bulk update, I get response 200, but there is no change to the actual points.
{
"Date": "Wed, 09 Dec 2015 07:31:39 GMT",
"Content-Type": "application/json; charset=UTF-8",
"Transfer-Encoding": "chunked",
"Server": "Jetty(9.2.12.v20150709)"
}Someone was able to make it work?