dashio 3.6.2__tar.gz → 3.8.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {dashio-3.6.2 → dashio-3.8.0}/Examples/RaspberryPi/TestBLE.py +3 -3
- {dashio-3.6.2 → dashio-3.8.0}/Examples/RaspberryPi/pi_sense_hat.py +1 -1
- {dashio-3.6.2 → dashio-3.8.0}/Examples/RaspberryPi/pi_sense_hat_tsgraph.py +4 -4
- {dashio-3.6.2 → dashio-3.8.0}/Examples/alarms.py +7 -7
- {dashio-3.6.2 → dashio-3.8.0}/Examples/all_controls.py +22 -21
- {dashio-3.6.2 → dashio-3.8.0}/Examples/bbb_temperature.py +7 -7
- {dashio-3.6.2 → dashio-3.8.0}/Examples/dashio_coms_module.py +4 -4
- {dashio-3.6.2 → dashio-3.8.0}/Examples/dashio_test.py +1 -1
- {dashio-3.6.2 → dashio-3.8.0}/Examples/dual_connection_TCP_DASH.py +3 -3
- {dashio-3.6.2 → dashio-3.8.0}/Examples/ex01.py +1 -1
- {dashio-3.6.2 → dashio-3.8.0}/Examples/ex02.py +2 -2
- {dashio-3.6.2 → dashio-3.8.0}/Examples/ex03.py +2 -2
- dashio-3.8.0/Examples/ex04.py +31 -0
- {dashio-3.6.2 → dashio-3.8.0}/Examples/ex05_SIM767X.py +9 -9
- dashio-3.8.0/Examples/ex06.py +25 -0
- {dashio-3.6.2 → dashio-3.8.0}/Examples/greenhouse/greenhouse.py +79 -56
- {dashio-3.6.2 → dashio-3.8.0}/Examples/server_monitor/server_monitor.py +35 -32
- {dashio-3.6.2 → dashio-3.8.0}/Examples/system_monitor.py +2 -2
- {dashio-3.6.2 → dashio-3.8.0}/Examples/tcp_example.py +4 -4
- {dashio-3.6.2 → dashio-3.8.0}/Examples/time_graphs.py +1 -1
- {dashio-3.6.2 → dashio-3.8.0}/PKG-INFO +76 -88
- {dashio-3.6.2 → dashio-3.8.0}/README.md +75 -87
- {dashio-3.6.2 → dashio-3.8.0}/dashio/__init__.py +0 -4
- {dashio-3.6.2 → dashio-3.8.0}/dashio/constants.py +1 -0
- {dashio-3.6.2 → dashio-3.8.0}/dashio/dash_connection.py +53 -9
- {dashio-3.6.2 → dashio-3.8.0}/dashio/device.py +114 -13
- {dashio-3.6.2 → dashio-3.8.0}/dashio/iotcontrol/control.py +4 -1
- {dashio-3.6.2 → dashio-3.8.0}/dashio/iotcontrol/event.py +9 -3
- {dashio-3.6.2 → dashio-3.8.0}/dashio/iotcontrol/event_log.py +3 -6
- {dashio-3.6.2 → dashio-3.8.0}/dashio/iotcontrol/map.py +4 -4
- {dashio-3.6.2 → dashio-3.8.0}/dashio/load_config.py +8 -0
- dashio-3.8.0/dashio/package.py +60 -0
- {dashio-3.6.2 → dashio-3.8.0}/dashio/tcp_connection.py +2 -1
- {dashio-3.6.2 → dashio-3.8.0}/dashio.egg-info/PKG-INFO +76 -88
- {dashio-3.6.2 → dashio-3.8.0}/dashio.egg-info/SOURCES.txt +5 -0
- {dashio-3.6.2 → dashio-3.8.0}/pyproject.toml +1 -1
- {dashio-3.6.2 → dashio-3.8.0}/tests/test_button.py +12 -12
- {dashio-3.6.2 → dashio-3.8.0}/tests/test_button_group.py +3 -3
- dashio-3.8.0/tests/test_control.py +27 -0
- dashio-3.8.0/tests/test_dashconnection.py +63 -0
- {dashio-3.6.2 → dashio-3.8.0}/tests/test_device_layouts.py +1 -1
- dashio-3.8.0/tests/test_device_setup.py +83 -0
- {dashio-3.6.2 → dashio-3.8.0}/tests/test_direction.py +9 -9
- {dashio-3.6.2 → dashio-3.8.0}/tests/test_event_log.py +3 -3
- dashio-3.8.0/tests/test_history_replies.py +87 -0
- dashio-3.8.0/tests/test_package.py +180 -0
- {dashio-3.6.2 → dashio-3.8.0}/tests/test_selector.py +3 -3
- {dashio-3.6.2 → dashio-3.8.0}/tests/test_slider.py +13 -13
- dashio-3.8.0/tests/test_tcpconnection.py +22 -0
- {dashio-3.6.2 → dashio-3.8.0}/tests/test_textbox.py +9 -9
- {dashio-3.6.2 → dashio-3.8.0}/tests/test_time_graph.py +8 -8
- dashio-3.6.2/Examples/ex04.py +0 -31
- dashio-3.6.2/tests/test_control.py +0 -18
- dashio-3.6.2/tests/test_dashconnection.py +0 -31
- dashio-3.6.2/tests/test_tcpconnection.py +0 -12
- {dashio-3.6.2 → dashio-3.8.0}/Examples/RaspberryPi/ble_set_wifi.py +0 -0
- {dashio-3.6.2 → dashio-3.8.0}/Examples/as_test.py +0 -0
- {dashio-3.6.2 → dashio-3.8.0}/Examples/event_log.py +0 -0
- {dashio-3.6.2 → dashio-3.8.0}/Examples/ex00.py +0 -0
- {dashio-3.6.2 → dashio-3.8.0}/Examples/greenhouse/simulator.py +0 -0
- {dashio-3.6.2 → dashio-3.8.0}/Examples/map.py +0 -0
- {dashio-3.6.2 → dashio-3.8.0}/LICENSE +0 -0
- {dashio-3.6.2 → dashio-3.8.0}/dashio/ble_connection.py +0 -0
- {dashio-3.6.2 → dashio-3.8.0}/dashio/comms_module_connection.py +0 -0
- {dashio-3.6.2 → dashio-3.8.0}/dashio/iotcontrol/__init__.py +0 -0
- {dashio-3.6.2 → dashio-3.8.0}/dashio/iotcontrol/alarm.py +0 -0
- {dashio-3.6.2 → dashio-3.8.0}/dashio/iotcontrol/audio_visual_display.py +0 -0
- {dashio-3.6.2 → dashio-3.8.0}/dashio/iotcontrol/button.py +0 -0
- {dashio-3.6.2 → dashio-3.8.0}/dashio/iotcontrol/button_group.py +0 -0
- {dashio-3.6.2 → dashio-3.8.0}/dashio/iotcontrol/chart.py +0 -0
- {dashio-3.6.2 → dashio-3.8.0}/dashio/iotcontrol/color_picker.py +0 -0
- {dashio-3.6.2 → dashio-3.8.0}/dashio/iotcontrol/device_view.py +0 -0
- {dashio-3.6.2 → dashio-3.8.0}/dashio/iotcontrol/dial.py +0 -0
- {dashio-3.6.2 → dashio-3.8.0}/dashio/iotcontrol/direction.py +0 -0
- {dashio-3.6.2 → dashio-3.8.0}/dashio/iotcontrol/enums.py +0 -0
- {dashio-3.6.2 → dashio-3.8.0}/dashio/iotcontrol/knob.py +0 -0
- {dashio-3.6.2 → dashio-3.8.0}/dashio/iotcontrol/label.py +0 -0
- {dashio-3.6.2 → dashio-3.8.0}/dashio/iotcontrol/menu.py +0 -0
- {dashio-3.6.2 → dashio-3.8.0}/dashio/iotcontrol/py.typed +0 -0
- {dashio-3.6.2 → dashio-3.8.0}/dashio/iotcontrol/ring_buffer.py +0 -0
- {dashio-3.6.2 → dashio-3.8.0}/dashio/iotcontrol/selector.py +0 -0
- {dashio-3.6.2 → dashio-3.8.0}/dashio/iotcontrol/slider.py +0 -0
- {dashio-3.6.2 → dashio-3.8.0}/dashio/iotcontrol/table.py +0 -0
- {dashio-3.6.2 → dashio-3.8.0}/dashio/iotcontrol/textbox.py +0 -0
- {dashio-3.6.2 → dashio-3.8.0}/dashio/iotcontrol/time_graph.py +0 -0
- {dashio-3.6.2 → dashio-3.8.0}/dashio/ip.py +0 -0
- {dashio-3.6.2 → dashio-3.8.0}/dashio/lte_767x_connection.py +0 -0
- {dashio-3.6.2 → dashio-3.8.0}/dashio/py.typed +0 -0
- {dashio-3.6.2 → dashio-3.8.0}/dashio/quectel_EG800Q.py +0 -0
- {dashio-3.6.2 → dashio-3.8.0}/dashio/schedular.py +0 -0
- {dashio-3.6.2 → dashio-3.8.0}/dashio/sim767x.py +0 -0
- {dashio-3.6.2 → dashio-3.8.0}/dashio/telit_LE910Q1.py +0 -0
- {dashio-3.6.2 → dashio-3.8.0}/dashio/utilities/__init__.py +0 -0
- {dashio-3.6.2 → dashio-3.8.0}/dashio/utilities/c64_decode.py +0 -0
- {dashio-3.6.2 → dashio-3.8.0}/dashio/utilities/c64_encode.py +0 -0
- {dashio-3.6.2 → dashio-3.8.0}/dashio/utilities/dashio_data_exporter.py +0 -0
- {dashio-3.6.2 → dashio-3.8.0}/dashio/zeroconf_service.py +0 -0
- {dashio-3.6.2 → dashio-3.8.0}/dashio/zmq_connection.py +0 -0
- {dashio-3.6.2 → dashio-3.8.0}/dashio.egg-info/dependency_links.txt +0 -0
- {dashio-3.6.2 → dashio-3.8.0}/dashio.egg-info/entry_points.txt +0 -0
- {dashio-3.6.2 → dashio-3.8.0}/dashio.egg-info/not-zip-safe +0 -0
- {dashio-3.6.2 → dashio-3.8.0}/dashio.egg-info/requires.txt +0 -0
- {dashio-3.6.2 → dashio-3.8.0}/dashio.egg-info/top_level.txt +0 -0
- {dashio-3.6.2 → dashio-3.8.0}/setup.cfg +0 -0
- {dashio-3.6.2 → dashio-3.8.0}/tests/test_alarm.py +0 -0
- {dashio-3.6.2 → dashio-3.8.0}/tests/test_cfg_round_trip.py +0 -0
- {dashio-3.6.2 → dashio-3.8.0}/tests/test_chart.py +0 -0
- {dashio-3.6.2 → dashio-3.8.0}/tests/test_dashdevice.py +0 -0
- {dashio-3.6.2 → dashio-3.8.0}/tests/test_device_view.py +0 -0
- {dashio-3.6.2 → dashio-3.8.0}/tests/test_dial.py +0 -0
- {dashio-3.6.2 → dashio-3.8.0}/tests/test_knob.py +0 -0
- {dashio-3.6.2 → dashio-3.8.0}/tests/test_label.py +0 -0
- {dashio-3.6.2 → dashio-3.8.0}/tests/test_map.py +0 -0
- {dashio-3.6.2 → dashio-3.8.0}/tests/test_menu.py +0 -0
- {dashio-3.6.2 → dashio-3.8.0}/tests/test_zqmconnection.py +0 -0
|
@@ -149,7 +149,7 @@ class TestControls:
|
|
|
149
149
|
self.page_test.add_control(self.up_btn)
|
|
150
150
|
|
|
151
151
|
self.down_btn = dashio.Button(
|
|
152
|
-
"
|
|
152
|
+
"downBtn",
|
|
153
153
|
title="Down",
|
|
154
154
|
icon_name=dashio.Icon.DOWN,
|
|
155
155
|
on_color=dashio.Color.GREEN,
|
|
@@ -171,7 +171,7 @@ class TestControls:
|
|
|
171
171
|
self.page_test.add_control(self.sldr_cntrl)
|
|
172
172
|
|
|
173
173
|
self.sldr_dbl_cntrl = dashio.Slider(
|
|
174
|
-
"
|
|
174
|
+
"sldrDbl",
|
|
175
175
|
title="Slider Double",
|
|
176
176
|
bar_max=5,
|
|
177
177
|
slider_enabled=True,
|
|
@@ -226,7 +226,7 @@ class TestControls:
|
|
|
226
226
|
self.page_test.add_control(self.comp_control)
|
|
227
227
|
|
|
228
228
|
self.selector_ctrl = dashio.Selector(
|
|
229
|
-
"
|
|
229
|
+
"testSel", "A Selector", control_position=dashio.ControlPosition(0.24, 0.01, 0.54, 0.13)
|
|
230
230
|
)
|
|
231
231
|
self.selector_ctrl.add_receive_message_callback(self.selector_ctrl_handler)
|
|
232
232
|
self.selector_ctrl.add_selection("First")
|
|
@@ -118,7 +118,7 @@ class TestColorPicker:
|
|
|
118
118
|
self.connection = args.connection
|
|
119
119
|
self.page_name = "Color Picker: " + platform.node()
|
|
120
120
|
|
|
121
|
-
self.page_test = dashio.DeviceView("
|
|
121
|
+
self.page_test = dashio.DeviceView("clrPick", self.page_name)
|
|
122
122
|
self.c_picker = dashio.ColorPicker("CPKR1", control_position=dashio.ControlPosition(0.0, 0.0, 1.0, 0.45))
|
|
123
123
|
self.c_picker.add_receive_message_callback(self.color_picker_handler)
|
|
124
124
|
self.page_test.add_control(self.c_picker)
|
|
@@ -56,8 +56,8 @@ class SenseGraphTS:
|
|
|
56
56
|
|
|
57
57
|
self.page_name = "SenseHat: " + platform.node()
|
|
58
58
|
self.page1_thp = dashio.DeviceView("SHDials", "SenseHat Dials", icon=dashio.Icon.WEATHER)
|
|
59
|
-
self.page2_thp = dashio.DeviceView("
|
|
60
|
-
self.page3_thp = dashio.DeviceView("
|
|
59
|
+
self.page2_thp = dashio.DeviceView("shTemp", "Temperature Humidity", icon=dashio.Icon.TEMPERATURE)
|
|
60
|
+
self.page3_thp = dashio.DeviceView("shPress", "SenseHat Pressure", icon=dashio.Icon.FAN)
|
|
61
61
|
self.temperature_dial = dashio.Dial(
|
|
62
62
|
"tempC",
|
|
63
63
|
"Temperature",
|
|
@@ -97,7 +97,7 @@ class SenseGraphTS:
|
|
|
97
97
|
max_data_points=100
|
|
98
98
|
)
|
|
99
99
|
self.temp_hum = dashio.TimeGraph(
|
|
100
|
-
"
|
|
100
|
+
"tempHum",
|
|
101
101
|
"Temperature Humidity",
|
|
102
102
|
control_position=dashio.ControlPosition(0.0, 0.0, 1.0, 0.4),
|
|
103
103
|
y_axis_label='Temperature',
|
|
@@ -127,7 +127,7 @@ class SenseGraphTS:
|
|
|
127
127
|
max_data_points=100
|
|
128
128
|
)
|
|
129
129
|
self.pressure_graph = dashio.TimeGraph(
|
|
130
|
-
"
|
|
130
|
+
"pGraph",
|
|
131
131
|
"SenseHat Pressure",
|
|
132
132
|
control_position=dashio.ControlPosition(0.0, 0.0, 1.0, 0.4),
|
|
133
133
|
y_axis_min=900,
|
|
@@ -115,9 +115,9 @@ class TestControls:
|
|
|
115
115
|
dash_conn = dashio.DashConnection(args.username, args.password, host=args.server, port=args.port)
|
|
116
116
|
dash_conn.add_device(device)
|
|
117
117
|
|
|
118
|
-
self.tadevice_view = dashio.DeviceView("
|
|
118
|
+
self.tadevice_view = dashio.DeviceView("almView", "Test Alarm")
|
|
119
119
|
self.alarm_btn1 = dashio.Button(
|
|
120
|
-
"
|
|
120
|
+
"almBtn1",
|
|
121
121
|
title="A1",
|
|
122
122
|
icon_name=dashio.Icon.BELL,
|
|
123
123
|
on_color=dashio.Color.RED,
|
|
@@ -128,7 +128,7 @@ class TestControls:
|
|
|
128
128
|
device.add_control(self.alarm_btn1)
|
|
129
129
|
|
|
130
130
|
self.alarm_btn2 = dashio.Button(
|
|
131
|
-
"
|
|
131
|
+
"almBtn2",
|
|
132
132
|
title="A2",
|
|
133
133
|
icon_name=dashio.Icon.BELL,
|
|
134
134
|
on_color=dashio.Color.RED,
|
|
@@ -139,7 +139,7 @@ class TestControls:
|
|
|
139
139
|
self.tadevice_view.add_control(self.alarm_btn2)
|
|
140
140
|
|
|
141
141
|
self.alarm_btn3 = dashio.Button(
|
|
142
|
-
"
|
|
142
|
+
"almBtn3",
|
|
143
143
|
title="A3",
|
|
144
144
|
icon_name=dashio.Icon.BELL,
|
|
145
145
|
on_color=dashio.Color.RED,
|
|
@@ -149,9 +149,9 @@ class TestControls:
|
|
|
149
149
|
device.add_control(self.alarm_btn3)
|
|
150
150
|
self.tadevice_view.add_control(self.alarm_btn3)
|
|
151
151
|
|
|
152
|
-
self.alarm1_ctrl = dashio.Alarm("
|
|
153
|
-
self.alarm2_ctrl = dashio.Alarm("
|
|
154
|
-
self.alarm3_ctrl = dashio.Alarm("
|
|
152
|
+
self.alarm1_ctrl = dashio.Alarm("alarm1")
|
|
153
|
+
self.alarm2_ctrl = dashio.Alarm("alarm2")
|
|
154
|
+
self.alarm3_ctrl = dashio.Alarm("alarm3")
|
|
155
155
|
device.add_control(self.alarm1_ctrl)
|
|
156
156
|
device.add_control(self.alarm2_ctrl)
|
|
157
157
|
device.add_control(self.alarm3_ctrl)
|
|
@@ -30,26 +30,27 @@ import time
|
|
|
30
30
|
import json
|
|
31
31
|
import dashio
|
|
32
32
|
|
|
33
|
-
DEVICE_CFG64 = "
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
33
|
+
DEVICE_CFG64 = "lVhbb6M4FP4riOduN5Cm25m3kNC0KiERMO2sVqMRCW5i1TFZLm261fz39YWLwTbpaKRqYh8fn/Od22c+zJkXmF+Nfz7MbYqLLEX3"\
|
|
34
|
+
"c/LTnP1cPwTmhWEe4fYFZGHxjgBdf7pzXY+uv8Gk2AdxAVOybJGFHOBkhdH7CgcAgTin4kVWArL1vk5zSCRxLT8ii3sAd/uiWbkc"\
|
|
35
|
+
"X43/mpD1U1+YKj/GGcAFNy1GaFZkiBpRwIKbNTVmKUozY82sbbZqVVTEWUXRamn++kE2Q29eOb2Js2WaMB3LcEEPkhWmi51BJaBr"\
|
|
36
|
+
"OYIJyFwcbxBIWr+IaANM6LLTGkMPEFduZyB5jKla4thI5S5dzPfp2xLiZXwiC88xyultnfgwDxQoXt8wEHXeD8epE9PRpXVD/4kw"\
|
|
37
|
+
"hwwHUxfSA7OXufWC000DY0BAq3CfRRXwsoImAzqOFiAvQoDMYaeERCDCYFukmQqd0Rd+gyZKytTrJjpzI3I87sQzsTSE/7FgXun1"\
|
|
38
|
+
"dhyKZhZfQ3cgTiDe5VSX6cUb7iXfntns75j9vTJ/qKyzhzGRKvSYgS3MudyIm1AeML1+MlCPiBr2RHWtt7ggW+NJF/CIVoU6Jy7t"\
|
|
39
|
+
"G8ueMMycaLHmoOV1yTjT8H6mOahKBWcRrBk4kCz78YFXLcDlQOH1UppltN213ymLIsXGIkvLI8slcCo6Ozu6Y7zBYm9EdG8Y9l0G"\
|
|
40
|
+
"k0cI3tqykku8La0+6jVcyylDi/7Xq7NNCqgyXxt4F8Hq21pVBdbk2j7TJDq4N6l5vgujWlQR0psmpmJ35QXlfo+4jxT8KYI7Zo/n"\
|
|
41
|
+
"3kbMGpTm4GFD2lZImlcLrHAxPWdUVssl9z1iefOySaL3Iz/heaau+ypsr9qqBoASw4KWkalCe2wxsKXgPafZIWaJ5q98l9kcH+mt"\
|
|
42
|
+
"vXnUr9rBweatFtr2WsEvt4VzUcWG+0okDC/dSdC69MaBHFOm6KAL8/upp/XBtngghB4SdOerotgmX0bkX3f2ylAQgKgYtQ+Xhw3I"\
|
|
43
|
+
"RANnrh+57KYExugWEpjE4dZHhfpg9YNn67FWzvuB8hQGbR/4GiGhNubE5E6aHv7MmXEpxAXosR1ej6TT3lVBmJ5gvqzuG0mVxQRp"\
|
|
44
|
+
"zVAx1iiCoq4EcUbAAyAdNj7ulZOJnfbLgxNn9ThqFVINfxsx+Xmm89amMguIsSM94Fy0SRqpZtVM1NY0B3siqGS3j6pUrshOH+lF"\
|
|
45
|
+
"BgBW5cfvjIpOpDVcry6TubtYh2Y/Lcjl9Eynb8ZoindMZKSjeZ8btU01dd8VqyWf4U0y4kNV94+PT9UMaGxEiPB6djr/ahw2R+v6"\
|
|
46
|
+
"j/ElSrc8n0mZzhoKM6Y3EUuclx1OoizGOTNz+16THbJHcuO2ZWz2qJrWrRLbFrUIhRFvX8xqq1l92sMCGOEhfQH1npNmiRBmhURE"\
|
|
47
|
+
"fXPSk8LCfE9+clvaEdecEQy3rnvKZEOpW0H6xoCxO/1yFczdIDS7c7g6JfKq8N+SmCN1tjrenKS4/jceMhUj65xjogN8TFFW1QTR"\
|
|
48
|
+
"ZJuCOHXTuzZjoDyGqk1mqS0vpKoFPsiwePBXDsei/8KjE0N6UbYDS9ehVJU3NNwG/NR1Dl3FSo+3wRHFMXkgZzotx18Fy6knJcKD"\
|
|
49
|
+
"75x5hQrDjUIn0qHqJRH51eOd8XPpWV4HSkvwUiy/8D/xKKEnn5/7wDQYsKzgJvXJsib7balKiAqHeKeK2XCIxQL0U0zm+IXxcR4J"\
|
|
50
|
+
"DYKi7c2rS4GaAg4ZSMk06V0X+T/JJRqAhga+yiXpZadEk8GjY74CakptokcOQOhcL+l7e6YtCUA3RGGAC+uqWxEcTbh1faAXS1Z9"\
|
|
51
|
+
"s7sgEplhTXikQU/lNKRMGbceJTspfjZ0sP/tj0zO4jPksKNAYrYSkDdWy+x07LSlu599WJ36955k/Urq2WKQN58dV34Vllv68Psw"\
|
|
52
|
+
"E/AKtyAERXlk5Ipk6UU0Y7W1fd4F4LW6gHCnOROlnyoYTSAVYU4f54pvwdNH67NfWCwVjBPNfK8+xokPzbhMYGq8wryMkUhLf/MZ"\
|
|
53
|
+
"+et/"
|
|
53
54
|
|
|
54
55
|
|
|
55
56
|
class AllControls:
|
|
@@ -130,7 +131,7 @@ class AllControls:
|
|
|
130
131
|
self.avd: dashio.AudioVisualDisplay = self.device.get_control(dashio.ControlName.AVD, "AV1")
|
|
131
132
|
self.avd.url = "https://bit.ly/swswift"
|
|
132
133
|
self.comp_control: dashio.Direction = self.device.get_control(dashio.ControlName.DIR, "COMP1")
|
|
133
|
-
self.selector_ctrl: dashio.Selector = self.device.get_control(dashio.ControlName.SLCTR, "
|
|
134
|
+
self.selector_ctrl: dashio.Selector = self.device.get_control(dashio.ControlName.SLCTR, "testSel")
|
|
134
135
|
self.selector_ctrl.add_selection("First")
|
|
135
136
|
self.selector_ctrl.add_selection("Second")
|
|
136
137
|
self.selector_ctrl.add_selection("Third")
|
|
@@ -117,7 +117,7 @@ class BBB_Temperature:
|
|
|
117
117
|
dash_con.add_device(device)
|
|
118
118
|
|
|
119
119
|
gph_15_minutes = dashio.TimeGraph(
|
|
120
|
-
"
|
|
120
|
+
"temp15M",
|
|
121
121
|
title=f"Temp15M:{args.device_name}",
|
|
122
122
|
y_axis_label="Degrees C",
|
|
123
123
|
y_axis_min=0.0,
|
|
@@ -133,7 +133,7 @@ class BBB_Temperature:
|
|
|
133
133
|
gph_15_minutes.add_line("DegC", line_15_minutes)
|
|
134
134
|
|
|
135
135
|
gph_1_day = dashio.TimeGraph(
|
|
136
|
-
"
|
|
136
|
+
"temp1D",
|
|
137
137
|
title=f"Temp1D:{args.device_name}",
|
|
138
138
|
y_axis_label="Degrees C",
|
|
139
139
|
y_axis_min=0.0,
|
|
@@ -146,7 +146,7 @@ class BBB_Temperature:
|
|
|
146
146
|
gph_1_day.add_line("DegC", line_1_day)
|
|
147
147
|
|
|
148
148
|
gph_1_week = dashio.TimeGraph(
|
|
149
|
-
"
|
|
149
|
+
"temp1W",
|
|
150
150
|
title=f"Temp1W:{args.device_name}",
|
|
151
151
|
y_axis_label="Degrees C",
|
|
152
152
|
y_axis_min=0.0,
|
|
@@ -159,7 +159,7 @@ class BBB_Temperature:
|
|
|
159
159
|
gph_1_week.add_line("DegC", line_1_week)
|
|
160
160
|
|
|
161
161
|
gph_1_year = dashio.TimeGraph(
|
|
162
|
-
"
|
|
162
|
+
"temp1Y",
|
|
163
163
|
title=f"Temp1Y:{args.device_name}",
|
|
164
164
|
y_axis_label="Degrees C",
|
|
165
165
|
y_axis_min=0.0,
|
|
@@ -172,18 +172,18 @@ class BBB_Temperature:
|
|
|
172
172
|
gph_1_year.add_line("DegC", line_1_year)
|
|
173
173
|
|
|
174
174
|
dl_temperature_ctrl = dashio.Dial(
|
|
175
|
-
"
|
|
175
|
+
"tempDl",
|
|
176
176
|
title="Temperature",
|
|
177
177
|
dial_max=50
|
|
178
178
|
)
|
|
179
179
|
dl_daily_max_ctrl = dashio.Dial(
|
|
180
|
-
"
|
|
180
|
+
"tempMax",
|
|
181
181
|
title="Daily Max",
|
|
182
182
|
dial_max=50
|
|
183
183
|
)
|
|
184
184
|
|
|
185
185
|
dl_daily_min_ctrl = dashio.Dial(
|
|
186
|
-
"
|
|
186
|
+
"tempMin",
|
|
187
187
|
title="Daily Min",
|
|
188
188
|
dial_max=50
|
|
189
189
|
)
|
|
@@ -156,7 +156,7 @@ class TestControls:
|
|
|
156
156
|
self.page_test.add_control(self.up_btn)
|
|
157
157
|
|
|
158
158
|
self.down_btn = dashio.Button(
|
|
159
|
-
"
|
|
159
|
+
"downBtn", title="Down", icon_name=dashio.Icon.DOWN, control_position=dashio.ControlPosition(0.02, 0.86, 0.22, 0.12)
|
|
160
160
|
)
|
|
161
161
|
self.down_btn.icon_name = dashio.Icon.DOWN
|
|
162
162
|
self.down_btn.add_receive_message_callback(self.down_btn_event_handler)
|
|
@@ -169,7 +169,7 @@ class TestControls:
|
|
|
169
169
|
self.page_test.add_control(self.sldr_cntrl)
|
|
170
170
|
|
|
171
171
|
self.sldr_dbl_cntrl = dashio.Slider(
|
|
172
|
-
"
|
|
172
|
+
"sldrDbl", title="Slider Double", bar_max=5, slider_enabled=True, red_value=5, bar_mode=dashio.BarMode.MSG, control_position=dashio.ControlPosition(0.78, 0.01, 0.2, 0.98)
|
|
173
173
|
)
|
|
174
174
|
self.sldr_dbl_cntrl.bar2_value = 0
|
|
175
175
|
self.sldr_dbl_cntrl.add_receive_message_callback(self.slider_dbl_event_handler)
|
|
@@ -202,7 +202,7 @@ class TestControls:
|
|
|
202
202
|
self.text_cntrl.add_receive_message_callback(self.text_cntrl_message_handler)
|
|
203
203
|
self.page_test.add_control(self.text_cntrl)
|
|
204
204
|
|
|
205
|
-
self.alarm_ctrl = dashio.Alarm("
|
|
205
|
+
self.alarm_ctrl = dashio.Alarm("alarm")
|
|
206
206
|
self.device.add_control(self.alarm_ctrl)
|
|
207
207
|
self.comp_control = dashio.Direction(
|
|
208
208
|
"COMP1",
|
|
@@ -216,7 +216,7 @@ class TestControls:
|
|
|
216
216
|
self.page_test.add_control(self.comp_control)
|
|
217
217
|
|
|
218
218
|
self.selector_ctrl = dashio.Selector(
|
|
219
|
-
"
|
|
219
|
+
"testSel", "A Selector", control_position=dashio.ControlPosition(0.24, 0.01, 0.54, 0.13)
|
|
220
220
|
)
|
|
221
221
|
self.selector_ctrl.add_receive_message_callback(self.selector_ctrl_handler)
|
|
222
222
|
self.selector_ctrl.add_selection("First")
|
|
@@ -133,7 +133,7 @@ def main():
|
|
|
133
133
|
config_file_parser.get('DEFAULT', 'password')
|
|
134
134
|
)
|
|
135
135
|
dash_conn.add_device(device)
|
|
136
|
-
dview = dashio.DeviceView('
|
|
136
|
+
dview = dashio.DeviceView('pg1', 'DashIO Public Test')
|
|
137
137
|
|
|
138
138
|
up_button = dashio.Button(
|
|
139
139
|
'up',
|
|
@@ -180,7 +180,7 @@ class TestControls:
|
|
|
180
180
|
self.page_test.add_control(self.up_btn)
|
|
181
181
|
|
|
182
182
|
self.down_btn = dashio.Button(
|
|
183
|
-
"
|
|
183
|
+
"downBtn",
|
|
184
184
|
on_color=dashio.Color.GREEN,
|
|
185
185
|
title="Down",
|
|
186
186
|
text="",
|
|
@@ -202,7 +202,7 @@ class TestControls:
|
|
|
202
202
|
self.page_test.add_control(self.sldr_cntrl)
|
|
203
203
|
|
|
204
204
|
self.sldr_dbl_cntrl = dashio.Slider(
|
|
205
|
-
"
|
|
205
|
+
"sldrDbl",
|
|
206
206
|
bar_max=5,
|
|
207
207
|
slider_enabled=True,
|
|
208
208
|
red_value=5,
|
|
@@ -252,7 +252,7 @@ class TestControls:
|
|
|
252
252
|
self.page_test.add_control(self.comp_control)
|
|
253
253
|
|
|
254
254
|
self.selector_ctrl = dashio.Selector(
|
|
255
|
-
"
|
|
255
|
+
"testSel",
|
|
256
256
|
"A Selector",
|
|
257
257
|
control_position=dashio.ControlPosition(0.24, 0.01, 0.54, 0.13)
|
|
258
258
|
)
|
|
@@ -5,7 +5,7 @@ import time
|
|
|
5
5
|
device = dashio.Device("aDeviceType", "aDeviceID", "aDeviceName")
|
|
6
6
|
tcp_con = dashio.TCPConnection()
|
|
7
7
|
tcp_con.add_device(device)
|
|
8
|
-
first_dial_control = dashio.Dial("
|
|
8
|
+
first_dial_control = dashio.Dial("dial1")
|
|
9
9
|
device.add_control(first_dial_control)
|
|
10
10
|
|
|
11
11
|
while True:
|
|
@@ -5,10 +5,10 @@ import time
|
|
|
5
5
|
device = dashio.Device("aDeviceType", "aDeviceID", "aDeviceName")
|
|
6
6
|
tcp_con = dashio.TCPConnection()
|
|
7
7
|
tcp_con.add_device(device)
|
|
8
|
-
first_dial_control = dashio.Dial("
|
|
8
|
+
first_dial_control = dashio.Dial("dial1", control_position=dashio.ControlPosition(0.24, 0.36, 0.54, 0.26))
|
|
9
9
|
device.add_control(first_dial_control)
|
|
10
10
|
|
|
11
|
-
dv_dial = dashio.DeviceView("
|
|
11
|
+
dv_dial = dashio.DeviceView("aView", "A Dial")
|
|
12
12
|
dv_dial.add_control(first_dial_control)
|
|
13
13
|
device.add_control(dv_dial)
|
|
14
14
|
|
|
@@ -4,10 +4,10 @@ import time
|
|
|
4
4
|
device = dashio.Device("aDeviceType", "aDeviceID", "aDeviceName")
|
|
5
5
|
tcp_con = dashio.TCPConnection()
|
|
6
6
|
tcp_con.add_device(device)
|
|
7
|
-
first_dial_control = dashio.Dial("
|
|
7
|
+
first_dial_control = dashio.Dial("dial1", control_position=dashio.ControlPosition(0.24, 0.36, 0.54, 0.26))
|
|
8
8
|
device.add_control(first_dial_control)
|
|
9
9
|
|
|
10
|
-
dv = dashio.DeviceView("
|
|
10
|
+
dv = dashio.DeviceView("aView", "A Dial")
|
|
11
11
|
dv.add_control(first_dial_control)
|
|
12
12
|
device.add_control(dv)
|
|
13
13
|
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import dashio
|
|
2
|
+
import time
|
|
3
|
+
|
|
4
|
+
cfg64 = "jVTbjtowEP0VlOeqImyXSn1LCLCIXFDiQqWqD97ESywSmzrOAl3x7+sxOAk3qW/jM+Pxseccf1jeLLZ+9H7/+dKzRpOpCj8sVpce"\
|
|
5
|
+
"eacpWVKyqxRkq2SmkYTIeqsQy1JQ+raOyTvkj2o1DyMXOn1YKWdS8GLmQSGehy4U54SucxljSbmC+18HQwVKKguy4BVVKINqN0Io"\
|
|
6
|
+
"CiyTAsjpzRl/BagiLItYcYhYTAqCK0hLUROVKils70NRzncBZQHeK+ANFxWkBcmWuKhhw/dntd5iQZg8E4RbQvuM4iLgmT50Evl+"\
|
|
7
|
+
"tAJ0b+h1qH9T+I5mMm+xZ8A2iuiIF1xAi5hkpmuDucABSMrD6XJhFAeOD9Dh9hwbepb6Ina/f9Qj8ptpJb7XxM7SM2HgLEzoomkT"\
|
|
8
|
+
"B+Pwp4nR+Bcyse/6JvSWy9V5gFK0nFc5laSXlHxzSd11ktlIy0BVu1xkRDzasxY0U7m6ZKCmwQA2XWjEjIAqOMSl7p/8rdWUrqTg"\
|
|
9
|
+
"qddsztysWdZ5WpxuNMFcbTud1uoD6hG0cfn+dks3iwRmldZHejhLqklPFOmE/gMu9vCcUELrwAOoV/5pb2t32d5rfsMGXivm2nhP"\
|
|
10
|
+
"Az11P5o2Hn2JUauAEYrbYaOwmeTM8U+T3AqS0upkrv71s4M0betE+JWIrg/98QRdTHsxG1uPjNNI9MKIW06Z7GjCaL9mVFbmC7n7"\
|
|
11
|
+
"K1y7FXhOaFFcW+v/fg8jmUdGvmO8p+EDg99+Lno+aBovXvTjHz8B"
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
config_dict = dashio.decode_cfg64(cfg64)
|
|
15
|
+
device = dashio.Device("aDeviceType", "aDeviceID2", "aDeviceName1", cfg_dict=config_dict)
|
|
16
|
+
tcp_con = dashio.TCPConnection()
|
|
17
|
+
tcp_con.add_device(device)
|
|
18
|
+
|
|
19
|
+
aknob: dashio.Knob = device.get_control(dashio.ControlName.KNOB, "aKNB")
|
|
20
|
+
first_dial_control: dashio.Dial = device.get_control(dashio.ControlName.DIAL, "dial1")
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def knob_event_handler(msg):
|
|
24
|
+
aknob.knob_dial_value = float(msg[3])
|
|
25
|
+
first_dial_control.dial_value = float(msg[3])
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
aknob.add_receive_message_callback(knob_event_handler)
|
|
29
|
+
|
|
30
|
+
while True:
|
|
31
|
+
time.sleep(1)
|
|
@@ -15,14 +15,14 @@ logger.addHandler(handler)
|
|
|
15
15
|
logger.setLevel(logging.DEBUG)
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
cfg64 = "
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
18
|
+
cfg64 = "jVTbjtowEP0VlOeqImyXSn1LCLCIXFDiQqWqD97ESywSmzrOAl3x7+sxOAk3qW/jM+Pxseccf1jeLLZ+9H7/+dKzRpOpCj8sVpce"\
|
|
19
|
+
"eacpWVKyqxRkq2SmkYTIeqsQy1JQ+raOyTvkj2o1DyMXOn1YKWdS8GLmQSGehy4U54SucxljSbmC+18HQwVKKguy4BVVKINqN0Io"\
|
|
20
|
+
"CiyTAsjpzRl/BagiLItYcYhYTAqCK0hLUROVKils70NRzncBZQHeK+ANFxWkBcmWuKhhw/dntd5iQZg8E4RbQvuM4iLgmT50Evl+"\
|
|
21
|
+
"tAJ0b+h1qH9T+I5mMm+xZ8A2iuiIF1xAi5hkpmuDucABSMrD6XJhFAeOD9Dh9hwbepb6Ina/f9Qj8ptpJb7XxM7SM2HgLEzoomkT"\
|
|
22
|
+
"B+Pwp4nR+Bcyse/6JvSWy9V5gFK0nFc5laSXlHxzSd11ktlIy0BVu1xkRDzasxY0U7m6ZKCmwQA2XWjEjIAqOMSl7p/8rdWUrqTg"\
|
|
23
|
+
"qddsztysWdZ5WpxuNMFcbTud1uoD6hG0cfn+dks3iwRmldZHejhLqklPFOmE/gMu9vCcUELrwAOoV/5pb2t32d5rfsMGXivm2nhP"\
|
|
24
|
+
"Az11P5o2Hn2JUauAEYrbYaOwmeTM8U+T3AqS0upkrv71s4M0betE+JWIrg/98QRdTHsxG1uPjNNI9MKIW06Z7GjCaL9mVFbmC7n7"\
|
|
25
|
+
"K1y7FXhOaFFcW+v/fg8jmUdGvmO8p+EDg99+Lno+aBovXvTjHz8B"
|
|
26
26
|
|
|
27
27
|
config_dict = dashio.decode_cfg64(cfg64)
|
|
28
28
|
device = dashio.Device("aDeviceType", "aDeviceID", "Fred", cfg_dict=config_dict)
|
|
@@ -35,7 +35,7 @@ tcp_con.add_device(device)
|
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
aknob: dashio.Knob = device.get_control(dashio.ControlName.KNOB, "aKNB")
|
|
38
|
-
first_dial_control: dashio.Dial = device.get_control(dashio.ControlName.DIAL, "
|
|
38
|
+
first_dial_control: dashio.Dial = device.get_control(dashio.ControlName.DIAL, "dial1")
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
def knob_event_handler(msg):
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import dashio
|
|
2
|
+
import random
|
|
3
|
+
import time
|
|
4
|
+
|
|
5
|
+
device = dashio.Device("aDeviceType", "aDeviceID3", "aDeviceName")
|
|
6
|
+
dash_con = dashio.DashConnection("your_dash_username", "your_dash_password")
|
|
7
|
+
dash_con.add_device(device)
|
|
8
|
+
|
|
9
|
+
first_dial_control = dashio.Dial("dial1", control_position=dashio.ControlPosition(0.24, 0.36, 0.54, 0.26))
|
|
10
|
+
device.add_control(first_dial_control)
|
|
11
|
+
dv = dashio.DeviceView("aView", "A Dial")
|
|
12
|
+
dv.add_control(first_dial_control)
|
|
13
|
+
device.add_control(dv)
|
|
14
|
+
|
|
15
|
+
alarm = dashio.Alarm("hiAlarm")
|
|
16
|
+
device.add_control(alarm)
|
|
17
|
+
|
|
18
|
+
high = False
|
|
19
|
+
while True:
|
|
20
|
+
value = random.random() * 100
|
|
21
|
+
first_dial_control.dial_value = value
|
|
22
|
+
if value > 90 and not high:
|
|
23
|
+
alarm.send("High value", f"The dial is at {value:.0f}")
|
|
24
|
+
high = value > 90
|
|
25
|
+
time.sleep(5)
|