1

I configured a Raspberry Pi 2 with a button. I have a script in python, which will call a command, if someone press the button. The command doing a sip phone call to a phone server (cisco communication manager). This works fine. The python script to watch the GPIO and call the command should be running automatically. So I configured it as a system daemon with systemctl. Runs fine. But unfortunately at some times the command is calling, but nobody has pressed the button. I see sometimes that CRON is running before the command is called. But the crontab is empty. Sometimes there is no entry in syslog before the command is called. What can it be?

Python is 3.5, Pi is Linux raspberrypi 4.14.34-v7+ armv7l GNU/Linux the called command is sipcmd from https://github.com/tmakkonen/sipcmd

  • "The python script to watch the GPIO and call the command should be running automatically. So I configured it as a system daemon with systemctl. Runs fine. But unfortunately at some times the command is calling, but nobody has pressed the button." I'd guess the script is faulty. Too little useful information given to comment more than that. – joan Jun 14 '18 at 11:37
  • 1
    Break the problem down. Most of the detail in your question in irrelevant, but we don't know which parts. Does the problem happen if you don't run it as a daemon? Does it happen if you don't call the external script, just print something to the screen? Find the smallest part of the system which show shte problem. When you know which part of the system is failing, show us the detail for that part. – Mark Smith Jun 14 '18 at 13:58
  • Add some logging to your script. Perhaps the condition you check to detect a button press does become true in some cases without the button being pressed. – Dmitry Grigoryev Jun 21 '18 at 12:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.