JBV1 3.8.0+ can read signal data from a JBV1 carputer. This signal data can be whatever you want it to be, as long as it can be represented in the required data format.
"now": a UNIX epoch timestamp in either seconds or milliseconds. It's important that this timestamp is updated whenever the signals.json file is updated, so that JBV1 can know when it has been updated. Accuracy of the timestamp is unimportant.
"signals": an array of zero or more signal objects.
Signal object
"uuid": a quoted string that uniquely identifies the signal.
"freq": an integer representing the signal frequency in MHz. For example, a 35.500 GHz signal would be represented as 35500, while an 800 MHz signal would be represented as 800.
"rssi_f": the front signal strength in dBm, represented as a single negative integer when there is a front signal strength. Set to 0 when there is a rear signal strength (rssi_r) but no front signal strength.
"rssi_r": the rear signal strength in dBm, represented as a single negative integer when there is a rear signal strength. Set to 0 when there is no rear signal strength. If your signals do not have front and/or rear orientations, use rssi_f for signal strength and either omit rssi_r or set it to 0 for all signals.
"name": an optional quoted string that names the signal. If provided, JBV1 can use this name for filtering.
"desc": an optional quoted string that describes the signal. If provided, JBV1 can use this description for filtering.
Location
Signal data must be written to the following path on your carputer:
Lighttpd must be installed on your carputer so that JBV1 can access your signals data. If you have already installed PiAware for ADS-B, then lighttpd is already installed.
A bit of lighttpd configuration is required so that your signals data is available to JBV1 via the following URL:
To configure lighttpd on your carputer:
Now use a text editor that you're comfortable with to create and edit a file named 81-jbv1.conf in the current directory (/etc/lighttpd/conf-available).
In this file, paste the following:
Save the file, exit the text editor, and then:
When you have a process writing signal data to /run/lighttpd/signals.json, you can confirm your lighttpd changes worked by visiting this URL from a computer on the same network as your carputer:
sudo su # this switches you to a root user shell, so be careful what you type after this, until you exit
cd /etc/lighttpd/conf-available
rw # only if you see "(ro)" in your prompt
# Allows access to the dynamically-generated json files that contain various
# data periodically written by JBV1 carputer services.
alias.url += (
"/jbv1/" => "/run/lighttpd/",
)
# redirect the slash-less URL
url.redirect += (
"^/jbv1$" => "/jbv1/"
)
# Add CORS header
server.modules += ( "mod_setenv" )
$HTTP["url"] =~ "^/jbv1/.*\.json$" {
setenv.add-response-header = ( "Access-Control-Allow-Origin" => "*" )
}
cd ../conf-enabled
ln -s ../conf-available/81-jbv1.conf .
ro # only if you see "(rw)" in your prompt
systemctl restart lighttpd
exit # this exits out of your root user shell and returns you to a pi user shell