Stopping a program - Printable Version +- SIP (https://nosack.com/sipforum) +-- Forum: SIP (Sustainable Irrigation Platform) (https://nosack.com/sipforum/forumdisplay.php?fid=1) +--- Forum: Plugin questions (https://nosack.com/sipforum/forumdisplay.php?fid=6) +--- Thread: Stopping a program (/showthread.php?tid=198) |
Stopping a program - karlkec - 2019 Dec 23 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:
Code: Unhandled exception in thread started by <function timing_loop at 0x7670d7c8> Thanks a lot for all the work you've all put into this system. I look forward to putting it to use. Karl RE: Stopping a program - dan - 2019 Dec 23 Hi Karl, To answer your questions: 1. The http GET interface is a valid way to control SIP. You should also be able to change variables from a plugin. See the gv_reference.txt file in the SIP folder for a list with descriptions of SIP's variables. 2. A password is only required if password in enabled on the Options page. SIP's password feature provides very minimal security and can be left disabled without a problem. It is only useful for keeping e.g. children from accessing the system. If password in enabled you would need to provide it as plain text in the GET command. 3. The GET command for stopping a program would be /cv?rsn=1 It has the effect of clicking the "stop all stations" button on the home page in auto mode but works in manual mode also. It can be found under "Change controller values" Thanks for reporting the exception. I pushed a fix for the error you reported to GitHub. Good luck with your project. Dan RE: Stopping a program - karlkec - 2019 Dec 23 (2019 Dec 23, 07:40 PM)dan Wrote: 1. The http GET interface is a valid way to control SIP. You should also be able to change variables from a plugin.Dan, Thanks for the reply. I am reading some of the gv values, but was hesitant to freely change gv values out of concern for race conditions or other possible problems. My plugin uses a separate thread to monitor hardware switches, and actions happen from that thread. Are there some gv values that should't be changed from a plugin, or should only be done using locks? Karl RE: Stopping a program - dan - 2019 Dec 23 I can't think of any restrictions on changing GV values from a plugin. And for sure any that can be changed with a GET command would not be a problem. Dan |