This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Creat logs in txt file
#7
(02.04.2020, 11:20)admin Wrote: FTP path is /home/ftp, just make sure that you have some algorithm to delete old files. Otherwise you can run out of free space at some point.
I'm still confused on this point. I used Filezilla to connect and placed a doorbell sound file (at what I'm taking from your post above is /home/ftp). My ftp login was user ftp (can choose from ftp or apps). But my Custom Javascript file appears not to see the copied file. For example, in the following file if I uncomment and use the mozilla file, the sound plays fine. But when written as shown here with the local file, the code does not work. Is it a linux permissions thing?

Code:
// the following function plays a sound when the doorbell is pressed (Object 0/250/72 is set true)
// FTP path is /home/ftp (use Filezilla to put sound file there)

$(function(){
   grp.listen('0/250/72', function(object) {
      if (object.value == true ) {
//        var audio = new Audio('https://interactive-examples.mdn.mozilla.net/media/examples/t-rex-roar.mp3');
        var audio = new Audio('/home/ftp/Doorbell.mp3');
        audio.play();
      }
   });
});

Can you help me?

Thanks!
Reply


Messages In This Thread
Creat logs in txt file - by deimostier - 27.04.2017, 14:03
RE: Creat logs in txt file - by gtsamis - 27.04.2017, 21:55
RE: Creat logs in txt file - by deimostier - 02.05.2017, 14:41
RE: Creat logs in txt file - by gtsamis - 02.05.2017, 14:51
RE: Creat logs in txt file - by mjaanes - 02.04.2020, 10:11
RE: Creat logs in txt file - by admin - 02.04.2020, 11:20
RE: Creat logs in txt file - by tassiebean - 12.06.2020, 15:10
RE: Creat logs in txt file - by Trond Hoyem - 13.08.2020, 09:46
RE: Creat logs in txt file - by Trond Hoyem - 07.01.2021, 12:02
RE: Creat logs in txt file - by admin - 12.06.2020, 15:47
RE: Creat logs in txt file - by tassiebean - 13.06.2020, 03:20
RE: Creat logs in txt file - by admin - 13.08.2020, 11:12
RE: Creat logs in txt file - by admin - 07.01.2021, 12:14

Forum Jump: