Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]AdvAir.sh cannot write to /tmp #58

Closed
CharlotteWlkr86 opened this issue May 3, 2022 · 9 comments · Fixed by #64
Closed

[Bug]AdvAir.sh cannot write to /tmp #58

CharlotteWlkr86 opened this issue May 3, 2022 · 9 comments · Fixed by #64
Assignees
Labels
enhancement New feature or request

Comments

@CharlotteWlkr86
Copy link

Paste of Logs:

The problem is that AdvAir.sh writes to /tmp directly which gives permission denied.
Linux on the Sony is via termux, like a docker image where temporary files are only accessible through
the proper call to mktemp. For instance:
mktemp --suffix=myFile
/data/data.com.termux/files/usr/tmp/41Iun75mtymyFile
As such, AdvAir.sh incorrectly creates temporary files.

Cmd4 Config:

Screenshots:

Advantage Air System: Not applicable at this time

  • Control Unit: e-zone / MyAir / MyAir3 / MyAir4 / MyPlace / zone10e / zone10 - Not applicable at this time
  • Temperature Sensors: Yes / No

Homebridge Environment:

  • Node.js Version: Node.js is v16.3.1.
  • NPM Version: 8.8.0
  • Homebridge Version: Homebridge v1.4. 1 (HAP vO.10.2) (Homebridge)
  • homebridge-cmd4 Version: 6.3.0
  • homebridge-cmd4-AdvantageAir Version: 3.3.0
  • Operating System: Raspbian / Ubuntu / Debian / Windows / macOS / Docker / other Sony KD43X8000H Android TV. The OSTYPE linux-eabI via termux
@CharlotteWlkr86 CharlotteWlkr86 added the enhancement New feature or request label May 3, 2022
@ztalbot2000
Copy link
Collaborator

ztalbot2000 commented May 3, 2022 via email

@CharlotteWlkr86
Copy link
Author

Thanks for the quick response John.
I checked termux
echo $TMPDIR
/data/data/com, termux/files/usr/tmp
touch $TMPDIR/itworks
This is also an answer,

@mitch7391
Copy link
Owner

Thanks for replying to this one in my absence John, I have no experience with termux.

I am also very intrigued by Homebridge running on an Android TV; this project is slowly getting to all sorts of devices!

@CharlotteWlkr86 I was wondering if you might be able to provide a little more information on this issue? Is it just that you cannot access the error logs due to it not being able to write to the folder? Or does this not allow the entire plugin to work? I imagine the latter may be the case as it cannot access some of the constants we are writing there. Just trying to understand the issue a little better.

@CharlotteWlkr86
Copy link
Author

@mitch7391 A learning experience for sure. termux is CML driven. apt installs nodejs and npm installs homebridge. My network devices already are already pinged with CMD4. homebridg in debug mode just gave me AdvAir.sh was failing, so I gave that a go from the termux prompt and found the permission denied errors to /tmp.

@ztalbot2000
Copy link
Collaborator

ztalbot2000 commented May 4, 2022 via email

@mitch7391
Copy link
Owner

homebridg in debug mode just gave me AdvAir.sh was failing, so I gave that a go from the termux prompt and found the permission denied errors to /tmp.

Awesome, this is a good find thank you @CharlotteWlkr86! John has emailed me a potential solution to this for us to add and test in the next beta. I will leave this issue open until then.

@ztalbot2000
Copy link
Collaborator

ztalbot2000 commented May 7, 2022 via email

@CharlotteWlkr86
Copy link
Author

CharlotteWlkr86 commented May 7, 2022 via email

@mitch7391 mitch7391 linked a pull request Jun 10, 2022 that will close this issue
@mitch7391
Copy link
Owner

Hey @CharlotteWlkr86 just curious to know if v3.4.0 had resolved your issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants