diff --git a/.gitignore b/.gitignore index 742d224d1..64d9d523d 100755 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ config/pialert.conf db/* front/log/* +**/%40eaDir/ +**/@eaDir/ diff --git a/docker-compose.yml b/docker-compose.yml index 36febe49c..ff2cfab4f 100755 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,9 +7,9 @@ services: network_mode: "host" restart: unless-stopped volumes: - - ${APP_DATA_LOCATION}/pialert/config:/home/pi/pialert/config + - ${APP_DATA_LOCATION}/pialert/config2:/home/pi/pialert/config # - ${APP_DATA_LOCATION}/pialert/db/pialert.db:/home/pi/pialert/db/pialert.db - - ${APP_DATA_LOCATION}/pialert/db:/home/pi/pialert/db + - ${APP_DATA_LOCATION}/pialert/db2:/home/pi/pialert/db # (optional) useful for debugging if you have issues setting up the container - ${LOGS_LOCATION}:/home/pi/pialert/front/log # DELETE START anyone trying to use this file: comment out / delete BELOW lines, they are only for development purposes diff --git a/docs/NETWORK_TREE.md b/docs/NETWORK_TREE.md new file mode 100644 index 000000000..fdf5675dd --- /dev/null +++ b/docs/NETWORK_TREE.md @@ -0,0 +1,43 @@ +## How to setup your Network page + +Make sure you have a root device with the MAC `Internet` (No other MAC addresses are currently support as root) + +To setup a device named `rapberrypi` as a `Switch` in our network. + +### 1) Device details page + +- Go to the `Devices` (1) page: + +![Device details](/docs/img/NETWORK_TREE/Device_Details_Network_Type.png) + +- In the (2) `Details` tab navigate to the the `Type` (3) dropdown and select the type `Switch` (4). + +> Note: Only the following device types will show up as selectable Network nodes ( = devices you can connect other devices to): +> AP, Firewall, Gateway, PLC, Powerline, Router, Switch, USB LAN Adapter, USB WIFI Adapter and WLAN. + +- Assign a device to your root device from the `Node` (5) dropdown whitch has the MAC `Internet` (6) (Your name may differ, but the MAC needs to be set to `Internet` - this is done by default). + +- Save your changes (7) + +### 1) Network page + +- Navigate to your `Network` (1) page: + +![Network page](/docs/img/NETWORK_TREE/Network_Page.png) + +- Notice the newly added `raspberrypi` (2) tab which now represents a network node, also showing up in the tree (3). +- As we asssigned the `raspberrypi` in the previous 1) Device details page section to the `Internet` parent network node in step (6), the link is also showing up in the tree diagram (4) +- We can now assign the device `(AppleTV)` (5) to this `raspberrypi` node, representing a network Switch in this example + +### 1) Network page with 2 levels + +- After clicking the `Assign` button in the previous section, the `(AppleTV)` (1) device is now connected to our `raspberrypi` (2). + +![Device details](/docs/img/NETWORK_TREE/Network_Page_2_Levels.png) + +- You can see the `raspberrypi` represents the Network node type `Switch` (3) +- The `(AppleTV)` to `raspberrypi` connection is also displayed in the table of `Connected devices` (4). +- You can also see that our `raspberrypi` node is connected to it's Parent network device node with the MAC `Internet` (5). This connection again shows up in the tree (6) as well. + + + diff --git a/docs/img/NETWORK_TREE/Device_Details_Network_Type.png b/docs/img/NETWORK_TREE/Device_Details_Network_Type.png new file mode 100755 index 000000000..e01d3aad3 Binary files /dev/null and b/docs/img/NETWORK_TREE/Device_Details_Network_Type.png differ diff --git a/docs/img/NETWORK_TREE/Network_Page.png b/docs/img/NETWORK_TREE/Network_Page.png new file mode 100755 index 000000000..72e31cf8c Binary files /dev/null and b/docs/img/NETWORK_TREE/Network_Page.png differ diff --git a/docs/img/NETWORK_TREE/Network_Page_2_Levels.png b/docs/img/NETWORK_TREE/Network_Page_2_Levels.png new file mode 100755 index 000000000..af558523b Binary files /dev/null and b/docs/img/NETWORK_TREE/Network_Page_2_Levels.png differ diff --git a/front/network.php b/front/network.php index 1548b31cf..9d8b35310 100755 --- a/front/network.php +++ b/front/network.php @@ -359,7 +359,7 @@ dev_Name as name, dev_LastIP as last_ip, dev_Network_Node_MAC_ADDR - FROM Devices WHERE (dev_Network_Node_MAC_ADDR is null or dev_Network_Node_MAC_ADDR = "" or dev_Network_Node_MAC_ADDR = " " ) and dev_MAC not like "%internet%" order by name asc'; + FROM Devices WHERE (dev_Network_Node_MAC_ADDR is null or dev_Network_Node_MAC_ADDR = "" or dev_Network_Node_MAC_ADDR = " " or dev_Network_Node_MAC_ADDR = "undefined") and dev_MAC not like "%internet%" order by name asc'; global $db; $func_result = $db->query($func_sql);