Example for Set Datapoint and Get Datapoint Value Control

Get datapoint value control uses "Get service" to retrieves one or more datapoint values and returns their current values as obtained from the edge device rather than relying on a “last known good” value stored somewhere.

This example shows the setting of datapoint value control (Write Request) and Get datapoint value control (Read Request).

The sequence of operations is as follows and as described on this page:

  1. Modbus device creation and provisioning
  2. Write request (Set datapoint value)
  3. Read Request (Get datapoint value using Get service)


1. Modbus Device Creation and Provisioning

To perform get/set datapoint operation device needs to be provision. After successful provisioning device is fully operational and we can get/set datapoint values.

Request: Modbus Create

mosquitto_pub -t glp/0/T6tWyga/rq/dev/modbus/amik_rtu/do -m '{"action":"create","args":{"unid":"01:1","type":"9FF4A2150040DB00"}}'
mosquitto_pub -t glp/0/T6tWyga/rq/dev/modbus/amik_rtu/cfg -m '{"name":"rv-test-cfg","desc":"description","loc":{"desc":"","lat":27.68353,"lng":76.64063,"ele":null}}'


Response: Modbus Create

glp_mqtt_publish MQTT Publishing, time: 1552976570 sec
Topic: glp/0/T6tWyga/fb/dev/modbus/amik_rtu/sts
Data: {"state":"unprovisioned","unid":"01:1","health":"normal","cat":"i/o","type":"9FF4A2150040DB00","interfaceType":"static","usage":"controller","version":"AMIK 201 Series Digital Power M","product":"AMIK201RTU","manufacturer":"Simpson Electric","mru":"2019-03-19 06:22:50.000 UTC"}


Request: Provisioning
mosquitto_pub -t glp/0/T6tWyga/rq/dev/modbus/amik_rtu/do -m '{"action":"provision"}'


Response: Provisioning
Response: Provisioning
Type objects:
Topic: glp/0/T6tWyga/fb/res/type/blk.9FF4A2150040DB00/1 
Data: {"id":1,"name":"blk","class":"profile","datapoint":{"Volts_1":{"id":"Volts_1","mandatory":true,"type":"0000000000000000-0/SNVT_volt_f","direction":"output","service":"any"},"Freq":{"id":"Freq","mandatory":true,"type":"0000000000000000-0/SNVT_freq_f","direction":"output","service":"any"}}}

