Skip to content

Commit

Permalink
Documentation update
Browse files Browse the repository at this point in the history
Fix typos and added better descriptions.
  • Loading branch information
chaveiro committed Sep 15, 2021
1 parent 7a437f6 commit 4769bdb
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 12 deletions.
8 changes: 5 additions & 3 deletions Views/device_api.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,11 @@
<table class="table">
<tr><td><?php echo _('List devices'); ?></td><td><a href="<?php echo $path; ?>device/list.json"><?php echo $path; ?>device/list.json</a></td></tr>
<tr><td><?php echo _('Get device details'); ?></td><td><a href="<?php echo $path; ?>device/get.json?id=1"><?php echo $path; ?>device/get.json?id=1</a></td></tr>
<tr><td><?php echo _('Add a device'); ?></td><td><a href="<?php echo $path; ?>device/create.json?nodeid=Test&name=Test"><?php echo $path; ?>device/create.json?nodeid=Test&name=Test</a></td></tr>
<tr><td><?php echo _('Add a device'); ?></td><td><a href="<?php echo $path; ?>device/create.json?nodeid=Room&name=Test&description=House&type=test&dkey=DEVICEKEY"><?php echo $path; ?>device/set.json?nodeid=Room&name=Test&description=House&type=test&dkey=DEVICEKEY</a></td></tr>
<tr><td><?php echo _('Delete device'); ?></td><td><a href="<?php echo $path; ?>device/delete.json?id=1"><?php echo $path; ?>device/delete.json?id=1</a></td></tr>
<tr><td><?php echo _('Update device'); ?></td><td><a href="<?php echo $path; ?>device/set.json?id=1&fields={%22name%22:%22Test%22,%22description%22:%22Room%22,%22nodeid%22:%22House%22,%22type%22:%22test%22}"><?php echo $path; ?>device/set.json?id=1&fields={"name":"Test","description":"Room","nodeid":"House","type":"test"}</a></td></tr>
<tr><td><?php echo _('Update device'); ?></td><td><a href="<?php echo $path; ?>device/set.json?id=1&nodeid=Room&name=Test&description=House&type=test&dkey=DEVICEKEY"><?php echo $path; ?>device/set.json?id=1&nodeid=Room&name=Test&description=House&type=test&dkey=DEVICEKEY</a></td></tr>
<tr><td><?php echo _('Generate a random device key'); ?></td><td><a href="<?php echo $path; ?>device/generatekey.json"><?php echo $path; ?>device/generatekey.json</a></td></tr>
<tr><td><?php echo _('Set a new random device key'); ?></td><td><a href="<?php echo $path; ?>device/setNewDeviceKey.json?id=1"><?php echo $path; ?>device/setNewDeviceKey.json?id=1</a></td></tr>
<tr><td><?php echo _('Initialize device'); ?></td><td><a href="<?php echo $path; ?>device/init.json?id=1"><?php echo $path; ?>device/init.json?id=1</a></td></tr>
</table>

Expand All @@ -60,7 +62,7 @@
<tr><td><?php echo _('List template metadata'); ?></td><td><a href="<?php echo $path; ?>device/template/listshort.json"><?php echo $path; ?>device/template/listshort.json</a></td></tr>
<tr><td><?php echo _('List templates'); ?></td><td><a href="<?php echo $path; ?>device/template/list.json"><?php echo $path; ?>device/template/list.json</a></td></tr>
<tr><td><?php echo _('Reload templates'); ?></td><td><a href="<?php echo $path; ?>device/template/reload.json"><?php echo $path; ?>device/template/reload.json</a></td></tr>
<tr><td><?php echo _('get template details'); ?></td><td><a href="<?php echo $path; ?>device/template/get.json?type=example"><?php echo $path; ?>device/template/get.json?type=example</a></td></tr>
<tr><td><?php echo _('Get template details'); ?></td><td><a href="<?php echo $path; ?>device/template/get.json?type=example"><?php echo $path; ?>device/template/get.json?type=example</a></td></tr>
<tr><td><?php echo _('Prepare device initialization'); ?></td><td><a href="<?php echo $path; ?>device/template/prepare.json?id=1"><?php echo $path; ?>device/template/prepare.json?id=1</a></td></tr>
</table>

Expand Down
12 changes: 6 additions & 6 deletions Views/device_view.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,19 @@

<div>
<div id="api-help-header" style="float:right;"><a href="api"><?php echo _('Devices Help'); ?></a></div>
<div id="device-header"><h2><?php echo _('Devices'); ?></h2></div>
<div id="device-header"><h2><?php echo _('Devices Location'); ?></h2></div>

<div id="table"></div>

<div id="device-none" class="hide">
<div class="alert alert-block">
<h4 class="alert-heading"><?php echo _('No devices'); ?></h4><br>
<p>
<?php echo _('Devices are used to configure and prepare the communication with different physical devices.'); ?>
<?php echo _('Devices are used to configure and prepare the communication with different physical devices. Devices are grouped by Location for easy tracking when deploying at scale.'); ?>
<br><br>
<?php echo _('A device configures and prepares inputs, feeds possible other settings, representing e.g. different registers of defined metering units.'); ?>
<?php echo _('A device configures and prepares inputs, feeds and other possible settings. e.g. representing different registers of defined metering units.'); ?>
<br>
<?php echo _('You may want the next link as a guide for generating your request: '); ?><a href="api"><?php echo _('Device API helper'); ?></a>
<?php echo _('Follow the next link as a guide for generating your request: '); ?><a href="api"><?php echo _('Device API helper'); ?></a>
</p>
</div>
</div>
Expand All @@ -48,8 +48,8 @@
<button id="device-reload" class="btn btn-small" >&nbsp;<i class="icon-refresh" ></i>&nbsp;<?php echo _('Reload device templates'); ?></button>
<?php } ?>
</div>
<div id="device-loader" class="ajax-loader"></div>
<div id="device-loader" class="ajax-loader"></div>
</div>

<?php require "Modules/device/Views/device_dialog.php"; ?>
Expand Down
2 changes: 1 addition & 1 deletion data/Gtronica/AirSensor.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "AirSensor",
"name": "Air Sensor",
"category": "Gtronica",
"group": "Custom",
"description": "Automatic inputs and feeds creation for IKEA Vindriktning + BME280 with a Tasmota device inside and websend rules.",
Expand Down
2 changes: 1 addition & 1 deletion data/Gtronica/PowerMeter.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "PowerMeter",
"name": "Power Meter",
"category": "Gtronica",
"group": "Custom",
"description": "Automatic inputs and feeds creation for Hiking DDS238-2 WIFI Tasmota device and websend rules.",
Expand Down
2 changes: 1 addition & 1 deletion data/Gtronica/SensorSolar.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ "name": "SensorSolar",
{ "name": "Sensor Solar",
"category": "Gtronica",
"group": "Custom",
"description": "Automatic inputs and feeds creation for gtronica.com Multi Sensors (Solar) device.",
Expand Down

0 comments on commit 4769bdb

Please sign in to comment.