Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using rf control plugin along with relay board
#4
As the description of the plugin says it has been in a testing (beta) stage. It was written for a user who was setting up some stations that he wanted to control wirelessly. He had 2 types of commands he could send to the remote stations and the plugin code was set up to handle both but not at the same time.

I have been planning to split the plugin into 2 separate plugins. One for HTTP commands and the other for cli commands. There is some code in the current version that is commented out and needs to be activated in order to use HTTP commands.

The way it works is:
SIP issues a signal when a station is turned on or off. Plugins can "subscribe" to the signal and when the signal is received a function is triggered. The rf_control plugin runs a function called "on_zone_change()" which figures out which station changed and outputs the corresponding command to control the remote station. The commands are stored in a Python list and are accessed by their position in the list (index).

So, to answer your question, you will need to keep dummy commands in the list for the stations controlled by the relay_board plugin.

However I think there will also need to be some changes to the plugin in order to skip the stations controlled by the relay_board plugin. It would be good to have a defined place-holder in the command list that would be skipped by the plugin when that station is controlled some other way. Looking at the code it doesn't look like it has everything it needs to send GET commands.

Let me work on this. It should be fairly easy (famous last words). I'll try to put something together within the next day tor two.

Dan
Reply


Messages In This Thread
RE: Using rf control plugin along with relay board - by dan - 2017 Jul 14, 01:59 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)