Une question pour envoyer des commande à un projecteur MITSUBISHI
Sur ma HC2 cela fonctionné
-----
local tcpSocket = Net.FTcpSocket("192.168.1.5", 4352);
tcpSocket:setReadTimeout(350);
tcpSocket:write("%1POWR 1");
sur ma HC3 rien ne fonctionne
---
-- Generic device type have no default actions to handle
-- Allume projecteur
function QuickApp:onInit()
self:debug("Allumage projecteur demandé")
self:allumeProjecteur()
end
function QuickApp:allumeProjecteur()
self.sock = net.TCPSocket()
self.sock:connect("192.168.1.5", 4352, {
success = function()
self:debug("Vidéo-projecteur connecté")
self:debug("Envoi commande allumage")
self:send("%1POWR 1")
self.sock:close() -- socket closed
end,
error = function(message)
self:debug("connection error:", message)
end,
})
end
function QuickApp:send(strToSend)
self:debug("data sent: "..strToSend)
self.sock:write(strToSend, {
success = function() -- the function that will be triggered when the data is correctly sent
self:debug("data sent")
end,
error = function(err) -- the function that will be triggered in the event of an error in data transmission
self:debug("error while sending data")
end
})
end
----
J'ai un retour qui me dit :
ERROR WHILE SENDING DATA
Quelqu'un peux-t-il m'aider. D'avance merci