So I take it that when you run the this from a terminal it works fine; correct?The command I should send was captured with PiIR which works well and which, launched from the terminal, is the following: piir play --gpio 17 --file denon.json play.
Since you don't seem to be getting an error back from the SUBPROCESS.RUN it looks like PiiR is existing normally. You may want to add a "&> piir.log" to your run to see if PiiR is returning anything.
Have you considered using the PiiR API https://github.com/ts1/PiIR rather than using SUBPROCESS?
Code:
import piirremote = piir.Remote('light.json', 17)remote.send('off')
Statistics: Posted by DS256 — Thu Feb 20, 2025 2:02 pm