I own a home automation system “MyHome” legrand / bticino. It is possible to control the system through a USB interface. The protocol is open. When I plug the interface on the Vera, she is recognized as a serial port (FTDI). So far so good.
My wish is to create virtual device to control my system myhome. In a second time with the state feedback.
I’ve looked around the wiki, but I do not know where to start. I’m starting with vera.
Thank you for your help.
nobody has an idea to help me? I try already to just send an ASCII string to the serial port, but I happen or not.
I use the command "send () ", I have an XML error. I use luup test
You can test it with luup.call_action in Test Lua Code, or you can use the plugin’s interface.
I replace lul_data by my frame ascii and lul_device by the module number
Correct. However, the plugin appends \r\n (crlf) automatically at the end of the frame, so if your device doesn’t like this, you can change it in I_SimpleSerial.xml:
If the serial port is recognized then it should work. What message did you receive after you sent the packet? (you have to leave the current tab, then enter again for the Received variable to update the value)
Yes, unfortunately the line ending is not specified, so I assume that it’s CR-LF. That plugin is not the best way to test if the serial connection works, for this I recommend looking in LuaUPnP.log for lines starting with 51 and 52.
Lines starting with 51 are the sent messages, and lines starting with 52 are the received messages. Look here to find how to view the logs: http://wiki.micasaverde.com/index.php/Logs
You must enable Verbose Logging first with the following command:
[tt]VerboseLogging enable[/tt]
And disable it after finishing:
[tt]VerboseLogging disable[/tt]