Topic: glp/0/T6tWyga/fb/res/type/blk.9FF4A2150040DB00/2 
Data: {"id":2,"name":"blk","class":"profile","datapoint":{"Volts_2":{"id":"Volts_2","mandatory":true,"type":"0000000000000000-0/SNVT_volt_f","direction":"output","service":"any"},"Volts_3":{"id":"Volts_3","mandatory":true,"type":"0000000000000000-0/SNVT_volt_f","direction":"output","service":"any"},"Current_1":{"id":"Current_1","mandatory":true,"type":"0000000000000000-0/SNVT_amp_f","direction":"output","service":"any"},"Current_2":{"id":"Current_2","mandatory":true,"type":"0000000000000000-0/SNVT_amp_f","direction":"output","service":"any"},"Current_3":{"id":"Current_3","mandatory":true,"type":"0000000000000000-0/SNVT_amp_f","direction":"output","service":"any"},"W1":{"id":"W1","mandatory":true,"type":"0000000000000000-0/SNVT_power_f","direction":"output","service":"any"},"W2":{"id":"W2","mandatory":true,"type":"0000000000000000-0/SNVT_power_f","direction":"output","service":"any"},"W3":{"id":"W3","mandatory":true,"type":"0000000000000000-0/SNVT_power_f","direction":"output","service":"any"},"VA1":{"id":"VA1","mandatory":true,"type":"0000000000000000-0/SNVT_power_f","direction":"output","service":"any"},"VA2":{"id":"VA2","mandatory":true,"type":"0000000000000000-0/SNVT_power_f","direction":"output","service":"any"},"VA3":{"id":"VA3","mandatory":true,"type":"0000000000000000-0/SNVT_power_f","direction":"output","service":"any"},"VAR1":{"id":"VAR1","mandatory":true,"type":"0000000000000000-0/SNVT_power_f","direction":"output","service":"any"},"VAR2":{"id":"VAR2","mandatory":true,"type":"0000000000000000-0/SNVT_power_f","direction":"output","service":"any"},"VAR3":{"id":"VAR3","mandatory":true,"type":"0000000000000000-0/SNVT_power_f","direction":"output","service":"any"},"PF1":{"id":"PF1","mandatory":true,"type":"0000000000000000-0/SNVT_pwr_fac","direction":"output","service":"any"},"PF2":{"id":"PF2","mandatory":true,"type":"0000000000000000-0/SNVT_pwr_fac","direction":"output","service":"any"},"PF3":{"id":"PF3","mandatory":true,"type":"0000000000000000-0/SNVT_pwr_fac","direction":"output","service":"any"},"Volts_Ave":{"id":"Volts_Ave","mandatory":true,"type":"0000000000000000-0/SNVT_volt_f","direction":"output","service":"any"},"Volts_Sum":{"id":"Volts_Sum","mandatory":true,"type":"0000000000000000-0/SNVT_volt_f","direction":"output","service":"any"},"Current_Ave":{"id":"Current_Ave","mandatory":true,"type":"0000000000000000-0/SNVT_amp_f","direction":"output","service":"any"},"Current_Sum":{"id":"Current_Sum","mandatory":true,"type":"0000000000000000-0/SNVT_amp_f","direction":"output","service":"any"},"Watts_Ave":{"id":"Watts_Ave","mandatory":true,"type":"0000000000000000-0/SNVT_power_f","direction":"output","service":"any"},"Watts_Sum":{"id":"Watts_Sum","mandatory":true,"type":"0000000000000000-0/SNVT_power_f","direction":"output","service":"any"},"VA_Ave":{"id":"VA_Ave","mandatory":true,"type":"0000000000000000-0/SNVT_power_f","direction":"output","service":"any"},"VA_Sum":{"id":"VA_Sum","mandatory":true,"type":"0000000000000000-0/SNVT_power_f","direction":"output","service":"any"},"VAr_Ave":{"id":"VAr_Ave","mandatory":true,"type":"0000000000000000-0/SNVT_power_f","direction":"output","service":"any"},"VAr_Sum":{"id":"VAr_Sum","mandatory":true,"type":"0000000000000000-0/SNVT_power_f","direction":"output","service":"any"},"PF_Ave":{"id":"PF_Ave","mandatory":true,"type":"0000000000000000-0/SNVT_pwr_fac","direction":"output","service":"any"},"PF_Sum":{"id":"PF_Sum","mandatory":true,"type":"0000000000000000-0/SNVT_pwr_fac","direction":"output","service":"any"},"Phase_Angle_1":{"id":"Phase_Angle_1","mandatory":true,"type":"0000000000000000-0/SNVT_angle_f","direction":"output","service":"any"},"Phase_Angle_2":{"id":"Phase_Angle_2","mandatory":true,"type":"0000000000000000-0/SNVT_angle_f","direction":"output","service":"any"},"Phase_Angle_3":{"id":"Phase_Angle_3","mandatory":true,"type":"0000000000000000-0/SNVT_angle_f","direction":"output","service":"any"},"Phase_Angle_Ave":{"id":"Phase_Angle_Ave","mandatory":true,"type":"0000000000000000-0/SNVT_angle_f","direction":"output","service":"any"},"Phase_Angle_Sum":{"id":"Phase_Angle_Sum","mandatory":true,"type":"0000000000000000-0/SNVT_angle_f","direction":"output","service":"any"},"Wh_Import":{"id":"Wh_Import","mandatory":true,"type":"0000000000000000-0/SNVT_elec_wh","direction":"output","service":"any"},"Wh_Export":{"id":"Wh_Export","mandatory":true,"type":"0000000000000000-0/SNVT_elec_wh","direction":"output","service":"any"},"VARh_Import":{"id":"VARh_Import","mandatory":true,"type":"0000000000000000-0/SNVT_elec_wh","direction":"output","service":"any"},"VARh_Export":{"id":"VARh_Export","mandatory":true,"type":"0000000000000000-0/SNVT_elec_wh","direction":"output","service":"any"},"VAh":{"id":"VAh","mandatory":true,"type":"0000000000000000-0/SNVT_elec_wh","direction":"output","service":"any"},"W_Demand_(Import)":{"id":"W_Demand_(Import)","mandatory":true,"type":"0000000000000000-0/SNVT_power_f","direction":"output","service":"any"},"W_Max_Demand_(Import)":{"id":"W_Max_Demand_(Import)","mandatory":true,"type":"0000000000000000-0/SNVT_power_f","direction":"output","service":"any"},"W_Demand_(Export)":{"id":"W_Demand_(Export)","mandatory":true,"type":"0000000000000000-0/SNVT_power_f","direction":"output","service":"any"},"W_Max_Demand_(Export)":{"id":"W_Max_Demand_(Export)","mandatory":true,"type":"0000000000000000-0/SNVT_power_f","direction":"output","service":"any"},"VA_Demand":{"id":"VA_Demand","mandatory":true,"type":"0000000000000000-0/SNVT_power_f","direction":"output","service":"any"},"VA_Max_Demand":{"id":"VA_Max_Demand","mandatory":true,"type":"0000000000000000-0/SNVT_power_f","direction":"output","service":"any"},"A_Demand":{"id":"A_Demand","mandatory":true,"type":"0000000000000000-0/SNVT_amp_f","direction":"output","service":"any"},"A_Max_Demand":{"id":"A_Max_Demand","mandatory":true,"type":"0000000000000000-0/SNVT_amp_f","direction":"output","service":"any"},"Volts_Ave_Max":{"id":"Volts_Ave_Max","mandatory":true,"type":"0000000000000000-0/SNVT_volt_f","direction":"output","service":"any"},"Volts_Ave_Min":{"id":"Volts_Ave_Min","mandatory":true,"type":"0000000000000000-0/SNVT_volt_f","direction":"output","service":"any"},"Current_Ave_Max":{"id":"Current_Ave_Max","mandatory":true,"type":"0000000000000000-0/SNVT_amp_f","direction":"output","service":"any"},"Current_Ave_Min":{"id":"Current_Ave_Min","mandatory":true,"type":"0000000000000000-0/SNVT_amp_f","direction":"output","service":"any"},"VL1-2_(Calculated)":{"id":"VL1-2_(Calculated)","mandatory":true,"type":"0000000000000000-0/SNVT_volt_f","direction":"output","service":"any"},"VL2-3_(Calculated)":{"id":"VL2-3_(Calculated)","mandatory":true,"type":"0000000000000000-0/SNVT_volt_f","direction":"output","service":"any"},"VL3-1_(Calculated)":{"id":"VL3-1_(Calculated)","mandatory":true,"type":"0000000000000000-0/SNVT_volt_f","direction":"output","service":"any"},"Run_Hour":{"id":"Run_Hour","mandatory":true,"type":"0000000000000000-0/SNVT_time_f","direction":"output","service":"any"},"On_Hour":{"id":"On_Hour","mandatory":true,"type":"0000000000000000-0/SNVT_time_f","direction":"output","service":"any"},"No._Of_Interrupts":{"id":"No._Of_Interrupts","mandatory":true,"type":"0000000000000000-0/SNVT_count_i","direction":"output","service":"any"}}}

