def send_shelve_request(whid, ids, action, duration, messages):
	
	"""
	Creates a alarm shelve request to send to the web socket from a button in SCADA.
	
	Args:
		ids = List of strings. Unique material handling equipment ids.
		request = String Type of request i.e Start, Stop, Reset.			  
	Returns:
		N/A
	"""
	"""{"action": "shelve", "parameters": {"sourceId": "PLC01", "siteId": "DNG2", "durationMinutes": 2,
	shelvedTime:""}}"""
	messages_to_send = {}
	message_list = []
	for i,j in enumerate(ids):
		parameters = {}
		message_payload = {}
		parameters["sourceId"] = j
		parameters["siteId"] = whid
		parameters["id"] = messages[i]
		if action == "shelve":
			parameters["durationMinutes"] = duration
			time_now = system.date.now()
			parameters["shelvedTime"] = (system.date.toMillis(time_now)/1000)
		message_payload["parameters"] = parameters
		message_payload["action"] = action
		message_list.append(message_payload)
	messages_to_send["message_list"] = message_list
	message_send_tag_path = "[%s_SCADA_TAG_PROVIDER]System/wbsckt_messages_send" % (whid)
	system.tag.writeBlocking([message_send_tag_path],[system.util.jsonEncode(messages_to_send)])
