jdiazbb / rfxcmd

Automatically exported from code.google.com/p/rfxcmd
1 stars 0 forks source link

Make rfxcmd easier to use as library #4

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Besides using rfxcmd as a command line tool, I'd like to use it as a library 
from other programs (such as a web application). Since I'm currently only 
interesting in sending commands (turn on/off lights, blinds), I would like to 
be able to import rfxcmd and call the send command.

I think what is needed is at least something like this:

if __name__ == "__main__":
    main()

Next to that it would be nice if the commands would be implemented as methods.

If you need help with this, let me know (although I'm a python newbie).

Original issue reported on code.google.com by marce...@gmail.com on 16 Oct 2012 at 10:06

GoogleCodeExporter commented 8 years ago
Hi,

The idea is good, but at this moment there are still sensors and other stuff 
that needs to be added. I keep this issue active for the moment.

Original comment by sebastia...@gmail.com on 3 Nov 2012 at 9:06

GoogleCodeExporter commented 8 years ago
I second that, I'm looking at using CherryPy for presenting my sensors and 
controlling lights. It would be nice to just import rfxcmd. In addition to the 
if main stuff I think the whole rfxcmd design needs to be changed a bit so that 
the function that parses messages have the option to return the parsed value in 
addition to printing it out or adding it to the database etc.

I will use parts of your code for testing my CherryPy ideas for now (adhering 
to GPL ofc) with the hope of using rfxcmd as a lib in the future.

Original comment by fred...@kensander.se on 28 Jan 2013 at 7:55

GoogleCodeExporter commented 8 years ago
Yes, the rfxcmd 0.2x version is not really up to the task. But I am working to 
make it easier to use as a library on the 0.3, it might still be some road to 
go, but if you are interested to take a look then check the latest version in 
the trunk. 

Thanks for the input, and feedback is always welcomed.

Original comment by sebastia...@gmail.com on 28 Jan 2013 at 8:23

GoogleCodeExporter commented 8 years ago

Original comment by sebastia...@gmail.com on 17 Mar 2013 at 9:03

GoogleCodeExporter commented 8 years ago
This has now been improved in 0.3 and it is released as alpha-1 release. Can be 
found here: http://rfxcmd.googlecode.com/files/rfxcmd-v03-alpha1.zip

It might not be perfect, but it is better than before.

Original comment by sebastia...@gmail.com on 18 May 2013 at 12:43