Topic: glp/0/T6tWyga/fb/res/type/blk.9FF4A2150040DB00/3 
Data: {"id":3,"name":"blk","class":"profile","datapoint":{"Demand_Reset":{"id":"Demand_Reset","mandatory":true,"type":"0000000000000000-0/SNVT_switch","direction":"output","service":"any"},"Demand_Period":{"id":"Demand_Period","mandatory":true,"type":"0000000000000000-0/SNVT_time_mi","direction":"output","service":"any"},"Energy_display_on_modbus":{"id":"Energy_display_on_modbus","mandatory":true,"type":"0000000000000000-0/SNVT_count_f","direction":"output","service":"any"}}}

Topic: glp/0/T6tWyga/fb/res/type/blk.9FF4A2150040DB00/4 
Data: {"id":4,"name":"blk","class":"profile","datapoint":{"Sys_Voltage":{"id":"Sys_Voltage","mandatory":true,"type":"0000000000000000-0/SNVT_volt_f","direction":"output","service":"any"},"Sys_Current":{"id":"Sys_Current","mandatory":true,"type":"0000000000000000-0/SNVT_amp_f","direction":"output","service":"any"},"Sys_Type":{"id":"Sys_Type","mandatory":true,"type":"0000000000000000-0/SNVT_count_f","direction":"output","service":"any"},"Pulse_Width":{"id":"Pulse_Width","mandatory":true,"type":"0000000000000000-0/SNVT_count_f","direction":"output","service":"any"},"Energy_Reset":{"id":"Energy_Reset","mandatory":true,"type":"0000000000000000-0/SNVT_switch","direction":"output","service":"any"},"Run/On_Hour_&_Interruption_Reset":{"id":"Run/On_Hour_&_Interruption_Reset","mandatory":true,"type":"0000000000000000-0/SNVT_switch","direction":"output","service":"any"},"RS_485_Set-up_Code":{"id":"RS_485_Set-up_Code","mandatory":true,"type":"0000000000000000-0/SNVT_count_f","direction":"output","service":"any"},"Node_Address.":{"id":"Node_Address.","mandatory":true,"type":"0000000000000000-0/SNVT_count_f","direction":"output","service":"any"},"Pulse_Divisor":{"id":"Pulse_Divisor","mandatory":true,"type":"0000000000000000-0/SNVT_count_f","direction":"output","service":"any"},"Min_Reset":{"id":"Min_Reset","mandatory":true,"type":"0000000000000000-0/SNVT_count_f","direction":"output","service":"any"},"Max_Reset":{"id":"Max_Reset","mandatory":true,"type":"0000000000000000-0/SNVT_count_f","direction":"output","service":"any"},"PT_Primary":{"id":"PT_Primary","mandatory":true,"type":"0000000000000000-0/SNVT_count_f","direction":"output","service":"any"},"CT_Primary":{"id":"CT_Primary","mandatory":true,"type":"0000000000000000-0/SNVT_count_f","direction":"output","service":"any"},"System_Power":{"id":"System_Power","mandatory":true,"type":"0000000000000000-0/SNVT_power_f","direction":"output","service":"any"},"Energy_Digit_reset_count":{"id":"Energy_Digit_reset_count","mandatory":true,"type":"0000000000000000-0/SNVT_count_i","direction":"output","service":"any"},"Register_Order/Word_Order":{"id":"Register_Order/Word_Order","mandatory":true,"type":"0000000000000000-0/SNVT_switch","direction":"output","service":"any"},"CT_Secondary":{"id":"CT_Secondary","mandatory":true,"type":"0000000000000000-0/SNVT_count_f","direction":"output","service":"any"},"PT_Secondary":{"id":"PT_Secondary","mandatory":true,"type":"0000000000000000-0/SNVT_count_f","direction":"output","service":"any"},"Relay_Output_Select":{"id":"Relay_Output_Select","mandatory":true,"type":"0000000000000000-0/SNVT_count_f","direction":"output","service":"any"},"Pulse/Limit_Paramter_Select":{"id":"Pulse/Limit_Paramter_Select","mandatory":true,"type":"0000000000000000-0/SNVT_count_f","direction":"output","service":"any"},"Limit_Trip_point":{"id":"Limit_Trip_point","mandatory":true,"type":"0000000000000000-0/SNVT_count_f","direction":"output","service":"any"},"Hysteresis":{"id":"Hysteresis","mandatory":true,"type":"0000000000000000-0/SNVT_count_f","direction":"output","service":"any"},"Limit_Delay(On)":{"id":"Limit_Delay(On)","mandatory":true,"type":"0000000000000000-0/SNVT_time_f","direction":"output","service":"any"},"Limit_Delay(Off)":{"id":"Limit_Delay(Off)","mandatory":true,"type":"0000000000000000-0/SNVT_time_f","direction":"output","service":"any"},"Password":{"id":"Password","mandatory":true,"type":"0000000000000000-0/SNVT_count_f","direction":"output","service":"any"},"Limit_Configuration_select":{"id":"Limit_Configuration_select","mandatory":true,"type":"0000000000000000-0/SNVT_count_f","direction":"output","service":"any"},"Auto_scroll":{"id":"Auto_scroll","mandatory":true,"type":"0000000000000000-0/SNVT_count_f","direction":"output","service":"any"},"30mA_Noise_Current_Elimination":{"id":"30mA_Noise_Current_Elimination","mandatory":true,"type":"0000000000000000-0/SNVT_amp_f","direction":"output","service":"any"}}}

