Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Station is scheduled but it doesn't run
#1
Hi SIP community.
I am having the following problem with the SIP library/interface:
- The SIP interface starts and it works ok for a while (very short while).
- After running some few programs (automatic or Run Once), this problem happens: a program is scheduled and appears scheduled in the home page (e.g.: Run Once 30 seconds) and stays there frozen: it doesn't start the station and it doesn't start the count down either.  See image attached.
- If the the "Stop all stations" is pressed, the station is cleaned. But not even scheduling again and again will activate the station!! 
- The only way to get the programs running again is rebooting the RPi.
- And same story: few programs run (usually less than 10 times) and then the station is frozen.

Has anyone experienced the same or similar? or may have a clue what is the issue?

Many thanks.

elongo!!


Attached Files Thumbnail(s)
   
Reply
#2
Can you tell us a little more about your set up.
Are you using relays and the relay_board plugin, or something else?

Have you tried starting SIP from the command line? This may show some error message that would help figure out what is happening.
Reply
#3
Thank you Dan, for you prompt reply.

1) Setup:
I am only working with one station, which activates a pump, via RF power outlets. I added to a Radio Frequency transmission function to the timing_loop(), which basically triggers the RF waves through the RF transmitter, once Station 1 (Pump) is set to run. See a piece of the timing loop. You can find a piece of the timing loop below, and the RF function is in line 10.

timingloop():
[..]
Code:
else:  # if this station is not yet on
                       if gv.rs[sid][0] <= gv.now < gv.rs[sid][1]:
                           if gv.sd['mas'] - 1 != sid:  # if not master
                               gv.srvals[sid] = 1  # station is turned on
                               set_output()
                               gv.sbits[b] |= 1 << s  # Set display to on
                               gv.ps[sid][0] = gv.rs[sid][3]
                               gv.ps[sid][1] = gv.rs[sid][2]
                               print "2. RFout = 1"
                               tRF2.transmit_code(a_on) # trun on pump by Radio Frequency
                               if gv.sd['mas'] and gv.sd['mo'][b] & 1 << (s - (s / 8) * 80):  # Master settings
                                   masid = gv.sd['mas'] - 1  # master index
                                   gv.rs[masid][0] = gv.rs[sid][0] + gv.sd['mton']
                                   gv.rs[masid][1] = gv.rs[sid][1] + gv.sd['mtoff']
                                   gv.rs[masid][3] = gv.rs[sid][3]
                           elif gv.sd['mas'] == sid + 1:
                               gv.sbits[b] |= 1 << sid
                               gv.srvals[masid] = 1
                               set_output()
                               print "3. RFout = 1"
                               tRF2.transmit_code(a_on) # trun on pump by Radio Frequency
[...]



2) I started SIP from the command line and this was the print upon start:


Code:
fatal: Not a git repository (or any of the parent directories): .git
Could not use git to determine version!
fatal: Not a git repository (or any of the parent directories): .git

Could not use git to determine date of last commit!
ALARM from Example_Sender!: Just and example!
plugins loaded:
  mobile_app
  plugin_manager
  signaling_examples
  system_update
zones changed
 Starting timing loop

[0, 0, 0, 0, 0, 0, 0, 0]
http://0.0.0.0:80/



------------------------------------------------------------------------------------------------

(2017 Jul 19, 08:45 PM)ADDITIONAL NOTE:I removed everything related to the RF transmissions from the script i.e.: I left as it is originally and the message below remains. the script is called sip.py and the directory SIP: Wrote:
Code:
fatal: Not a git repository (or any of the parent directories): .git
Could not use git to determine version!
fatal: Not a git repository (or any of the parent directories): .git
Could not use git to determine date of last commit!
ALARM from Example_Sender!: Just and example!
plugins loaded:
  mobile_app
  plugin_manager
  signaling_examples
  system_update
zones changed
 [Starting timing loop

0, 0, 0, 0, 0, 0, 0, 0]
http://0.0.0.0:80/


elongoThank you Dan, for you prompt reply.

1) Setup:
I am only working with one station, which activates a pump, via RF power outlets. I added to a Radio Frequency transmission function to the timing_loop(), which basically triggers the RF waves through the RF transmitter, once Station 1 (Pump) is set to run. See a piece of the timing loop. You can find a piece of the timing loop below, and the RF function is in line 10.

