Lutron send command - Printable Version +- Logic Machine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8) +--- Thread: Lutron send command (/showthread.php?tid=5446) |
Lutron send command - Hadeel - 31.05.2024 Hi! I have a project with Lutron integration and I follwed the thread below to setup LM. https://forum.logicmachine.net/showthread.php?tid=414&highlight=lutron While LM successfully works as listener and I can see everry log from Lutron device and button, any Lutron command that I send does not seem to be reaching and nothing will be shown in the log. My event script is pretty simple as below. (I have lutron user script and resident script as shown in the forum thread above) Code: require('user.lutron') Other things that I tried; ・I used ping command of LM network utility and checked if LM can reach Lutron interface and it was successfull. ・I confirmed lutron_login function returns response "QNET>" which proves login to the Lutron interface is successful. ・I installed telnet command on my PC (which is located in the same network as LM) and tried executing Lutron commands and it was successful. Could you think of any reason that I cannnot execute command from LM event script? RE: Lutron send command - admin - 31.05.2024 Modify lutron_login() in the user library to log the data that is sent to LM. Code: function lutron_login() Add log(lutron_receive(tcp)) at the end of your script to check the reply. RE: Lutron send command - Hadeel - 05.06.2024 Dear admin, Appreciate your advice so much, I am not sure what happened but when I added "lutron_receive(tcp)" at the end of the script everyting started to work! Thank you so much for your advice as always! RE: Lutron send command - Andrea Becagli - 16.09.2024 Hi everyone, I need to send commands e receive responses from a RA2 Select Lutron gateway. I currently use the Lutron library to log responses and errors of the TCP communication, but can not log in. This below is the output log from a event-based script. Code: Event for prova lutron cmd (1/1/1) 16.09.2024 13:36:20 I copied and pasted the library without changing anything but IP and credentials. I am sure IP and credentials are correct because I tried copying and pasting them into Putty telnet service and I have no problem sending commands to the lutron device RE: Lutron send command - admin - 16.09.2024 Try this modified function and post what you get in Logs: Code: function lutron_login() RE: Lutron send command - Andrea Becagli - 16.09.2024 (16.09.2024, 11:57)admin Wrote: Try this modified function and post what you get in Logs: So here is the log: Code: Event for prova lutron cmd (1/1/1) 16.09.2024 14:21:15 RE: Lutron send command - admin - 16.09.2024 Replace all 3 log() calls with loghex() and try/post again. RE: Lutron send command - Andrea Becagli - 16.09.2024 I now get what the problem was in the last function after the password was sent I waited for tcp:receive(9) but it only responded with 5 (GNET>)characters so it always gave back the timeout error and with res being nil the function always returned nil. Thanks admin you made me realise what the problem was Now new problem, is there a way I can avoid logging in every time I send a command? |