コード例 #1
0
        public ActionResult SendCommand(bool state)
        {
            MqttHelper mqttHelper = new MqttHelper("", "asd");

            mqttHelper.SendCommand(state ? Commands.Start1 : Commands.Stop1);
            return(Json("chamara", JsonRequestBehavior.AllowGet));
        }
コード例 #2
0
        public ActionResult SendCommand(bool state, string message, string topic, string ipAddress)
        {
            MqttHelper mqttHelper = new MqttHelper(ipAddress, topic);

            mqttHelper.SendCommand(state?Commands.Start1:Commands.Stop1);
            return(Json("chamara", JsonRequestBehavior.AllowGet));
        }