Interface objects:
Topic: glp/0/T6tWyga/fb/dev/modbus/amik_rtu/if/block/1 
Data: {"type":"blk.9FF4A2150040DB00/1","Volts_1":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_volt_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"Freq":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_freq_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"mru":"2019-03-19 06:23:05.000 UTC"}

Topic: glp/0/T6tWyga/fb/dev/modbus/amik_rtu/if/block/2 
Data: {"type":"blk.9FF4A2150040DB00/2","Volts_2":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_volt_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"Volts_3":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_volt_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"Current_1":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_amp_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"Current_2":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_amp_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"Current_3":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_amp_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"W1":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_power_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"W2":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_power_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"W3":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_power_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"VA1":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_power_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"VA2":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_power_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"VA3":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_power_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"VAR1":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_power_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"VAR2":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_power_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"VAR3":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_power_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"PF1":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_pwr_fac","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"PF2":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_pwr_fac","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"PF3":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_pwr_fac","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"Volts_Ave":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_volt_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"Volts_Sum":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_volt_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"Current_Ave":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_amp_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"Current_Sum":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_amp_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"Watts_Ave":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_power_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"Watts_Sum":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_power_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"VA_Ave":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_power_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"VA_Sum":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_power_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"VAr_Ave":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_power_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"VAr_Sum":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_power_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"PF_Ave":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_pwr_fac","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"PF_Sum":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_pwr_fac","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"Phase_Angle_1":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_angle_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"Phase_Angle_2":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_angle_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"Phase_Angle_3":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_angle_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"Phase_Angle_Ave":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_angle_f","value":160,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":160}}},"Phase_Angle_Sum":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_angle_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"Wh_Import":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_elec_wh","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"Wh_Export":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_elec_wh","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"VARh_Import":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_elec_wh","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"VARh_Export":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_elec_wh","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"VAh":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_elec_wh","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"W_Demand_(Import)":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_power_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"W_Max_Demand_(Import)":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_power_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"W_Demand_(Export)":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_power_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"W_Max_Demand_(Export)":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_power_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"VA_Demand":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_power_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"VA_Max_Demand":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_power_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"A_Demand":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_amp_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"A_Max_Demand":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_amp_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"Volts_Ave_Max":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_volt_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"Volts_Ave_Min":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_volt_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"Current_Ave_Max":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_amp_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"Current_Ave_Min":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_amp_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"VL1-2_(Calculated)":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_volt_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"VL2-3_(Calculated)":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_volt_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"VL3-1_(Calculated)":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_volt_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"Run_Hour":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_time_f","value":170,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":170}}},"On_Hour":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_time_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"No._Of_Interrupts":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_count_i","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"mru":"2019-03-19 07:30:50.000 UTC"}


