smartPOC-tx/data/index.html
2025-03-30 15:15:54 +02:00

289 lines
No EOL
15 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>esp32-procsag</title>
<link rel="icon" href="data:,">
<meta name="apple-mobile-web-app-title" content="esp32-pocsag">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div class="wrapper">
<div class="header">
<div class="topnav" id="topnav">
<a href="#home" onclick="selTab(event,'Home');fetchCfgVals()" class="tablinks" id="defaultTab">Transmitter</a>
<a href="#contacts" onclick="selTab(event,'Contacts')" class="tablinks">Contacts</a>
<a href="#config" onclick="selTab(event,'Config')" class="tablinks">Config</a>
<a href="#wifi" onclick="selTab(event,'WiFi')" class="tablinks">WiFi</a>
<a href="#dwdmowas" onclick="selTab(event,'DWD+MoWaS')" class="tablinks">DWD / MOWAS</a>
<a href="#timebeacon" onclick="selTab(event,'Time Beacon')" class="tablinks">Time Beacon</a>
<a href="#idle" onclick="selTab(event,'Idle Handling')" class="tablinks">Idle Handling</a>
<a href="#about" onclick="selTab(event,'About')" class="tablinks">About</a>
<a href="javascript:void(0);" class="icon" onclick="toggleResponsive()">
<span class="hamburger"></span>
</a>
</div>
</div>
<div id="Home" class="tabcontent system-info">
<h1>pocsag-tx</h1>
<form action="/page" class="styled-form">
<label for="ric">RIC</label>
<input type="number" id="ric" name="ric" min="1" max="2097152" step="1" value="1234" />
<label for="fun">Function</label>
<input type="number" id="fun" name="fun" min="0" max="3" step="1" value="3" />
<label for="text">Text</label>
<input type="text" id="text" name="text" placeholder="Enter text..." />
<div class="button-group">
<button type="submit" name="add">Queue</button>
<button type="submit" name="addtx">Direct Transmit</button>
</div>
</form>
<div class="styled-form">
<div class="button-group">
<button style="width: 10rem;" onClick="calculateTimeToTxTxt('swissphone')">Calc. Swissphone Time</button>
<button style="width: 10rem;" onClick="calculateTimeToTxTxt('tpl')">Calc. TPL Time</button>
</div>
</div>
<form action="/transmit" class="styled-form no-top-margin">
<div class="button-group">
<input class="btn" type="submit" value="transmit queue" />
</div>
</form>
<p>Clear Queue manually (if config>clear queue after tx is not enabled)</p>
<form action="/clear" class="styled-form no-top-margin">
<div class="button-group">
<input class="btn" type="submit" value="clear queue" />
</div>
</form>
</div>
<div id="Contacts" class="tabcontent">
<ol id="contactlist">
</ol>
<section class="styled-form">
<h2>Add Contact</h3>
<h3>RIC + Function + Text Length</h4>
<input type="number" placeholder="RIC" id="newcon_r" min="1" max="2097152" step="1" value="1234" />
<input type="number" placeholder="Function" id="newcon_f" min="0" max="3" step="1" value="3" />
<input type="number" placeholder="Text Length" id="newcon_tl" min="0" max="260" step="1" value="80" />
<h3>Contact Name + Default Message</h4>
<input type="text" placeholder="Contact Name" id="newcon_n" />
<input type="text" placeholder="Default Message" id="newcon_t" />
<div class="button-group">
<button class="btn" onclick="addContact(true)">Add Contact, Save & Reload</button>
<button class="btn" onclick="addContact()">Add Contact & Just Save</button>
<button class="btn" onclick="resetContacts()">Initialize Empty Contacts</button>
</div>
</section>
</div>
<div id="Config" class="tabcontent">
<h2>Semtech Modem Configuration</h3>
<form action="/settransmitter" class="styled-form no-top-margin">
<label for="tx_freq">TX Frequency in MHz / 137.0MHz - 525.0MHz</label>
<input type="number" name="tx_freq" step="0.001" value="400.000" />
<label for="tx_baud">TX Baudrate 512/1200/2400</label>
<input type="number" name="tx_baud" step="1" value="1200" />
<label for="tx_dev">TX Deviation (usually 4.5kHz)</label>
<input type="number" name="tx_dev" step="0.1" value="4.5" />
<label for="tx_power">TX Power (3 to 15 dBm (RFO pin) or +2 to +17 dBm (PA_BOOST pin))</label>
<input type="number" name="tx_power" step="1" value="3" />
<label for="tx_empty_queue">Clear Transmit-Queue after TX</label>
<input type="checkbox" name="tx_empty_queue"/>
<label for="pocsag_german">German POCSAG</label>
<input type="checkbox" name="pocsag_german"/>
<div class="button-group">
<input class="btn" type="submit" value="set transmitter settings" />
</div>
</form>
<h2>Device Configuration</h3>
<form action="/setdev" class="styled-form no-top-margin">
<label for="device_name">Device Name</label>
<input id="device_name" type="text" name="device_name" />
<label for="oled_timeout">OLED Timeout in minutes (0=disable), should be lower than idle/time beacon-interval</label>
<input type="number" name="oled_timeout" step="1" min="0" max="720" value="3" />
<div class="button-group">
<input class="btn" type="submit" value="set device settings" />
</div>
</form>
<h2>MosQuiTTo Broker Configuration</h3>
<form action="/setmqtt" class="styled-form no-top-margin">
<label for="mqtt_host">MQTT Host (empty = disabled)</label>
<input type="text" name="mqtt_host" value="" />
<label for="mqtt_port">MQTT Port</label>
<input type="number" name="mqtt_port" step="1" value="1883" />
<label for="mqtt_user">MQTT Username</label>
<input type="text" name="mqtt_user" value="" />
<label for="mqtt_pass">MQTT Password</label>
<input type="password" name="mqtt_pass" value="" />
<label for="mqtt_toic">MQTT BaseTopic</label>
<input type="text" name="mqtt_topic" value="" />
<pre>transmit_topic = topic + "/transmit"</pre>
<pre>clear_topic = topic + "/clear"</pre>
<pre>state_topic = topic + "/state"</pre>
<div class="button-group">
<input class="btn" type="submit" value="set mqtt settings" />
</div>
</form>
<h2>Reboot to Apply Settings</h3>
<form action="/reboot" class="styled-form no-top-margin">
<div class="button-group">
<input class="btn" type="submit" value="reboot esp" />
</div>
</form>
</div>
<div id="WiFi" class="tabcontent">
<h2>Access-Point Credentials</h2>
<form action="/setap" class="styled-form no-top-margin">
<label for="ssid">SSID</label>
<input id="ap_ssid" type="text" name="ssid" />
<label for="pass">Password</label>
<input id="ap_pass" type="password" name="pass" />
<div class="button-group">
<input class="btn" type="submit" value="set ap" />
</div>
</form>
<h2>Home-WiFi Credentials</h2>
<form action="/setwifi1" class="styled-form no-top-margin">
<label for="ssid">SSID</label>
<input id="wifi1_ssid" type="text" name="ssid" />
<label for="pass">Password</label>
<input id="wifi1_pass" type="password" name="pass" />
<div class="button-group">
<input class="btn" type="submit" value="set wifi1" />
</div>
</form>
<h2>Alt. WiFi Credentials</h2>
<form action="/setwifi2" class="styled-form no-top-margin">
<label for="ssid">SSID</label>
<input id="wifi2_ssid" type="text" name="ssid" />
<label for="pass">Password</label>
<input id="wifi2_pass" type="password" name="pass" />
<div class="button-group">
<input class="btn" type="submit" value="set wifi2" />
</div>
</form>
<h2>Reboot to Apply Settings</h3>
<form action="/reboot" class="styled-form no-top-margin">
<div class="button-group">
<input class="btn" type="submit" value="reboot esp" />
</div>
</form>
</div>
<div id="DWD+MoWaS" class="tabcontent">
<h2>DWD Settings</h2>
<form action="/setdwdmowas" class="styled-form no-top-margin">
<label for="dwd_enable">Enable DWD</label>
<input type="checkbox" name="dwd_enable"/>
<label for="dwd_region">DWD Region (lowercase wettwarn.de indicator)</label>
<input id="dwd_region" type="text" name="dwd_region" />
<label for="dwd_interval">DWD Interval (minutes)</label>
<input type="number" placeholder="5m" id="dwd_interval" name="dwd_interval" min="1" max="1440" step="1" value="5" />
<label for="dwd_fun">DWD Function</label>
<input type="number" placeholder="Function" id="dwd_fun" name="dwd_fun" min="0" max="3" step="1" value="3" />
<label for="mowas_enable">Enable MoWaS</label>
<input type="checkbox" name="mowas_enable"/>
<label for="mowas_region">MoWaS Region (<a href="https://www.dcat-ap.de/def/politicalGeocoding/regionalKey/">dcat-ap.de</a>)</label>
<input id="mowas_region" type="text" name="mowas_region" />
<label for="mowas_interval">MoWaS Interval (minutes)</label>
<input type="number" placeholder="5m" id="mowas_interval" name="mowas_interval" min="1" max="1440" step="1" value="5" />
<label for="mowas_fun">MoWaS Function</label>
<input type="number" placeholder="Function" id="mowas_fun" name="mowas_fun" min="0" max="3" step="1" value="3" />
<label for="broadcast_ric">Broadcast RIC</label>
<input type="number" placeholder="RIC" id="broadcast_ric" name="broadcast_ric" min="1" max="2097152" step="1" value="1234" />
<!-- <label for="broadcast_fun">Broadcast Function</label>
<input type="number" placeholder="Function" id="broadcast_fun" name="broadcast_fun" min="0" max="3" step="1" value="3" /> -->
<div class="button-group">
<input class="btn" type="submit" value="Set Settings" />
</div>
</form>
</div>
<div id="Time Beacon" class="tabcontent">
<h2>Time Beacon</h2>
<form action="/settimebeacon" class="styled-form no-top-margin">
<label for="time_enable">Enable</label>
<input type="checkbox" name="time_enable"/>
<label for="time_interval">Interval (minutes)</label>
<input type="number" placeholder="5m" id="time_interval" name="time_interval" min="1" max="1440" step="1" value="5" />
<label for="time_zone">Timezone</label>
<select placeholder="Timezone" id="time_zone" name="time_zone">
</select>
<label for="time_ric">RIC</label>
<input type="number" placeholder="RIC" id="time_ric" name="time_ric" min="1" max="2097152" step="1" value="1234" />
<label for="time_fun">Function</label>
<input type="number" placeholder="Function" id="time_fun" name="time_fun" min="0" max="3" step="1" value="3" />
<label for="time_mode">Mode</label>
<select name="time_mode">
<option value="0">TPL-Time (Service OTA, Func 1/B)</option>
<option value="1">German TPL-Time(ZEIT)</option>
<option value="2">Swissphone Time</option>
</select>
<div class="button-group">
<input class="btn" type="submit" value="Set Time Beacon Settings" />
</div>
</form>
<h2>Trigger Time Beacon</h3>
<form action="/trigger-time" class="styled-form no-top-margin">
<div class="button-group">
<input class="btn" type="submit" value="trigger time beacon" />
</div>
</form>
</div>
<div id="Idle Handling" class="tabcontent">
<h2>Idle Beacon</h2>
<form action="/setidlebeacon" class="styled-form no-top-margin">
<label for="idle_enable">Enable</label>
<input type="checkbox" name="idle_enable"/>
<label for="idle_interval">Interval (minutes)</label>
<input type="number" placeholder="5m" id="idle_interval" name="idle_interval" min="1" max="1440" step="1" value="5" />
<label for="idle_mode">Mode</label>
<select name="idle_mode">
<option value="0">Empty RIC 0</option>
<option value="1">Timeslotted 10s 4/1</option>
<option value="2">Timeslotted 10s 4/2</option>
<option value="3">Timeslotted 10s 4/3</option>
<option value="4">Timeslotted 10s 4/4</option>
</select>
<div class="button-group">
<input class="btn" type="submit" value="Set Idle Beacon Settings" />
</div>
</form>
</div>
<div id="About" class="tabcontent">
</div>
</div>
<script src="script.js"></script>
</body>
</html>