/// <summary> /// Sends command to device and returns answer /// </summary> protected async Task <JsonElement> ExecuteAsync(string system, string command, object argument = null, object value = null) { var message = new SmartHomeProtocolMessage(system, command, argument, value); return(await MessageCache.Request(message, Hostname, Port)); }
public override dynamic Request(SmartHomeProtocolMessage message, string hostname, int port = 9999) { return(message.Execute(hostname, port)); }
protected dynamic Execute(string system, string command, string argument = null, object value = null, List <string> childIdS = null) { var message = new SmartHomeProtocolMessage(system, command, argument, value, childIdS); return(MessageCache.Request(message, Hostname, Port)); }
public abstract dynamic Request(SmartHomeProtocolMessage message, string hostname, int port = 9999);
protected internal async Task <dynamic> Execute(string json) { var message = new SmartHomeProtocolMessage(json); return(await MessageCache.Request(message, Hostname, Port)); }
/// <summary> /// Sends command to device and returns answer /// </summary> protected internal async Task <dynamic> Execute(string system, string command, object argument = null, object value = null) { var message = new SmartHomeProtocolMessage(system, command, argument, value); return(await MessageCache.Request(message, Hostname, Port).ConfigureAwait(false)); }