Topic: glp/0/T6tWyga/fb/dev/modbus/amik_rtu/if/block/3 
Data: {"type":"blk.9FF4A2150040DB00/3","Demand_Reset":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_switch","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"Demand_Period":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_time_mi","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"Energy_display_on_modbus":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_count_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"mru":"2019-03-19 06:58:27.000 UTC"}

Topic: glp/0/T6tWyga/fb/dev/modbus/amik_rtu/if/block/4 
Data: {"type":"blk.9FF4A2150040DB00/4","Sys_Voltage":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_volt_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"Sys_Current":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_amp_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"Sys_Type":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_count_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"Pulse_Width":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_count_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"Energy_Reset":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_switch","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"Run/On_Hour_&_Interruption_Reset":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_switch","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"RS_485_Set-up_Code":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_count_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"Node_Address.":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_count_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"Pulse_Divisor":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_count_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"Min_Reset":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_count_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"Max_Reset":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_count_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"PT_Primary":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_count_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"CT_Primary":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_count_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"System_Power":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_power_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"Energy_Digit_reset_count":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_count_i","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"Register_Order/Word_Order":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_switch","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"CT_Secondary":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_count_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"PT_Secondary":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_count_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"Relay_Output_Select":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_count_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"Pulse/Limit_Paramter_Select":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_count_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"Limit_Trip_point":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_count_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"Hysteresis":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_count_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"Limit_Delay(On)":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_time_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"Limit_Delay(Off)":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_time_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"Password":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_count_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"Limit_Configuration_select":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_count_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"Auto_scroll":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_count_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"30mA_Noise_Current_Elimination":{"cat":"out","property":false,"type":"0000000000000000-0/SNVT_amp_f","value":0,"monitor":{"rate":0,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":0}}},"mru":"2019-03-19 06:58:27.000 UTC"}


2. Write request: (Set Datapoint Value)

Set datapoint value request will be initiated by User/CMS. This request will be sent to the Modbus engine, to change the value of datapoint "Demand_Reset" which belongs to interface block number 3 of amik_rtu modbus device.


User Request
mosquitto_pub -t glp/0/T6tWyga/rq/dev/modbus/amik_rtu/if/block/3/Demand_Reset/value -m 50



Request to Control Service

The Modbus engine will send the same request to control service.

Request to Control Service
Topic: glp/0/./=control/service 
Data:
{
  "datapoint": {
    "value": 50
  },
  "request": "glp/0/T6tWyga/rq/dev/modbus/amik_rtu/if/block/3/Demand_Reset",
  "respond": "glp/0/./=engine/modbus/dvc/respond",
  "meta": "glp/0/T6tWyga/rq/dev/modbus/amik_rtu/if/block/3/Demand_Reset"
}



Response from Control Service

 Control service will update the priority level values and send the updated object to the Modbus engine.

  "datapoint": {
    "values": {
      "levels": {
        "17": 50
      },
      "inactive": {},
      "level": 17
    }
  },
  "meta": "glp/0/T6tWyga/rq/dev/modbus/amik_rtu/if/block/3/Demand_Reset"
}


Updated Values

This is the final step of setting the datapoint value. The Modbus engine will return a response on the feedback channel.

Updated Values
Topic: glp/0/T6tWyga/fb/dev/modbus/amik_rtu/if/block/3 
Data:
{
  "type": "blk.9FF4A2150040DB00/3",
  "Demand_Reset": {
    "cat": "out",
    "property": false,
    "type": "0000000000000000-0/SNVT_switch",
    "value": 50,
    "monitor": {
      "rate": 0,
      "cat": "data",
      "inFeedback": true,
      "report": "change",
      "throttle": 0
    },
    "values": {
      "level": 17,
      "inactive": {},
      "levels": {
        "17": 50
      }
    }
  },
  "Demand_Period": {
    "cat": "out",
    "property": false,
    "type": "0000000000000000-0/SNVT_time_mi",
    "value": 0,
    "monitor": {
      "rate": 0,
      "cat": "data",
      "inFeedback": true,
      "report": "change",
      "throttle": 0
    },
    "values": {
      "level": 17,
      "levels": {
        "17": 0
      }
    }
  },
  "Energy_display_on_modbus": {
    "cat": "out",
    "property": false,
    "type": "0000000000000000-0/SNVT_count_f",
    "value": 0,
    "monitor": {
      "rate": 0,
      "cat": "data",
      "inFeedback": true,
      "report": "change",
      "throttle": 0
    },
    "values": {
      "level": 17,
      "levels": {
        "17": 0
      }
    }
  },
  "mru": "2019-03-19 07:36:49.000 UTC"
}


3. Read Request (Get Datapoint Value Using Get Service)


User/CMS request for get datapoint value to Get service.

Request from user/cms to "Get" service
mosquitto_pub -t glp/0/./=get/dp/request -m '{"corr":"abcd","response":"my/responses","item":["dev/modbus/amik_rtu/if/phase/3/Demand_Reset","dev/modbus/amik_rtu/if/phase/3/Demand_Period"],"maxAge":1,"timeout":10}'


Get service will send the same request to Modbus engine.

Request from "Get" service to modbus engine

Topic : glp/0/./=engine/modbus/rq/poll/dev/modbus/amik_rtu/if/phase/3/Demand_Reset
Message : {"corr":"abcd","respond":"glp/0/./=engine/modbus/fb/poll/dev/modbus/amik_rtu/if/phase/3/Demand_Reset/3b57bd4c6346986b94c21e75aecdf2da","timeout":10}

Topic : glp/0/./=engine/modbus/rq/poll/dev/modbus/amik_rtu/if/phase/3/Demand_Period
Message : {"corr":"abcd","respond":"glp/0/./=engine/modbus/fb/poll/dev/modbus/amik_rtu/if/phase/3/Demand_Period/3b57bd4c6346986b94c21e75aecdf2da","timeout":10}


The Modbus engine will respond to the Get service with current value of that datapoint.

Response from modbus engine to "Get" service

Topic: glp/0/./=engine/modbus/fb/poll/dev/modbus/amik_rtu/if/phase/3/Demand_Reset/3b57bd4c6346986b94c21e75aecdf2da
Data: {"corr":"abcd","value":50}

Topic : glp/0/./=engine/modbus/rq/poll/dev/modbus/amik_rtu/if/phase/3/Demand_Period
Message : {"corr":"abcd","respond":"glp/0/./=engine/modbus/fb/poll/dev/modbus/amik_rtu/if/phase/3/Demand_Period/3b57bd4c6346986b94c21e75aecdf2da","timeout":10}


Get service will respond to USER/CMS on the same topic which was mentioned in the Get datapoint request object.

Response from "Get" service to user/cms

mosquitto_sub -t my/responses
{"corr":"abcd","result":[{"item":"dev/modbus/amik_rtu/if/phase/3/Demand_Reset","value":50},{"item":"dev/modbus/amik_rtu/if/phase/3/Demand_Period","value":0}]}