timingloop():
[..]
Code:
else:  # if this station is not yet on
                       if gv.rs[sid][0] <= gv.now < gv.rs[sid][1]:
                           if gv.sd['mas'] - 1 != sid:  # if not master
                               gv.srvals[sid] = 1  # station is turned on
                               set_output()
                               gv.sbits[b] |= 1 << s  # Set display to on
                               gv.ps[sid][0] = gv.rs[sid][3]
                               gv.ps[sid][1] = gv.rs[sid][2]
                               print "2. RFout = 1"
                               tRF2.transmit_code(a_on) # trun on pump by Radio Frequency
                               if gv.sd['mas'] and gv.sd['mo'][b] & 1 << (s - (s / 8) * 80):  # Master settings
                                   masid = gv.sd['mas'] - 1  # master index
                                   gv.rs[masid][0] = gv.rs[sid][0] + gv.sd['mton']
                                   gv.rs[masid][1] = gv.rs[sid][1] + gv.sd['mtoff']
                                   gv.rs[masid][3] = gv.rs[sid][3]
                           elif gv.sd['mas'] == sid + 1:
                               gv.sbits[b] |= 1 << sid
                               gv.srvals[masid] = 1
                               set_output()
                               print "3. RFout = 1"
                               tRF2.transmit_code(a_on) # trun on pump by Radio Frequency
[...]



2) I started SIP from the command line and this was the print upon start:


Code:
fatal: Not a git repository (or any of the parent directories): .git
Could not use git to determine version!
fatal: Not a git repository (or any of the parent directories): .git

Could not use git to determine date of last commit!
ALARM from Example_Sender!: Just and example!
plugins loaded:
  mobile_app
  plugin_manager
  signaling_examples
  system_update
zones changed
 Starting timing loop

[0, 0, 0, 0, 0, 0, 0, 0]
http://0.0.0.0:80/



------------------------------------------------------------------------------------------------
Reply
#4
How are you starting SIP from the command line?
It should not bring up any reference to git.
The best way to start SIP from the command line is to log into the SIP directory and use the command:

Code:
python sip.py

You should see any error message when you try to start the pump.


As far as the command to control your wireless pump, it might be easier if you use the rf_control plugin.
Actually I am re-working the rf_control plugin to make it even easier to use. See this post:
http://nosack.com/sipforum/showthread.ph...385#pid385
Reply
#5
Thanks Dan. But is exactly that way how I am
Starting sip.py from the command line: python sip.py. and the message posted before is showing up.
Will check what is up with the rf plug in. Anyway would be good to find a solution to my problem in the mean time as I have a device already running remotely with this set up. Thank you. E
Reply
#6
I have never seen the git error when SIP is starting and I have started the program thousands of times over the last few years. What is causing that may possibly have something to do with your problem.

Also, it looks like the code you added to the timing loop will send the RF start signal when any station it turned on (line 10 in the code you posted). It will also send the start signal when the master station is turned on. (line 21 in your code). It might be better to set a station for the pump as master and only turn that one on (take out line 10 and leave line 21).

Have you gotten any error messages not including the git errors when SIP stops?
Reply
#7
Hi Dan,

Thank you for the advise.

Just to let you (and the SIP community) know that the problem reported here by me, seems to be solved by starting the sip.py script from the command line manually, every times the device is turned on. When I was experiencing the problem, the script was started automatically from the rc.local file. Actually I really need to have the program starting automatically, since that is a peace of mind in case a power cut or something. So I'll continue finding a solution to this. In case you have any clue of how to auto-start the script reliably, that is very welcome.

And I am aware of the concerns you mentioned about turning on the RF outlet with every scheduled station. I did it this way because my setup only needs one station for the pump and that is it. Indeed when I will be operating more stations this needs to change. I am up for checking up the RF plug in. I didn't use it int his case because previously it was said that it wasn't very well tested!!But will visit that topic again.

Thank you!!
Reply
#8
The best way to start SIP automatically is to use a script in /etc/systemd. There are instruction for this on the SIP documentation wiki.
This link is for the set up instructions. Scroll down to the section named "Starting the program automatically":
https://github.com/Dan-in-CA/SIP/wiki/Installation

I am just finishing testing an updated version of the rf_control plugin. It will be added to the plugins repository in the next day or so. It will be named "cli_control" because it sends a command line command when a stations is started or stopped. The cli_control plugin will replace the rf_control plugin so wait until the new plugin is in the plugins list before you try it.

Edit: The cli_control is now available.
Reply
#9
Perfect. recommendations applied and thanks for the news about RF plug in. Will teste it in the current iteration of my system. Thank you.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)