<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[(Solved) exec python ctrl GPIO PWM -&gt; sudo: no tty present]]></title><description><![CDATA[<p dir="auto">Hi,<br />
Ich verzweifle gerade am starten eines Python scripts aus einem Javascript Programm. Evtl. sieht jemand meinen Fehler. Das Skript steuert einen Servo am PWM GPIO.<br />
Über putty kann ich das Programm starten.<br />
Mit<br />
exec("/usr/bin/python opt/iobroker/pythonScripts/postLeer.py", function(err, stdout, stderr) kommt der Fehler "Unable to do this when using /dev/gpiomem. Try sudo?"<br />
Mit Sudo bekomme ich dann<br />
"sudo: no tty present and no askpass program specified"</p>
<p dir="auto">-exec erlauben ist angehakt<br />
-in etc/sudoers.d habe ich die Zeile hinzugefügt<br />
iobroker ALL = NOPASSWD: für arp-scan hinzugefügt</p>
<p dir="auto">In dem Thread den ich hier im Forum zu dem Thema gefunden habe, war das folgende die Lösung:<br />
sudo adduser iobroker sudo<br />
sudo chown iobroker:iobroker &lt;script&gt;<br />
sudo chmod 755 &lt;script&gt;<br />
sudo chmod +x &lt;script&gt;</p>
<p dir="auto">Klappt bei mir leider nicht. Woran kann das noch liegen? Was ich gefunden habe, hab ich versucht.<br />
Letzte Fehlermeldung:<br />
javascript.0 (1969) script.js.zTrails.triggercarowhatsappTEST: Exec-Fehler: We trust you have received the usual lecture from the local System Administrator. It usually boils down to these three things: #1) Respect the privacy of others. #2) Think before you type. #3) With great power comes great responsibility. sudo: no tty present and no askpass program specified</p>
]]></description><link>https://forum.iobroker.net/topic/41743/solved-exec-python-ctrl-gpio-pwm-sudo-no-tty-present</link><generator>RSS for Node</generator><lastBuildDate>Tue, 26 May 2026 14:14:01 GMT</lastBuildDate><atom:link href="https://forum.iobroker.net/topic/41743.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 02 Feb 2021 18:47:12 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to (Solved) exec python ctrl GPIO PWM -&gt; sudo: no tty present on Mon, 02 Aug 2021 14:15:53 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/werner2000x" aria-label="Profile: werner2000x">@<bdi>werner2000x</bdi></a> Jetzt habe ich im Forum auch einen User mit dem gleichen Problem gefunden, doch auch das hilft nicht sofort.</p>
<p dir="auto"><a href="https://forum.iobroker.net/topic/29668/exec-f%C3%BChrt-befehle-nicht-aus">https://forum.iobroker.net/topic/29668/exec-führt-befehle-nicht-aus</a></p>
<p dir="auto">Ich musste neben dem User iobroker anlegen auch den Pfad mit Schreibrechten versehen:</p>
<pre><code>sudo chmod -R 777 /home

</code></pre>
]]></description><link>https://forum.iobroker.net/post/658047</link><guid isPermaLink="true">https://forum.iobroker.net/post/658047</guid><dc:creator><![CDATA[werner2000x]]></dc:creator><pubDate>Mon, 02 Aug 2021 14:15:53 GMT</pubDate></item><item><title><![CDATA[Reply to (Solved) exec python ctrl GPIO PWM -&gt; sudo: no tty present on Mon, 02 Aug 2021 12:19:17 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mayokleckz" aria-label="Profile: mayokleckz">@<bdi>mayokleckz</bdi></a> Wie löse ich es ein Raspi Befehl in NodeRed oder Blockly fehlerfrei auszufühen.<br />
Aus der Kommandozeile klappt der Befehl folgende ohne Fehler:</p>
<pre><code> ffmpeg -y -i "rtsp://user:pass@192.168.178.28:554/profile5/media.smp" -vframes  1 /home/kamera.jpg

</code></pre>
<p dir="auto">Doch in NodeRed klappt es nicht. Entweder Fehler: error: 1 bzw. "Command failed: /usr/local/bin/Kamera.sh<br />
ffmpeg version 4.1.6"  mit "exec"  oder return code 127 mit "big exec".<br />
In Blockly kommt keine Fehlermeldung, doch es passiert auch nichts. Hat jemand eine Idee?</p>
]]></description><link>https://forum.iobroker.net/post/657991</link><guid isPermaLink="true">https://forum.iobroker.net/post/657991</guid><dc:creator><![CDATA[werner2000x]]></dc:creator><pubDate>Mon, 02 Aug 2021 12:19:17 GMT</pubDate></item><item><title><![CDATA[Reply to (Solved) exec python ctrl GPIO PWM -&gt; sudo: no tty present on Tue, 02 Feb 2021 19:44:41 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/unclesam" aria-label="Profile: unclesam">@<bdi>unclesam</bdi></a><br />
Offensichtlich nichts. Hätte einfach python statt arp-scan freigeben müssen. War eine vorgeschlagene Lösung von jemandem.</p>
]]></description><link>https://forum.iobroker.net/post/572873</link><guid isPermaLink="true">https://forum.iobroker.net/post/572873</guid><dc:creator><![CDATA[mayokleckz]]></dc:creator><pubDate>Tue, 02 Feb 2021 19:44:41 GMT</pubDate></item><item><title><![CDATA[Reply to (Solved) exec python ctrl GPIO PWM -&gt; sudo: no tty present on Tue, 02 Feb 2021 19:32:09 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mayokleckz" aria-label="Profile: mayokleckz">@<bdi>mayokleckz</bdi></a> sagte in <a href="/post/572819">exec python ctrl GPIO PWM -&gt; sudo: no tty present</a>:</p>
<blockquote>
<p dir="auto">in etc/sudoers.d habe ich die Zeile hinzugefügt<br />
iobroker ALL = NOPASSWD: für arp-scan hinzugefügt</p>
</blockquote>
<p dir="auto">Was meinst du damit? Und was hat arp-scan mit dem PWM zu tun?</p>
<p dir="auto">Die richtige Zeile lautet, soviel ich weiss:<br />
<code>iobroker ALL=(ALL) NOPASSWD: ALL</code></p>
]]></description><link>https://forum.iobroker.net/post/572861</link><guid isPermaLink="true">https://forum.iobroker.net/post/572861</guid><dc:creator><![CDATA[UncleSam]]></dc:creator><pubDate>Tue, 02 Feb 2021 19:32:09 GMT</pubDate></item></channel></rss>