Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Follow up on #4 (comment)
This PR adds the offline script (taken from previous camera work) and adapt it for this model
Be aware that it seems to break the application in some cases ! (at the beginning, my app was always retrieving the flux from tuya's servers. Now, it seems to use local only)
line
[[ !
pgrep -f offline.sh]] && /tmp/sd/offline.sh &
is needed because the script is called fromcustom.sh
which is itself called every 10 seconds.I made this choice because I fear, in the previous versions, running it only once is not enough :
Once the tuya connection is dropped, it will attempt to use another IP address which will not be blacklisted. With this version, every 10 sec new connections will be dropped as null routed.
However, it might be a flaw in this script because of the
grep -v 6668
which is a grep on the source port ofanyka_ipc
daemon.In theory this should be fine as source port 6668 is used for rtsp and source port 6667 is used for Tuya.