Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X
when i build thingworx, i want to create services or subscriptions such as alerts, sound notifications or SNS.
Now i'm using postgre and the queryHistoryproperties at about one minute intervals using timer subscriptions.
At this time, when i configure the grid widget, i want to extract only certain values.
I would appreciate it if you could provide us with a link or video of the tutorial to notify you.
Or i would like to hear your advice on these method.
Thank you
i want if value more than 70, make some alert
i waiting your advice, Thank you~
Hi seonho Cha,
First we create alert then subscribe to this alert to send notifications. Check Alert topic for more details: PTC
Here is the link to sound widget to create a sound: AudioPlayerWidget.zip
it does not help much, but thank you
Could you please explain which part is not clear? Maybe I didn't understand your query; can you please explain your query with more details.
i use this query
-----------------------------------------------------------
SELECT
cdma_number,
kst_datetime,
version,
message_type,
serial_number,
utc_date,
utc_time,
interval_seconds,
repeat_times,
latitude,
north_south,
longitude,
east_west,
altitude,
speed,
weight_axle,
weight_sensor,
test_sensor,
weight_total
FROM load_data_tab
WHERE cdma_number = [[cdma_no]]
and kst_datetime > [[datetime]];
-----------------------------------------------------------
so i can take out data from DB
and using this subscription
-----------------------------------------------------------
for (var i=0;i<truckData.getRowCount();i++) {
var item = truckData.getRow(i);
var location = new Object();
location.latitude = item.latitude/100;
location.longitude = item.longitude/100;
location.elevation = 0;
location.units ="WGS84";
var params = {
propertyName: "GPS" /* STRING */,
value: location /* LOCATION */,
timestamp: item.kst_datetime /* DATETIME */ //postgre 측정시간을 가져오는듯 하다
};
me.AddLocationValueStreamEntry(params);
var params = {
propertyName: "Speed" /* STRING */,
value:item.speed /* INTEGER */,
timestamp: item.kst_datetime /* DATETIME */
};
me.AddIntegerValueStreamEntry(params);
var params = {
propertyName: "Weight" /* STRING */,
value: item.weight_total /* NUMBER */,
timestamp: item.kst_datetime /* DATETIME */
};
me.AddNumberValueStreamEntry(params);
}
-----------------------------------------------------------
and i binding like this
i use DynamicThing TestTemplates, and get real time data with QueryPropertyHistory
속도 mean is speed so i want when 속도(speed) more than 70
i want make alert , could you help me?
thank your comment.