I want to use MySQL database for point values storage, in the SQL table have see a pointValues table, how do I use the table to record point values, how do I do it?
Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

Posts made by sean
-
How to use MySQL store pointvalues ?
-
Mango crash after nightly purge
When nightly purge or manual click Button "Purge now using purge settings" , system will high cpu used and mango not finished purge, just crash machine, snapshot
Mango version is 3.7.12
-
Watchlist User Permissions
I create a user permission account how to set this user in watchlist select sources tabs can see datasource
-
how to get PermissionHolder ?
I want use metaDataPoint to delete data point by script,
in DataPointService.delete function need PermissionHolder, how do I got it ?
[jdk.dynalink.beans.SimpleDynamicMethod DataPointVO com.infiniteautomation.mango.spring.service.DataPointService.delete(String,PermissionHolder)] -
How to query Value?
I got a question, code like this
<md-input-container class="flex-auto" md-theme="default"> <label>Card Number</label> <input type="text" ng-model="logQuery.mifareCardID" ng-model-options="{ debounce: 300 }"> </md-input-container> <div flex></div> <md-input-container class="md-input-has-value flex-auto" md-theme="default"> <label for="StartTime">Start Time</label> <ma-date-picker type="text" ng-click="showPicker($event)" name="startTime" ng-model="logQuery.startTime" mode="date" id="StartTime" aria-invalid="false" md-theme="mangoDark"> </md-input-container> <md-input-container class="md-input-has-value flex-auto" md-theme="default" ng-if="logQuery.startTime"> <label for="EndTime">End Time</label> <ma-date-picker type="text" ng-click="showPicker($event)" name="endTime" ng-model="logQuery.endTime" mode="date" id="EndTime" aria-invalid="false" md-theme="mangoDark"> </md-input-container> <ma-now update-interval="1 SECONDS" output="time"></ma-now> <ma-point-query query="{$and: true, xid: '_Polling_accessCardID'}" points="doorAccessRecordPoints" /> <ma-get-point-value points="doorAccessRecordPoints"></ma-get-point-value> <ma-point-values points="doorAccessRecordPoints" values="doorAccessRecordPointsValues" from="resultLogQuery.startTime || dateBar.from" to="resultLogQuery.endTime || dateBar.to" rollup="POINT_DEFAULT" rollup-interval="time" use-cache="false"></ma-point-values>
doorAccessRecordPointsValues like this:
[ {"timestamp":1701400999162,"value_XID_Door02_Polling_accessCardID":2022010448}, {"timestamp":1701401016165,"value_XID_Door01_Polling_accessCardID":2022011364}, {"timestamp":1701401021166,"value_XID_Door05_Polling_accessCardID":2022012507}, {"timestamp":1701401065166,"value_XID_Door05_Polling_accessCardID":2022013115}, {"timestamp":1701401083162,"value_XID_Door04_Polling_accessCardID":2022010273}, {"timestamp":1701401085162,"value_XID_Door04_Polling_accessCardID":2022013232}, {"timestamp":1701401132166,"value_XID_Door05_Polling_accessCardID":2022010170}, {"timestamp":1701401179162,"value_XID_Door03_Polling_accessCardID":2022012796}, ]
I want to query value from use logQuery.mifareCardID to query doorAccessRecordPointsValues value is equal to logQuery.mifareCardID,
how do I do ? -
Quest About Restful API
I have question about use mango restful api,
my mango host:127.0.0.1:7860,
how do I post a file to the file-store, When I use Postman, post a file, response 403 error,
mango version: 3.7.12
img -
RE: point set timestamp
@CraigWeb mango version is 3.7.12
this datapoint is temperature sensor point so, recorde is normaly 2x °C
so 4376.54 and 459.62 is incorrect, so I want to reset value or delete this 2 values in timestamp[PointValueTime(22.6@2023/05/24 13:30:12.836), PointValueTime(4376.54@2023/05/24 13:35:12.836), PointValueTime(459.62@2023/05/24 13:40:12.836), PointValueTime(22.8@2023/05/24 13:45:12.836), PointValueTime(22.886666666666667@2023/05/24 13:50:12.836)]
time = 1684906212836 , point= PointValueTime(22.6@2023/05/24 13:30:12.836)
time = 1684906512836 , point= PointValueTime(4376.54@2023/05/24 13:35:12.836)
time = 1684906812836 , point= PointValueTime(459.62@2023/05/24 13:40:12.836)
time = 1684907112836 , point= PointValueTime(22.8@2023/05/24 13:45:12.836)
time = 1684907412836 , point= PointValueTime(22.886666666666667@2023/05/24 13:50:12.836) -
RE: point set timestamp
@terrypacker I have already executed in the formal meta-data-point environment, but the values of those two points are still incorrect and have not been correctly modified to the specified values I entered. How do I do to change that two point values in timestamp?
-
point set timestamp
A question about I use point.set function, want to change point value in the timestamp,
why not work?
-
RE: About magetpointvalue array's question
{{ class_kwh[0] }}
Is show this array[0] information
{"id":2721,"xid":"EMS_004065_001_H1_kWh","name":"kWh-001.班級冷氣-(1小時率)-用電度數(kWh)","enabled":true,"deviceName":"(1小時率)-統計","readPermission":"superadmin,admin,user","setPermission":"superadmin,user","pointFolderId":0,"purgeOverride":false,"unit":"","useIntegralUnit":false,"useRenderedUnit":false,"pointLocator":{"contextUpdate":false,"modelType":"PL.SCRIPTING","settable":true,"dataType":"NUMERIC","varName":"h1_kWh_001","relinquishable":false},"chartColour":"","plotType":"SPLINE","loggingProperties":{"loggingType":"ALL","tolerance":0,"discardExtremeValues":false,"overrideIntervalLoggingSamples":false,"cacheSize":1},"textRenderer":{"useUnitAsSuffix":true,"format":"0.00","suffix":"","type":"textRendererAnalog"},"chartRenderer":{"timePeriod":{"periods":1,"type":"DAYS"},"type":"chartRendererImage"},"rollup":"NONE","simplifyType":"NONE","simplifyTolerance":"NaN","simplifyTarget":5000,"preventSetExtremeValues":false,"templateXid":null,"dataSourceId":88,"dataSourceXid":"EMS_004065_H1_Stats","dataSourceName":"@EMS統計-2.[1小時率]","dataSourceTypeName":"SCRIPTING","dataSourceEditRoles":[],"tags":{},"originalId":"EMS_004065_001_H1_kWh","lastPayload":{"xid":"EMS_004065_001_H1_kWh","event":"REGISTERED","value":{"dataType":"NUMERIC","value":0,"timestamp":1625454000000,"annotation":null},"renderedValue":"0.00 ","convertedValue":0,"enabled":true,"pointEnabled":true,"attributes":{}},"running":true,"_textRenderer":{},"value":0,"time":1625454000000,"convertedValue":0,"renderedValue":"0.00 ","unreliable":false}
-
RE: About magetpointvalue array's question
But in
<ma-point-query query="{name:'channel-kwh'}" points="class_kwh" promise="promise"></ma-point-query> <ma-get-point-value points="class_kwh"></ma-get-point-value>
I can use
{{ class_kwh[0] }}
to show this index array obj detail but I don't how to show value or rendered value
{{ class_kwh[0].value }} or {{ class_kwh[0].renderedValue }}
both not work -
About magetpointvalue array's question
<div class="" ng-init="values = [];select = []"> <label ng-repeat="classID in classArray track by $index" class="col-2 px-4"> <input class="check-btn" type="checkbox" ng-model="ems.EMSObjectID.ctrler[$index]" value="classID" ng-true-value="{{ classID }}" ng-click="values.push(class_kwh[$index].renderedValue)"> <span> {{classID}} </span> </label> </div> <div ng-repeat="vla in class_kwh"> {{ vla[ 'renderedValue' + point.xid ] }} </div> <ma-point-query query="{name:'channel-kwh'}" points="class_kwh" promise="promise"></ma-point-query> <ma-get-point-value points="class_kwh"></ma-get-point-value>
I got
class_kwh
array withma-get-point-vlaue
and I can use repeat to show value by<div ng-repeat="vla in class_kwh"> {{ vla[ 'renderedValue' + point.xid ] }} </div>
how do I use<input class="check-btn" type="checkbox" ng-model="ems.EMSObjectID.ctrler[$index]" value="classID" ng-true-value="{{ classID }}" ng-click="values.push(class_kwh[$index].renderedValue)">
this
$index
to getclass_kwh[$index]
and to show[ 'renderedValue' + point.xid ]
I want to use checkbox get index and push this $idex's class_kwh array value to values -
RE: Data Point Value
@mattfox I just want save object in value or value can't be object?
Code is this<div ng-init="rackList = [ {'Name': 'CardName_A01', 'Rack': 'CardNo_A01', 'Label': 'A', 'idx': 1}, {'Name': 'CardName_A02', 'Rack': 'CardNo_A02', 'Label': 'A', 'idx': 2}, {'Name': 'CardName_A03', 'Rack':'CardNo_A03', 'Label': 'A', 'idx': 3}, {'Name': 'CardName_A04', 'Rack': 'CardNo_A04', 'Label': 'A', 'idx': 4}, {'Name': 'CardName_A05', 'Rack': 'CardNo_A05', 'Label': 'A', 'idx': 5}, {'Name': 'CardName_A06', 'Rack': 'CardNo_A06', 'Label': 'A', 'idx': 6}, {'Name': 'CardName_A07', 'Rack': 'CardNo_A07', 'Label': 'A', 'idx': 7}, {'Name': 'CardName_A08', 'Rack':'CardNo_A08', 'Label': 'A', 'idx': 8}, {'Name': 'CardName_A09', 'Rack': 'CardNo_A09', 'Label': 'A', 'idx': 9}, {'Name': 'CardName_A10', 'Rack': 'CardNo_A10', 'Label': 'A', 'idx': 10}, {'Name': 'CardName_B01', 'Rack': 'CardNo_B01', 'Label': 'B', 'idx': 1}, {'Name': 'CardName_B02', 'Rack': 'CardNo_B02', 'Label': 'B', 'idx': 2}, {'Name': 'CardName_B03', 'Rack':'CardNo_B03', 'Label': 'B', 'idx': 3}, {'Name': 'CardName_B04', 'Rack': 'CardNo_B04', 'Label': 'B', 'idx': 4}, {'Name': 'CardName_B05', 'Rack': 'CardNo_B05', 'Label': 'B', 'idx': 5}, {'Name': 'CardName_B06', 'Rack': 'CardNo_B06', 'Label': 'B', 'idx': 6}, {'Name': 'CardName_B07', 'Rack': 'CardNo_B07', 'Label': 'B', 'idx': 7}, {'Name': 'CardName_B08', 'Rack':'CardNo_B08', 'Label': 'B', 'idx': 8}, {'Name': 'CardName_B09', 'Rack': 'CardNo_B09', 'Label': 'B', 'idx': 9}, {'Name': 'CardName_B10', 'Rack': 'CardNo_B10', 'Label': 'B', 'idx': 10}, {'Name': 'CardName_C01', 'Rack': 'CardNo_C01', 'Label': 'C', 'idx': 1}, {'Name': 'CardName_C02', 'Rack': 'CardNo_C02', 'Label': 'C', 'idx': 2}, {'Name': 'CardName_C03', 'Rack':'CardNo_C03', 'Label': 'C', 'idx': 3}, {'Name': 'CardName_C04', 'Rack': 'CardNo_C04', 'Label': 'C', 'idx': 4}, {'Name': 'CardName_C05', 'Rack': 'CardNo_C05', 'Label': 'C', 'idx': 5}, {'Name': 'CardName_C06', 'Rack': 'CardNo_C06', 'Label': 'C', 'idx': 6}, {'Name': 'CardName_C07', 'Rack': 'CardNo_C07', 'Label': 'C', 'idx': 7}, {'Name': 'CardName_C08', 'Rack':'CardNo_C08', 'Label': 'C', 'idx': 8}, {'Name': 'CardName_C09', 'Rack': 'CardNo_C09', 'Label': 'C', 'idx': 9}, {'Name': 'CardName_C10', 'Rack': 'CardNo_C10', 'Label': 'C', 'idx': 10}, {'Name': 'CardName_D01', 'Rack': 'CardNo_D01', 'Label': 'D', 'idx': 1}, {'Name': 'CardName_D02', 'Rack': 'CardNo_D02', 'Label': 'D', 'idx': 2}, {'Name': 'CardName_D03', 'Rack':'CardNo_D03', 'Label': 'D', 'idx': 3}, {'Name': 'CardName_D04', 'Rack': 'CardNo_D04', 'Label': 'D', 'idx': 4}, {'Name': 'CardName_D05', 'Rack': 'CardNo_D05', 'Label': 'D', 'idx': 5}, {'Name': 'CardName_D06', 'Rack': 'CardNo_D06', 'Label': 'D', 'idx': 6}, {'Name': 'CardName_D07', 'Rack': 'CardNo_D07', 'Label': 'D', 'idx': 7}, {'Name': 'CardName_D08', 'Rack':'CardNo_D08', 'Label': 'D', 'idx': 8}, {'Name': 'CardName_D09', 'Rack': 'CardNo_D09', 'Label': 'D', 'idx': 9}, {'Name': 'CardName_D10', 'Rack': 'CardNo_D10', 'Label': 'D', 'idx': 10}, {'Name': 'CardName_E01', 'Rack': 'CardNo_E01', 'Label': 'E', 'idx': 1}, {'Name': 'CardName_E02', 'Rack': 'CardNo_E02', 'Label': 'E', 'idx': 2}, {'Name': 'CardName_E03', 'Rack':'CardNo_E03', 'Label': 'E', 'idx': 3}, {'Name': 'CardName_E04', 'Rack': 'CardNo_E04', 'Label': 'E', 'idx': 4} ]"></div> <ma-get-point-value point-xid="XID_cardControllerLastRack" point="LastRackSelect"></ma-get-point-value> <div ng-init="pointName.Rack = LastRackSelect.value"></div> <ma-point-query query="{$and: true,name:pointName.Rack,deviceName: 'RackAccessSystem'}" sort="'name'" points="points"></ma-point-query> <ma-point-query query="{$and: true,name:pointName.Name,deviceName: 'RackAccessSystem'}" sort="'name'" points="names"></ma-point-query> <ma-get-point-value points="points"></ma-get-point-value> <ma-get-point-value points="names"></ma-get-point-value> <form layout-gt-sm="row" name="Form"> <md-input-container flex="" id="cardedit"> <label>select Item</label> <md-select class="select-block" ng-model="pointName" ng-change="LastRackSelect.setValue(pointName)" ng-model-options="{getterSetter:true}"> <md-option ng-repeat="Rack in rackList" ng-value="Rack">{{Rack.Name | limitTo:3:9}}</md-option> </md-select> </md-input-container> </form>
I want to save select
pointName
object to save in datapointXID_cardControllerLastRack
when nexttime into this page can loadXID_cardControllerLastRack
value to use default select ng-model -
Data Point Value
A question about Point Value type,
How to save object type likenewValue = {"Name":"CardName_A02","Rack":"CardNo_A02","Label":"A","idx":2}
into datapoint ?
I use
Point.setValue(newValue)
but in Point's value is null
How do I do to save object type value in datapoint? -
RE: Point variable use index
thank you
use $sce can show inside component<ma-get-point-value point-xid="DP_001_Meter_kWh" point="c001_Meter_kWh"></ma-get-point-value>
but can't use bind
{{c001_Meter_kWh.value}}
in other side to see value
how to fix it? -
RE: Point variable use index
I got new idea
use component
app.component("pointCom", { bindings: { point: "<", qty: "@", min: "@", max: "@" }, controller: dataController, controllerAs: "dc", template:` <span>Render</span> <div ng-bind-html="dc.sour"> </div> ` }); dataController.$inject = ["$scope"] function dataController($scope){ let dc = this let P = dc.point let Q = dc.qty let min = dc.min let max = dc.max let num = 0 this.$onChanges = function() { let p = dc.point dc.sour = '' max = dc.max num = dc.min console.log(school) if (max !== undefined){ Q = max } else { Q = dc.qty } if (p !== undefined){ for (let i=0; i < Q; i++){ num = Number(num) num = num.pad(3) dc.sour += ` <ma-get-point-value point-xid="DP_${num}_Meter_kWh" point="c${num}_Meter_kWh"></ma-get-point-value> <ma-get-point-value point-xid="DP_${num}_Meter_V" point="c${num}_Meter_V"></ma-get-point-value> <ma-get-point-value point-xid="DP_${num}_Meter_A" point="c${num}_Meter_A"></ma-get-point-value> ` num++ } console.log(dc.sour) angular.element(dc.sour) } } Number.prototype.pad = function(size) { let s = String(this) while (s.length < (size || 2)) {s = "0" + s;} return s } }
but in the html dom
<ma-get-point-value>
just dispear like this pic
how do I fix it?in console.log can see dc.sour
<ma-get-point-value point-xid="DP_001_Meter_kWh" point="c001_Meter_kWh"></ma-get-point-value> <ma-get-point-value point-xid="DP_001_Meter_V" point="c001_Meter_V"></ma-get-point-value> <ma-get-point-value point-xid="DP_001_Meter_A" point="c001_Meter_A"></ma-get-point-value>