Additional Examples


Assigning an Interface Block

The glp/0/T6tWyga/rq/dev/modbus/amik_rtu/if/block/1 topic addresses a particular modbus amik_rtu interface block 1. This request topic accepts assignment of a complete or a partial amik_rtu modbus interface block.

The following shorthand notation illustrates the assignments of a partial object to this topic, affecting only the monitor rate value.

'{"Volts_1":{"monitor":{"rate":20}}}'


Monitor rate value gives the periodic updates to monitoring service. We can set the monitoring rate property value in multiple ways.

The following examples all yield the same result: 

Topics:

glp/0/T6tWyga/rq/dev/modbus/amik_rtu/if/block/1 -m '{"Volts_1":{"monitor":{"rate":20}}}'
glp/0/T6tWyga/rq/dev/modbus/amik_rtu/if/block/1/Volts_1 -m '{"monitor":{"rate":20}}'
glp/0/T6tWyga/rq/dev/modbus/amik_rtu/if/block/1/Volts_1/monitor -m '{"rate":20}'
glp/0/T6tWyga/rq/dev/modbus/amik_rtu/if/block/1/Volts_1/monitor/rate -m '20'


Changing Property Value of Monitor Rate

The following examples changes the property value of monitor rate.  The response shows the updated monitor rate value.

mosquitto_pub -t glp/0/T6tWyga/rq/dev/modbus/amik_rtu/if/block/1 -m '{"Volts_1":{"monitor":{"rate":20}}}'

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":150,"monitor":{"rate":20,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":150}}},"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 07:18:14.000 UTC"}


mosquitto_pub -t glp/0/T6tWyga/rq/dev/modbus/amik_rtu/if/block/1/Volts_1 -m '{"monitor":{"rate":30}}'

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":150,"monitor":{"rate":30,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":150}}},"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 07:19:05.000 UTC"}


mosquitto_pub -t glp/0/T6tWyga/rq/dev/modbus/amik_rtu/if/block/1/Volts_1/monitor -m '{"rate":40}'

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":150,"monitor":{"rate":40,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":150}}},"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 07:21:34.000 UTC"}


mosquitto_pub -t glp/0/T6tWyga/rq/dev/modbus/amik_rtu/if/block/1/Volts_1/monitor/rate -m '50'

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":150,"monitor":{"rate":50,"cat":"data","inFeedback":true,"report":"change","throttle":0},"values":{"level":17,"levels":{"17":150}}},"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 07:22:11.000 UTC"}