File: crownstone_data.py

package info (click to toggle)
python-crownstone-cloud 1.4.11-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 240 kB
  • sloc: python: 1,126; makefile: 4
file content (146 lines) | stat: -rw-r--r-- 5,207 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
"""Mock replies from the cloud for Crownstone data."""

crownstone_data = [
    {
        "name": "my_awesome_crownstone",
        "address": "address",
        "type": "PLUG",
        "dimmingEnabled": "false",
        "major": 69,
        "minor": 69,
        "uid": 1,
        "icon": "fiCS1-desk-lamp-2",
        "tapToToggle": "true",
        "firmwareVersion": "5.0.1",
        "bootloaderVersion": "2.1.0",
        "hardwareVersion": "101020100000000000000000000QFAAB0",
        "hidden": "false",
        "locked": "false",
        "id": "my_awesome_crownstone_id",
        "locationId": "location_id",
        "sphereId": "my_awesome_sphere_id",
        "createdAt": "date_created",
        "updatedAt": "date_updated",
        "currentSwitchStateId": "switch_state_id",
        "currentSwitchState": {
            "timestamp": "date_updated",
            "switchState": 0
        },
        "abilities": [
            {
                "type": "dimming",
                "enabled": True,
                "syncedToCrownstone": True,
                "id": "my_awesome_ability_id_1",
                "stoneId": "my_awesome_crownstone_id",
                "sphereId": "my_awesome_sphere_id",
                "createdAt": "date_created",
                "updatedAt": "date_updated",
                "properties": [
                    {
                        "type": "softOnSpeed",
                        "value": "5",
                        "id": "my_awesome_property_id_1",
                        "abilityId": "my_awesome_ability_id_1",
                        "sphereId": "my_awesome_sphere_id",
                        "createdAt": "date_created",
                        "updatedAt": "date_updated"
                    }
                ]
            },
            {
                "type": "switchcraft",
                "enabled": False,
                "syncedToCrownstone": True,
                "id": "my_awesome_ability_id_2",
                "stoneId": "my_awesome_crownstone_id",
                "sphereId": "my_awesome_sphere_id",
                "createdAt": "date_created",
                "updatedAt": "date_updated",
                "properties": []
            },
            {
                "type": "tapToToggle",
                "enabled": False,
                "syncedToCrownstone": True,
                "id": "my_awesome_ability_id_3",
                "stoneId": "my_awesome_crownstone_id",
                "sphereId": "my_awesome_sphere_id",
                "createdAt": "date_created",
                "updatedAt": "date_updated",
                "properties": []
            }
        ]
    },
    {
        "name": "my_awesome_crownstone_2",
        "address": "address",
        "type": "PLUG",
        "dimmingEnabled": "false",
        "major": 69,
        "minor": 69,
        "uid": 1,
        "icon": "fiCS1-desk-lamp-2",
        "tapToToggle": "true",
        "firmwareVersion": "5.0.1",
        "bootloaderVersion": "2.1.0",
        "hardwareVersion": "101020100000000000000000000QFAAB0",
        "hidden": "false",
        "locked": "false",
        "id": "my_awesome_crownstone_id_2",
        "locationId": "location_id",
        "sphereId": "my_awesome_sphere_id",
        "createdAt": "date_created",
        "updatedAt": "date_updated",
        "currentSwitchStateId": "switch_state_id",
        "currentSwitchState": {
            "timestamp": "date_updated",
            "switchState": 0
        },
        "abilities": [
            {
                "type": "dimming",
                "enabled": False,
                "syncedToCrownstone": True,
                "id": "my_awesome_ability_id_4",
                "stoneId": "my_awesome_crownstone_id_2",
                "sphereId": "my_awesome_sphere_id",
                "createdAt": "date_created",
                "updatedAt": "date_updated",
                "properties": []
            },
            {
                "type": "switchcraft",
                "enabled": False,
                "syncedToCrownstone": True,
                "id": "my_awesome_ability_id_5",
                "stoneId": "my_awesome_crownstone_id_2",
                "sphereId": "my_awesome_sphere_id",
                "createdAt": "date_created",
                "updatedAt": "date_updated",
                "properties": []
            },
            {
                "type": "tapToToggle",
                "enabled": True,
                "syncedToCrownstone": True,
                "id": "my_awesome_ability_id_6",
                "stoneId": "my_awesome_crownstone_id_2",
                "sphereId": "my_awesome_sphere_id",
                "createdAt": "date_created",
                "updatedAt": "date_updated",
                "properties": [
                    {
                        "type": "rssiOffset",
                        "value": "-10",
                        "id": "my_awesome_property_id_2",
                        "abilityId": "my_awesome_ability_id_6",
                        "sphereId": "my_awesome_sphere_id",
                        "createdAt": "date_created",
                        "updatedAt": "date_updated"
                    }
                ]
            }
        ]
    },
]