aequitas / python-rflink

MIT License
30 stars 27 forks source link

Quicker command sending #59

Closed hunhejj closed 3 years ago

hunhejj commented 3 years ago

I would like to just send out a command inside a bash script.

However it takes quite long with the current script as it first configures the connection to the device and waits for all the responses before it even starts sending. Is there a quicker way to achieve this if I am not interested in the response or assume that the baudrate, etc. are set already?

aequitas commented 3 years ago

You could try to use unacked sends by removing the _ack here: https://github.com/aequitas/python-rflink/blob/master/rflink/__main__.py#L104 But then you will have no confirmation the command went successful. The connection always has to be configured, so either you need to have an instance running and send it the commands to skip that step.

hunhejj commented 3 years ago

Thanks for the suggestion of unacked sending!

However I am unsure about the second part. How can I "send commands to a running instance" @aequitas?

aequitas commented 3 years ago

There currently is no implementation for that but you can try to build something of your own. This project was created as a library for Homeassistant rflink component, the command line tools that are included are more for testing and debugging than for actual use.