Page 18 of 20 FirstFirst ... 81617181920 LastLast
Results 171 to 180 of 192

Thread: How to Install dump1090-mutability_1.15~dev on RPi

  1. #171
    Captain
    Join Date
    Apr 2018
    Posts
    605
    The location is not defined.

    If you don't run piaware you need to specify the location in /etc/default/dump1090-fa

    For example my DECODER_OPTIONS looks like this:

    Code:
    DECODER_OPTIONS="--stats-range --stats-every 86400 --lat 50.5678 --lon 10.1234 --max-range 280"
    The relevant part that you need are lat and lon.
    After changing the file, use
    sudo systemctl restart dump1090-fa
    to restart dump1090-fa

  2. #172
    Passenger
    Join Date
    Nov 2016
    Location
    T-EGCC288
    Posts
    19
    Thanks Wiedehopf.

    It's quite obvious now you say that. It's running dump1090 only on a spare Rpi just for testing, so no feeds installed, so no location and therefore cannot calculate distance. so obvious.

  3. #173
    Captain abcd567's Avatar
    Join Date
    Sep 2013
    Location
    Toronto CYYZ
    Posts
    2,693
    @drworld88

    Which version of dump1090 are you using?
    If you are using dump1090-fa, then method to add lat & lon given by @wiedehopf will apply.

    If you are using dump1090-mutability, then file to edit and add --lat and --lon will be following
    Code:
    sudo nano /etc/default/dump1090-mutability
    The restart command will be following
    Code:
    sudo systemctl restart dump1090-mutability

    Alternatively you can run following command, which will open a configuration dialog. Most of default settings are ok, and you have to just press Enter key to accept these. Keep on pressing Enter key til it asks you to enter latitude & longitude. Enter these values and continue pressing Enter key till the dialouge window closes. Then restart dump1090-mutability by command given above.

    Code:
    sudo dpkg-reconfigure dump1090-mutability
    Last edited by abcd567; 2019-05-06 at 22:46.

  4. #174
    Purser
    Join Date
    Jan 2015
    Location
    T-EGKK39
    Posts
    113
    Have tweaked the gain a couple of times and now running just under 5% above -3dBFS

    dump1090-localhost-local_trailing_rate-7d.png

    I noticed the scripts were updating the graphs constantly in the background which was bugging me , so I made some changes so it only updates the graphs when I request them in the browser. Private messages aren't enabled so I guess post the changes here is best in case you want to put them in the distribution?

    Delete the crontab file that generates the graphs:
    sudo rm /etc/cron.d/cron-graphs1090

    Add the script handler to lighttpd:
    sudo vi /etc/lighttpd/lighttpd.conf

    Add the following four lines to the end:

    Code:
    server.modules += ( "mod_cgi" )
    $HTTP["url"] =~ "/cgi-bin/" {
            cgi.assign = ( ".sh" => "" )
    }
    Create a cgi-bin directory:
    sudo mkdir /var/www/html/cgi-bin

    Create the cgi script to update the graphs:
    sudo vi /var/www/html/cgi-bin/update_graphs1090.sh

    Add these two lines:
    #!/bin/bash
    /usr/share/graphs1090/graphs1090.sh $QUERY_STRING >/dev/null 2>&1


    Restart the lighttpd daemon:
    sudo /etc/init.d/lighttpd restart

    Edit the permissions so lightttpd can update the graphs:
    sudo chgrp www-data /run/graphs1090/*png
    sudo chmod g+w /run/graphs1090/*png


    I made a few changes to /usr/share/graphs1090/graphs1090.sh to speed up the graph generation:
    rem out the renice on line 5
    Add " --lazy" to "options=..." on line 50
    Set pre="" on line 54 (easier than removing it from everywhere else )

    Edit /usr/share/graphs1090/html/graphs.js file:
    Insert this on line 32 after the "$timeFrame = newTimeFrame;" line:
    Code:
        // Update the graphs if needed
        var ret = new XMLHttpRequest();
        ret.open('GET', '/cgi-bin/update_graphs1090.sh?' + $timeFrame, false);
        ret.send();
    Last edited by elljay; 2019-05-07 at 15:56.

  5. #175
    Captain
    Join Date
    Apr 2018
    Posts
    605
    That would increase load times significantly.

    Also note that removing the cron file the boot.sh is no longer executed which is responsible for creating the /run direcotry
    (/usr/share/graphs1090/boot.sh)

    In case your RPi is exposed to the internet, someone could DoS it as well by executing the graph generation repeatedly.
    Probably eating up the bandwidth is DoS enough so that's not really an argument maybe.

    It's a very nice approach only generating the graphs on demand but it has too many drawbacks for me.

    Feel free to fork it on github, add changes and everyone who likes it can use it.
    https://github.com/wiedehopf/graphs1090

    Maybe i could implement a middle ground generating everything on demand except for the 24h graphs which would be created every 5 mins.
    But yeah i don't see the need, it's not that much CPU load on your typical RPi installation.

  6. #176
    Purser
    Join Date
    Jan 2015
    Location
    T-EGKK39
    Posts
    113
    Quote Originally Posted by wiedehopf View Post
    That would increase load times significantly.
    Seems to be about 2-3 secs to load the page so not too bad.

    Quote Originally Posted by wiedehopf View Post
    Also note that removing the cron file the boot.sh is no longer executed which is responsible for creating the /run direcotry
    (/usr/share/graphs1090/boot.sh)
    Ah ok, thanks. Have put that back in cron and changed boot.sh to create the dir and change the group and give write permissions to www-data.

    Quote Originally Posted by wiedehopf View Post
    In case your RPi is exposed to the internet, someone could DoS it as well by executing the graph generation repeatedly.
    Probably eating up the bandwidth is DoS enough so that's not really an argument maybe.
    Yup, I think if it was on the internet it could be DoSed either way!

    Quote Originally Posted by wiedehopf View Post
    Maybe i could implement a middle ground generating everything on demand except for the 24h graphs which would be created every 5 mins.
    But yeah i don't see the need, it's not that much CPU load on your typical RPi installation.
    It's not a huge load no - about 1 to 2% CPU 24/7 judging by the nice portion on the graphs. The user time is about 8% by comparison. The page refresh default is every 5 mins so that sounds like a good refresh cycle multiple.

    Either way it was fun working out how to call a cgi script from a .js!

  7. #177
    Passenger
    Join Date
    Nov 2016
    Location
    T-EGCC288
    Posts
    19
    @abcd567

    Using dump1090-fa just on a spare Rpi just messing about trying different things, not on my main Rpi feeder (running mutability dev 1.15). I added @wiedehopf lat and long suggestion, but it made no difference.
    As it's only for trying different things out I will leave as is and will probably try a fresh install at some point.. Thanks guys for your suggestions as always.

    Regards
    Doug

  8. #178
    Captain
    Join Date
    Apr 2018
    Posts
    605
    The range should really work.

    Is it a piaware sd-card? In that case the config file i mentioned gets automatically overwritten and you basically need to set your location on the FA website.

    Otherwise you can post the config file and i can check it.
    Did you make sure to restart the service or reboot the Pi?

  9. #179
    Flight attendant
    Join Date
    May 2014
    Posts
    81

    Hi. am i missing something ? :(

    no numbers.... only text "RSSI"

    rssi.jpg

  10. #180
    Passenger
    Join Date
    May 2019
    Location
    Switzerland
    Posts
    0
    @abcd567 First of all thank you for this great manual...

    Everthing works fine only a minor issue with the "RSSI" number as mentioned by ramimz.

    2019-05-08 22_12_54-Window.png

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •