Thanks for the perfect and detailed instructions. This made it really easy. Here’s the output I got:
INFO:SMB.SMBConnection:Authentication with remote machine "AIRVISUAL" for user "airvisual" will be using NTLM v2 authentication (with extended security)
DEBUG:SMB.SMBConnection:Received SMB message "SMB_COM_NEGOTIATE" (command:0x72 flags:0x88 flags2:0xC841 TID:0 UID:0)
INFO:SMB.SMBConnection:SMB dialect negotiation successful (ExtendedSecurity:True)
DEBUG:SMB.SMBConnection:Received SMB message "SMB_COM_SESSION_SETUP_ANDX" (command:0x73 flags:0x88 flags2:0xC803 TID:0 UID:16113)
INFO:SMB.SMBConnection:Performing NTLMv2 authentication (with extended security) with server challenge "<REDACTED>'"
DEBUG:SMB.SMBConnection:NT challenge response is "<REDACTED>'" (124 bytes)
DEBUG:SMB.SMBConnection:LM challenge response is "<REDACTED>'" (24 bytes)
INFO:SMB.SMBConnection:SMB signing deactivated. SMB messages will NOT be signed.
DEBUG:SMB.SMBConnection:Received SMB message "SMB_COM_SESSION_SETUP_ANDX" (command:0x73 flags:0x88 flags2:0xC803 TID:0 UID:16113)
DEBUG:SMB.SMBConnection:SMB uid is now 16113
INFO:SMB.SMBConnection:Authentication (with extended security) successful!
DEBUG:SMB.SMBConnection:Received SMB message "SMB_COM_TREE_CONNECT_ANDX" (command:0x75 flags:0x88 flags2:0xC803 TID:8935 UID:16113)
DEBUG:SMB.SMBConnection:Received SMB message "SMB_COM_OPEN_ANDX" (command:0x2D flags:0x88 flags2:0xC803 TID:8935 UID:16113)
DEBUG:SMB.SMBConnection:Received SMB message "SMB_COM_READ_ANDX" (command:0x2E flags:0x88 flags2:0xC803 TID:8935 UID:16113)
DEBUG:pyairvisual.node:Node Pro measurements loaded: {'date_and_time': {'date': '2020/09/22', 'time': '18:11:21', 'timestamp': '1600798281'}, 'measurements': {'co2_ppm': '397', 'humidity_RH': '55', 'pm25_AQICN': '13', 'pm25_AQIUS': '38', 'pm25_ugm3': '9.0', 'temperature_C': '23.5', 'temperature_F': '74.3', 'voc_ppb': '-1'}, 'serial_number': 'SXP9JKS', 'settings': {'followed_station': '8262', 'is_aqi_usa': True, 'is_concentration_showed': True, 'is_indoor': False, 'is_lcd_on': True, 'is_network_time': True, 'is_temperature_celsius': True, 'language': 'en-GB', 'lcd_brightness': 40, 'node_name': 'hlubocepy', 'power_saving': {'2slots': [{'hour_off': 9, 'hour_on': 7}, {'hour_off': 22, 'hour_on': 18}], 'mode': 'yes', 'yes': [{'hour': 7, 'minute': 0}, {'hour': 21, 'minute': 0}]}, 'speed_unit': 'mph', 'timezone': 'Europe/Prague'}, 'status': {'app_version': '1.1532', 'battery': 100, 'datetime': 1600798281, 'model': '10', 'sensor_pm25_serial': '00000110030927030221', 'sync_time': 260000, 'system_version': 'KBG57F70', 'used_memory': 0, 'wifi_strength': 4}}
Traceback (most recent call last):
File "examples/test_node_pro.py", line 26, in <module>
asyncio.run(main())
File "/usr/local/Cellar/[email protected]/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/asyncio/runners.py", line 43, in run
return loop.run_until_complete(main)
File "/usr/local/Cellar/[email protected]/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
return future.result()
File "examples/test_node_pro.py", line 20, in main
_LOGGER.info(await node.async_get_latest_measurements())
File "/Volumes/RAID/scstraus/pyairvisual/pyairvisual/node.py", line 208, in async_get_latest_measurements
for pollutant, value in data["measurements"][0].items()
KeyError: 0