Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Stopping a program
#1
All,
Thanks for all the great software and documentation in the SIP system.

I'm working on a local control plugin using an encoder with pushbutton, and an LCD, directly connected to the RPi. So far the plugin can show station status (which stations are on and the time-to-go), turn a station on or off (manual mode), and start a program. I plan to include the ability to display station solenoid current (using a current transformer, a bit of circuitry, and an I2C-connected A-to-D converter). I know this probably wouldn't have much appeal to people due to the amount of hardware work necessary, but it serves a purpose for me.

I have things working pretty well, and am using http GET to control the SIP system from the plugin.

I have a few questions:
  1. Is the http GET interface the recommended way to control things from a plugin?
  2. Some GET commands need a password, which requires the plugin to know the password. I see the gv module contains a password hash. Is there a way to use this from the GET interface?
  3. I'd like my plugin to be able to stop a currently-running program, but I don't see that capability in the GET command reference. Is there a way to do this?
I also encountered an unhandled exception in sip.py when I accidentally tried to turn on the master station via the http GET api. I know this isn't a valid operation, but thought I'd report it anyway. The error was:
Code:
Unhandled exception in thread started by <function timing_loop at 0x7670d7c8>
Traceback (most recent call last):
  File "sip.py", line 172, in timing_loop
    gv.srvals[masid] = 1
UnboundLocalError: local variable 'masid' referenced before assignment

Thanks a lot for all the work you've all put into this system. I look forward to putting it to use.

Karl
Reply


Messages In This Thread
Stopping a program - by karlkec - 2019 Dec 23, 07:09 PM
RE: Stopping a program - by dan - 2019 Dec 23, 07:40 PM
RE: Stopping a program - by karlkec - 2019 Dec 23, 09:13 PM
RE: Stopping a program - by dan - 2019 Dec 23, 10:29 PM

Forum Jump:


Users browsing this thread: 3 Guest(s)