33
44from dingz .dingz import Dingz
55
6- IP_ADDRESS = "192.168.0.105 "
6+ IP_ADDRESS = "192.168.0.103 "
77
88
99async def main ():
@@ -14,11 +14,33 @@ async def main():
1414 await dingz .get_device_info ()
1515 print ("Device details:" , dingz .device_details )
1616
17+ # Get all details
18+ await dingz .get_settings ()
19+ print ("All device details:" , dingz .settings )
20+
21+ # Get the configuration
22+ # Available: pir, input, themostat
23+ await dingz .get_configuration ("pir" )
24+ print ("Configuration:" , dingz .configuration )
25+
1726 # Get the temperature
1827 await dingz .get_temperature ()
1928 print ("Temperature:" , dingz .temperature )
2029
21- # Turn on the front LED
30+ # Get data from the PIR
31+ await dingz .get_light ()
32+ print ("Brightness:" , dingz .intensity )
33+ # Is it day?
34+ print ("Day?:" , dingz .day )
35+ # Motion detected
36+ print ("Motion?:" , dingz .motion )
37+
38+ # Collect the data of the current state
39+ await dingz .get_button_action ()
40+ print ("Button actions:" , dingz .button_action )
41+
42+
43+ # # Turn on the front LED
2244 print ("Turning Front LED on..." )
2345 await dingz .turn_on ()
2446 await asyncio .sleep (3 )
0 commit comments