I would like to use the inotify mechanism to watch changings of a special file,
Do anyone have informations, who I can use inotify from a python plugin
Posted 12 February 2018 - 11:02
I would like to use the inotify mechanism to watch changings of a special file,
Do anyone have informations, who I can use inotify from a python plugin
Receiver:2 x Uno4k SE (PLI 7.3 rel), 1 x ET9200 (PLI 4.0), NAS: 2 x QNAP 410, TV: LG 65C8llla, LG 47LB570V, LG 42LM615S, Sound: Yamaha RX-v663, Teufel System 5 THX
Posted 19 February 2018 - 08:46
Is there no way to use inotify from python?
If anybody has an idea, please let me know
Does inotify also work over samba
Receiver:2 x Uno4k SE (PLI 7.3 rel), 1 x ET9200 (PLI 4.0), NAS: 2 x QNAP 410, TV: LG 65C8llla, LG 47LB570V, LG 42LM615S, Sound: Yamaha RX-v663, Teufel System 5 THX
Posted 19 February 2018 - 12:14
There is an inotify library available (python-pyinotify), but I don't think it's being built at the moment.
It is however a low-level library, so it needs to be wrapped into something that allows you to subcribe to changes on a file or directory, and register callbacks for events, so it can be used from enigma code easily.
inotify relies on kernel hooks to trigger notification on file system events, this is not available on remote filesystems (as the local kernel doesn't see those events).
Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Pro (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)
Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.
Many answers to your question can be found in our new and improved wiki.
Posted 19 February 2018 - 12:51
I´ve red in the internet that cifs/samba supports inotify: So my idea is if a CIFS clients makes a callback register on a filechange and the file is stored on a remote samba server that can be work.
But I understand the python-pyinotify is not included in openpli today, so I think it is difficult to install is later because pynotify needs some low level c-lib functions
Edited by anudanan, 19 February 2018 - 12:52.
Receiver:2 x Uno4k SE (PLI 7.3 rel), 1 x ET9200 (PLI 4.0), NAS: 2 x QNAP 410, TV: LG 65C8llla, LG 47LB570V, LG 42LM615S, Sound: Yamaha RX-v663, Teufel System 5 THX
Posted 19 February 2018 - 13:19
What box are you using, and which OpenPLi version? I can see if I can build you an ipk to test with?
Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Pro (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)
Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.
Many answers to your question can be found in our new and improved wiki.
Posted 19 February 2018 - 13:23
I´m using
openpli 6.1rel on one uno4kse
and
openpli6.1rc on the second uno4kse
thx
Edited by anudanan, 19 February 2018 - 13:23.
Receiver:2 x Uno4k SE (PLI 7.3 rel), 1 x ET9200 (PLI 4.0), NAS: 2 x QNAP 410, TV: LG 65C8llla, LG 47LB570V, LG 42LM615S, Sound: Yamaha RX-v663, Teufel System 5 THX
Posted 19 February 2018 - 16:52
This one should do it.
Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Pro (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)
Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.
Many answers to your question can be found in our new and improved wiki.
Posted 19 February 2018 - 17:01
Thank you for your quick response and the ipk file
I will test it but I need some days for that, because in the next days I´m were busy with other privat actions. I hope the weekend will be possible
Edited by anudanan, 19 February 2018 - 17:05.
Receiver:2 x Uno4k SE (PLI 7.3 rel), 1 x ET9200 (PLI 4.0), NAS: 2 x QNAP 410, TV: LG 65C8llla, LG 47LB570V, LG 42LM615S, Sound: Yamaha RX-v663, Teufel System 5 THX
Posted 19 February 2018 - 22:22
I´ve tested pynotify on my box and it works fine on the local filesystem. But over CIFS/Samba it doesn´t work today. I´m searching for some parameter for the samba server, CIFS client to configure notify to work over samba.
I´ve found some parameter
change notify
kernel change notity
but normally they are active on default. But I don´t know if they are active in my samba server
I can´t test today if it works over samba if I write these two parameters into smb.conf because second box is making recording the hole night
Receiver:2 x Uno4k SE (PLI 7.3 rel), 1 x ET9200 (PLI 4.0), NAS: 2 x QNAP 410, TV: LG 65C8llla, LG 47LB570V, LG 42LM615S, Sound: Yamaha RX-v663, Teufel System 5 THX
Posted 19 February 2018 - 22:39
I didn't think it would.
Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Pro (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)
Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.
Many answers to your question can be found in our new and improved wiki.
Posted 20 February 2018 - 08:16
I´ve the feeling after reading some posts about samba and cifs, that the samba server can handle inotifies especially for windows clients but the cifs client for linux can´t do it. So it works not perfectly complete over the network
I´ve tested the following
On box1 I have a local directory for notify watching
I start the notify python script on box1
On Box2 I use the remote directory of box1 for notify watching
I start the notify python script also on box2
I modify the directory on the box1.
=> The python script on box1 gets a notify about the changes, but the python script on box2 doesn´t get one.
I modify the directroy located in box1 from the remote box2.
=> The python script on box1 gets a notify about the changes, and also the python script on box2 gets one.
=> only changes on local storage produce a notify on the local machine. Also remote machines can change this local files and the local machine gets notify message. But the remote machine don´t get notify message about changes.if on other machine modifiy the directory
Thank again for providing the python-pynotify ipk
Edited by anudanan, 20 February 2018 - 08:16.
Receiver:2 x Uno4k SE (PLI 7.3 rel), 1 x ET9200 (PLI 4.0), NAS: 2 x QNAP 410, TV: LG 65C8llla, LG 47LB570V, LG 42LM615S, Sound: Yamaha RX-v663, Teufel System 5 THX
0 members, 0 guests, 0 anonymous users