You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+10-10
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# dashio
2
2
3
-
[Dashio](http://dashio.io) - a python library to connect and display widgets on the IotDashboard app.
3
+
[DashIO](http://dashio.io) - a python library to connect and display widgets on the DashIO app.
4
4
5
5
## Getting Started
6
6
@@ -28,11 +28,11 @@ pip3 install dashio
28
28
29
29
## Guide
30
30
31
-
This guide covers the dashio python library. For information on the [IoTDashboard](https://dashio.io/dashboard) phone app please visit the website.
31
+
This guide covers the dashio python library. For information on the [DashIO](https://dashio.io/dashboard) phone app please visit the website.
32
32
33
33
### Basics
34
34
35
-
So what is dashio? It is a quick effortless way to connect your IoT device to your phone. It allows easy setup of controls such as dials, text boxes, maps, graphs, notifications..., from your device. You can define the look and layout of the controls on your phone from your IoT device. There are three methods to connect to your phone tcp, mqtt, dash, and BLE. What's Dash then? Dash is a mqtt server with extra bits added in to allow you to send notifications, share your devices, and save your settings from your phone via the IoTDashboard app.
35
+
So what is dashio? It is a quick effortless way to connect your IoT device to your phone. It allows easy setup of controls such as dials, text boxes, maps, graphs, notifications..., from your device. You can define the look and layout of the controls on your phone from your IoT device. There are three methods to connect to your phone tcp, mqtt, dash, and BLE. What's Dash then? Dash is a mqtt server with extra bits added in to allow you to send notifications, share your devices, and save your settings from your phone via the DashIO app.
36
36
37
37
Show me some code!
38
38
@@ -52,9 +52,9 @@ while True:
52
52
time.sleep(5)
53
53
```
54
54
55
-
This is about the fewest lines of code to get talking to the app. There is a lot happening under the hood to make this work. After the import we create a device with three attributes. These attributes describe the device to the app and allow you to distinguish one of your devices from another. The next two lines create a TCP connection and then add the device to the connection. The connection will be created with the default setting of port 5000 and will also advertise the service using zeroconf, also known as bonjour. This allows IoTDashboard to find your device. After that we create a dial add it to the device and then every five seconds send a randomly generated dial value to the IoTDashboard app.
55
+
This is about the fewest lines of code to get talking to the app. There is a lot happening under the hood to make this work. After the import we create a device with three attributes. These attributes describe the device to the app and allow you to distinguish one of your devices from another. The next two lines create a TCP connection and then add the device to the connection. The connection will be created with the default setting of port 5000 and will also advertise the service using zeroconf, also known as bonjour. This allows the DashIO app to find your device. After that we create a dial add it to the device and then every five seconds send a randomly generated dial value to the DashIO app.
56
56
57
-
This device is discoverable by the app. It would be nice to have IoTDashboard automagically setup a new DeviceView and place your control on the new DeviceView. To do that we need to add a few more lines of code:
57
+
This device is discoverable by the app. It would be nice to have the DashIO app automagically setup a new DeviceView and place your control on the new DeviceView. To do that we need to add a few more lines of code:
58
58
59
59
```python
60
60
import dashio
@@ -78,7 +78,7 @@ while True:
78
78
79
79
First we altered the instantiation of a Dial by including a control_position. This allows us to place the control at a set location. The added lines instantiated a DeviceView control, which we than added the dial control. Finally we added the dv to the device.
80
80
81
-
The next piece of the puzzle to consider is how do we get data from the IoTDashboard app? Lets add a Knob and connect it to the Dial:
81
+
The next piece of the puzzle to consider is how do we get data from the DashIO app? Lets add a Knob and connect it to the Dial:
82
82
83
83
```python
84
84
import dashio
@@ -107,12 +107,12 @@ while True:
107
107
time.sleep(5)
108
108
```
109
109
110
-
First we added a function that sets the dial value. Next we added a Knob control and set our new function to be called when it receives data from the IoTDashboard app.
111
-
We also add it to the DeviceView and to the device. Now when the knob in IoTDashoard is moved the dial is set to the same value.
110
+
First we added a function that sets the dial value. Next we added a Knob control and set our new function to be called when it receives data from the DashIO app.
111
+
We also add it to the DeviceView and to the device. Now when the knob in the DashIO app is moved the dial is set to the same value.
112
112
113
113
### Controls
114
114
115
-
Controls are objects that represent actions and widgets in the IoTDashboard application. Controls that are displayed have a ```dashio.ControlPosition``` that is composed of four size and position variables: x_position_ratio, y_position_ratio, width_ratio, height_ratio. The first two are position ratios that place the top left corner of the widget on the DeviceView. The last two are ratios that govern the size of the widget. The ratios are propertional to the size of the screen with the full size of the screen representing 1.0.
115
+
Controls are objects that represent actions and widgets in the DashIO application. Controls that are displayed have a ```dashio.ControlPosition``` that is composed of four size and position variables: x_position_ratio, y_position_ratio, width_ratio, height_ratio. The first two are position ratios that place the top left corner of the widget on the DeviceView. The last two are ratios that govern the size of the widget. The ratios are propertional to the size of the screen with the full size of the screen representing 1.0.
An alarm sends a notification throught the dashio mqtt server to registered phones. The ability to send alarms to specific phones, and the notification sound can be configured through the IoTDasboard app. Alarms are only available if you have an account registered on the dashio server and you send the the alarm through a dash connection.
124
+
An alarm sends a notification throught the dashio mqtt server to registered phones. The ability to send alarms to specific phones, and the notification sound can be configured through the DashIO app. Alarms are only available if you have an account registered on the dashio server and you send the the alarm through a dash connection.
0 commit comments