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

Make interactive mode history persistent #20

Closed
farshidtz opened this issue Oct 26, 2023 · 3 comments
Closed

Make interactive mode history persistent #20

farshidtz opened this issue Oct 26, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@farshidtz
Copy link
Member

The history in the interactive mode isn't preserved across reboots because the file is written at /tmp/chip_tool_history within the snap; which is on tmpfs. For preserving the history, the path can be replaced with a persisted one.

The support for interactive mode was added by #19

@farshidtz farshidtz added the enhancement New feature or request label Oct 26, 2023
@farshidtz
Copy link
Member Author

This may have been fixed upstream since the history is now being written in the general storage directory which is replaced in the snap. See:

@MonicaisHer
Copy link
Contributor

Installed the chip-tool built from Matter SDK version e5f5d67 on ubuntu classic OS:

sudo snap install chip-tool --edge
sudo snap connect chip-tool:avahi-observe
sudo snap connect chip-tool:bluez
sudo snap connect chip-tool:process-control

Enter interactve mode:

$ sudo chip-tool interactive start 
...
>>> pairing onnetwork 110 20202021
>>> onoff toggle 110 1

Check that /tmp/chip_tool_history no long exists, and it is now located inside the chip-tool snap:

$ ls /tmp/chip_tool_history
ls: cannot access '/tmp/chip_tool_history': No such file or directory

$ ls /var/snap/chip-tool/common/mnt/chip_tool_history
/var/snap/chip-tool/common/mnt/chip_tool_history

This issue has been fixed by upstream.

@farshidtz
Copy link
Member Author

Thanks for testing.

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

No branches or pull requests

2 participants