Closed jwoodard80 closed 4 years ago
Hey there @bachya, mind taking a look at this issue as its been labeled with a integration (ambient_station
) you are listed as a codeowner for? Thanks!
Let's do some debugging using the underlying library (aioambient
) – from a computer that has a command line, please do the following:
aioambient
and cd
into it:$ git clone https://github.com/bachya/aioambient
$ cd aioambient
$ make init
example_websocket.py
in a text editor and put your Ambient Weather API and App keys into lines 12 and 13, respectively:API_KEY = "<YOUR API KEY>"
APP_KEY = "<YOUR APPLICATION KEY>"
Save and close your text editor.
Back on the command line, run example_websocket.py
:
$ .venv/bin/python3 example_websocket.py
This should run for about 30-40 seconds, produce a bunch of output, then quit. Scrub that output of anything sensitive (keys, MAC addresses, etc.) and paste the sanitized version here.
Apologies on the delay getting this.... Life happens sometimes. If I can help further I am happy to.
tiger@techlinux:~/aioambient$`` .venv/bin/python3 example_websocket.py
INFO:engineio.client:Attempting WebSocket connection to wss://dash2.ambientweather.net/socket.io/?api=1&applicationKey=&transport=websocket&EIO=3
INFO:engineio.client:WebSocket connection accepted with {'sid': 'NR8n8jZCFGa6-BMlADDv', 'upgrades': [], 'pingInterval': 25000, 'pingTimeout': 60000}
INFO:socketio.client:Engine.IO connection established
INFO:root:Simulating some other task occurring...
INFO:engineio.client:Sending packet PING data None
INFO:engineio.client:Received packet MESSAGE data 0
INFO:socketio.client:Namespace / is connected
INFO:socketio.client:Emitting event "subscribe" [/]
INFO:engineio.client:Sending packet MESSAGE data 2["subscribe",{"apiKeys":[""]}]
INFO:root:Client has connected to the websocket
INFO:engineio.client:Received packet PONG data None
INFO:engineio.client:Received packet MESSAGE data 2["subscribed",{"devices":[{"macAddress":"","lastData":{"dateutc":1579125000000,"tempinf":69.4,"battin":1,"humidityin":55,"baromrelin":29.746,"baromabsin":29.746,"tempf":61.2,"battout":1,"humidity":99,"winddir":5,"winddir_avg10m":359,"windspeedmph":2.7,"windspdmph_avg10m":3.1,"windgustmph":3.4,"maxdailygust":14.8,"hourlyrainin":0,"eventrainin":0.008,"dailyrainin":0.02,"weeklyrainin":0.039,"monthlyrainin":4.929,"yearlyrainin":30.142,"solarradiation":12.48,"uv":0,"pm25":3,"batt_25":1,"pm25_24h":2.9,"temp1f":68.5,"humidity1":57,"temp2f":68.5,"humidity2":56,"temp3f":70,"humidity3":53,"temp4f":60.4,"humidity4":80,"temp5f":60.3,"humidity5":86,"temp6f":73.6,"humidity6":47,"batt1":1,"batt2":1,"batt3":1,"batt4":1,"batt5":1,"batt6":1,"feelsLike":61.2,"dewPoint":60.92,"feelsLike1":67.7,"dewPoint1":52.7,"feelsLike2":67.7,"dewPoint2":52.2,"feelsLike3":69.2,"dewPoint3":52.1,"feelsLike4":60.4,"dewPoint4":54.2,"feelsLike5":60.3,"dewPoint5":56.1,"feelsLike6":72.9,"dewPoint6":52.1,"feelsLikein":68.6,"dewPointin":52.5,"lastRain":"2020-01-15T12:38:00.000Z","deviceId":"5d3f933c3c7195414d3dfe42","tz":"America/Chicago","date":"2020-01-15T21:50:00.000Z"},"info":{"coords":{"geo":{"coordinates":[],"type":"Point"},"elevation":114.2391052246094,"location":"AnyTown","address":"57 County Rd 7804, AnyTown, AR 72401, USA","coords":{"}},"location":"Home ","name":"Home Station"},"apiKey":""},{"macAddress":"MACADDRESS","lastData":{"dateutc":1579125000000,"tempinf":69.3,"humidityin":53,"baromrelin":29.873,"baromabsin":29.681,"tempf":59.9,"humidity":94,"winddir":220,"windspeedmph":0,"windgustmph":0,"maxdailygust":8.1,"hourlyrainin":0,"eventrainin":0,"dailyrainin":0.024,"weeklyrainin":0.024,"monthlyrainin":5,"totalrainin":5.902,"solarradiation":31.56,"uv":0,"feelsLike":59.9,"dewPoint":58.17,"feelsLikein":68.4,"dewPointin":51.4,"lastRain":"2020-01-15T11:07:00.000Z","deviceId":"5e127d53a25ddb590e0c4838","tz":"America/Chicago","date":"2020-01-15T21:50:00.000Z"},"info":{"name":"Parents Station","coords":{"geo":{"type":"Point","coordinates":[GPS]},"elevation":114.9538726806641,"location":"AnyOtherTown","address":"HomeAddress, AnyOtherTown, AR 72466, USA","coords":{"lon":GPS}}},"apiKey":"API-KEY"}],"method":"subscribe"}]
INFO:socketio.client:Received event "subscribed" [/]
INFO:root:Data received: {'devices': [{'macAddress': 'MAC', 'lastData': {'dateutc': 1579125000000, 'tempinf': 69.4, 'battin': 1, 'humidityin': 55, 'baromrelin': 29.746, 'baromabsin': 29.746, 'tempf': 61.2, 'battout': 1, 'humidity': 99, 'winddir': 5, 'winddir_avg10m': 359, 'windspeedmph': 2.7, 'windspdmph_avg10m': 3.1, 'windgustmph': 3.4, 'maxdailygust': 14.8, 'hourlyrainin': 0, 'eventrainin': 0.008, 'dailyrainin': 0.02, 'weeklyrainin': 0.039, 'monthlyrainin': 4.929, 'yearlyrainin': 30.142, 'solarradiation': 12.48, 'uv': 0, 'pm25': 3, 'batt_25': 1, 'pm25_24h': 2.9, 'temp1f': 68.5, 'humidity1': 57, 'temp2f': 68.5, 'humidity2': 56, 'temp3f': 70, 'humidity3': 53, 'temp4f': 60.4, 'humidity4': 80, 'temp5f': 60.3, 'humidity5': 86, 'temp6f': 73.6, 'humidity6': 47, 'batt1': 1, 'batt2': 1, 'batt3': 1, 'batt4': 1, 'batt5': 1, 'batt6': 1, 'feelsLike': 61.2, 'dewPoint': 60.92, 'feelsLike1': 67.7, 'dewPoint1': 52.7, 'feelsLike2': 67.7, 'dewPoint2': 52.2, 'feelsLike3': 69.2, 'dewPoint3': 52.1, 'feelsLike4': 60.4, 'dewPoint4': 54.2, 'feelsLike5': 60.3, 'dewPoint5': 56.1, 'feelsLike6': 72.9, 'dewPoint6': 52.1, 'feelsLikein': 68.6, 'dewPointin': 52.5, 'lastRain': '2020-01-15T12:38:00.000Z', 'deviceId': '5d3f933c3c7195414d3dfe42', 'tz': 'America/Chicago', 'date': '2020-01-15T21:50:00.000Z'}, 'info': {'coords': {'geo': {'coordinates': [-90.678905, 35.961957], 'type': 'Point'}, 'elevation': 114.2391052246094, 'location': 'AnyTown', 'address': '57 County Rd 7804, AnyTown, AR 72401, USA', 'coords': {'lon': -90.678905, 'lat': 35.961957}}, 'location': 'Home ', 'name': 'Woodard Home Station'}, 'apiKey': 'API-KEY'}, {'macAddress': 'MACADDRESS', 'lastData': {'dateutc': 1579125000000, 'tempinf': 69.3, 'humidityin': 53, 'baromrelin': 29.873, 'baromabsin': 29.681, 'tempf': 59.9, 'humidity': 94, 'winddir': 220, 'windspeedmph': 0, 'windgustmph': 0, 'maxdailygust': 8.1, 'hourlyrainin': 0, 'eventrainin': 0, 'dailyrainin': 0.024, 'weeklyrainin': 0.024, 'monthlyrainin': 5, 'totalrainin': 5.902, 'solarradiation': 31.56, 'uv': 0, 'feelsLike': 59.9, 'dewPoint': 58.17, 'feelsLikein': 68.4, 'dewPointin': 51.4, 'lastRain': '2020-01-15T11:07:00.000Z', 'deviceId': '5e127d53a25ddb590e0c4838', 'tz': 'America/Chicago', 'date': '2020-01-15T21:50:00.000Z'}, 'info': {'name': 'Parents Station', 'coords': {'geo': {'type': 'Point', 'coordinates': [GPS2]}, 'elevation': 114.9538726806641, 'location': 'AnyOtherTown', 'address': 'HomeAddress, AnyOtherTown, AR 72466, USA', 'coords': {'lon': -91.27442202275392, 'lat': 36.019268146394424}}}, 'apiKey': 'API-KEY'}], 'method': 'subscribe'}
INFO:root:Simulating some other task occurring...
INFO:engineio.client:Received packet MESSAGE data 2["data",{"dateutc":1579125060000,"tempinf":69.3,"battin":1,"humidityin":55,"baromrelin":29.743,"baromabsin":29.743,"tempf":61,"battout":1,"humidity":99,"winddir":326,"winddir_avg10m":352,"windspeedmph":2.7,"windspdmph_avg10m":2.9,"windgustmph":3.4,"maxdailygust":14.8,"hourlyrainin":0,"eventrainin":0.008,"dailyrainin":0.02,"weeklyrainin":0.039,"monthlyrainin":4.929,"yearlyrainin":30.142,"solarradiation":13.82,"uv":0,"pm25":3,"batt_25":1,"pm25_24h":2.9,"temp1f":68.5,"humidity1":57,"temp2f":68.5,"humidity2":56,"temp3f":70,"humidity3":53,"temp4f":60.4,"humidity4":80,"temp5f":60.3,"humidity5":86,"temp6f":73.6,"humidity6":47,"batt1":1,"batt2":1,"batt3":1,"batt4":1,"batt5":1,"batt6":1,"feelsLike":61,"dewPoint":60.72,"feelsLike1":67.7,"dewPoint1":52.7,"feelsLike2":67.7,"dewPoint2":52.2,"feelsLike3":69.2,"dewPoint3":52.1,"feelsLike4":60.4,"dewPoint4":54.2,"feelsLike5":60.3,"dewPoint5":56.1,"feelsLike6":72.9,"dewPoint6":52.1,"feelsLikein":68.5,"dewPointin":52.4,"lastRain":"2020-01-15T12:38:00.000Z","tz":"America/Chicago","date":"2020-01-15T21:51:00.000Z","macAddress":"MAC"}]
INFO:socketio.client:Received event "data" [/]
INFO:root:Data received: {'dateutc': 1579125060000, 'tempinf': 69.3, 'battin': 1, 'humidityin': 55, 'baromrelin': 29.743, 'baromabsin': 29.743, 'tempf': 61, 'battout': 1, 'humidity': 99, 'winddir': 326, 'winddir_avg10m': 352, 'windspeedmph': 2.7, 'windspdmph_avg10m': 2.9, 'windgustmph': 3.4, 'maxdailygust': 14.8, 'hourlyrainin': 0, 'eventrainin': 0.008, 'dailyrainin': 0.02, 'weeklyrainin': 0.039, 'monthlyrainin': 4.929, 'yearlyrainin': 30.142, 'solarradiation': 13.82, 'uv': 0, 'pm25': 3, 'batt_25': 1, 'pm25_24h': 2.9, 'temp1f': 68.5, 'humidity1': 57, 'temp2f': 68.5, 'humidity2': 56, 'temp3f': 70, 'humidity3': 53, 'temp4f': 60.4, 'humidity4': 80, 'temp5f': 60.3, 'humidity5': 86, 'temp6f': 73.6, 'humidity6': 47, 'batt1': 1, 'batt2': 1, 'batt3': 1, 'batt4': 1, 'batt5': 1, 'batt6': 1, 'feelsLike': 61, 'dewPoint': 60.72, 'feelsLike1': 67.7, 'dewPoint1': 52.7, 'feelsLike2': 67.7, 'dewPoint2': 52.2, 'feelsLike3': 69.2, 'dewPoint3': 52.1, 'feelsLike4': 60.4, 'dewPoint4': 54.2, 'feelsLike5': 60.3, 'dewPoint5': 56.1, 'feelsLike6': 72.9, 'dewPoint6': 52.1, 'feelsLikein': 68.5, 'dewPointin': 52.4, 'lastRain': '2020-01-15T12:38:00.000Z', 'tz': 'America/Chicago', 'date': '2020-01-15T21:51:00.000Z', 'macAddress': 'MAC'}
INFO:root:Simulating some other task occurring...
INFO:engineio.client:Received packet MESSAGE data 2["data",{"dateutc":1579125060000,"tempinf":69.3,"humidityin":53,"baromrelin":29.876,"baromabsin":29.684,"tempf":59.9,"humidity":94,"winddir":262,"windspeedmph":1.1,"windgustmph":1.1,"maxdailygust":8.1,"hourlyrainin":0,"eventrainin":0,"dailyrainin":0.024,"weeklyrainin":0.024,"monthlyrainin":5,"totalrainin":5.902,"solarradiation":36.33,"uv":0,"feelsLike":59.9,"dewPoint":58.17,"feelsLikein":68.4,"dewPointin":51.4,"lastRain":"2020-01-15T11:07:00.000Z","tz":"America/Chicago","date":"2020-01-15T21:51:00.000Z","macAddress":"MACADDRESS"}]
INFO:socketio.client:Received event "data" [/]
INFO:root:Data received: {'dateutc': 1579125060000, 'tempinf': 69.3, 'humidityin': 53, 'baromrelin': 29.876, 'baromabsin': 29.684, 'tempf': 59.9, 'humidity': 94, 'winddir': 262, 'windspeedmph': 1.1, 'windgustmph': 1.1, 'maxdailygust': 8.1, 'hourlyrainin': 0, 'eventrainin': 0, 'dailyrainin': 0.024, 'weeklyrainin': 0.024, 'monthlyrainin': 5, 'totalrainin': 5.902, 'solarradiation': 36.33, 'uv': 0, 'feelsLike': 59.9, 'dewPoint': 58.17, 'feelsLikein': 68.4, 'dewPointin': 51.4, 'lastRain': '2020-01-15T11:07:00.000Z', 'tz': 'America/Chicago', 'date': '2020-01-15T21:51:00.000Z', 'macAddress': 'MACADDRESS'}
INFO:root:Simulating some other task occurring...
INFO:root:Simulating some other task occurring...
^CTraceback (most recent call last):
File "example_websocket.py", line 58, in <module>
loop.run_forever()
File "/usr/lib/python3.6/asyncio/base_events.py", line 438, in run_forever
self._run_once()
File "/usr/lib/python3.6/asyncio/base_events.py", line 1415, in _run_once
event_list = self._selector.select(timeout)
File "/usr/lib/python3.6/selectors.py", line 445, in select
fd_event_list = self._epoll.poll(timeout, max_ev)
File "/home/tigeradmin/aioambient/.venv/lib/python3.6/site-packages/socketio/client.py", line 25, in signal_handler
return original_signal_handler(sig, frame)
File "/home/tigeradmin/aioambient/.venv/lib/python3.6/site-packages/engineio/client.py", line 43, in signal_handler
return original_signal_handler(sig, frame)
KeyboardInterrupt
tigeradmin@techlinux:~/aioambient$ .venv/bin/python3 example_websocket.py >> output.txt
INFO:engineio.client:Attempting WebSocket connection to wss://dash2.ambientweather.net/socket.io/?api=1&applicationKey=appKey&transport=websocket&EIO=3
INFO:engineio.client:WebSocket connection accepted with {'sid': '-00Q9znKVE0n1efGADDw', 'upgrades': [], 'pingInterval': 25000, 'pingTimeout': 60000}
INFO:socketio.client:Engine.IO connection established
INFO:root:Simulating some other task occurring...
INFO:engineio.client:Sending packet PING data None
INFO:engineio.client:Received packet MESSAGE data 0
INFO:socketio.client:Namespace / is connected
INFO:socketio.client:Emitting event "subscribe" [/]
INFO:engineio.client:Sending packet MESSAGE data 2["subscribe",{"apiKeys":["API-KEY"]}]
INFO:root:Client has connected to the websocket
INFO:engineio.client:Received packet PONG data None
INFO:engineio.client:Received packet MESSAGE data 2["subscribed",{"devices":[{"macAddress":"MAC","lastData":{"dateutc":1579125060000,"tempinf":69.3,"battin":1,"humidityin":55,"baromrelin":29.743,"baromabsin":29.743,"tempf":61,"battout":1,"humidity":99,"winddir":326,"winddir_avg10m":352,"windspeedmph":2.7,"windspdmph_avg10m":2.9,"windgustmph":3.4,"maxdailygust":14.8,"hourlyrainin":0,"eventrainin":0.008,"dailyrainin":0.02,"weeklyrainin":0.039,"monthlyrainin":4.929,"yearlyrainin":30.142,"solarradiation":13.82,"uv":0,"pm25":3,"batt_25":1,"pm25_24h":2.9,"temp1f":68.5,"humidity1":57,"temp2f":68.5,"humidity2":56,"temp3f":70,"humidity3":53,"temp4f":60.4,"humidity4":80,"temp5f":60.3,"humidity5":86,"temp6f":73.6,"humidity6":47,"batt1":1,"batt2":1,"batt3":1,"batt4":1,"batt5":1,"batt6":1,"feelsLike":61,"dewPoint":60.72,"feelsLike1":67.7,"dewPoint1":52.7,"feelsLike2":67.7,"dewPoint2":52.2,"feelsLike3":69.2,"dewPoint3":52.1,"feelsLike4":60.4,"dewPoint4":54.2,"feelsLike5":60.3,"dewPoint5":56.1,"feelsLike6":72.9,"dewPoint6":52.1,"feelsLikein":68.5,"dewPointin":52.4,"lastRain":"2020-01-15T12:38:00.000Z","deviceId":"5d3f933c3c7195414d3dfe42","tz":"America/Chicago","date":"2020-01-15T21:51:00.000Z"},"info":{"coords":{"geo":{"coordinates":[-90.678905,35.961957],"type":"Point"},"elevation":114.2391052246094,"location":"AnyTown","address":"57 County Rd 7804, AnyTown, AR 72401, USA","coords":{"lon":-90.678905,"lat":35.961957}},"location":"Home ","name":"Woodard Home Station"},"apiKey":"API-KEY"},{"macAddress":"MACADDRESS","lastData":{"dateutc":1579125060000,"tempinf":69.3,"humidityin":53,"baromrelin":29.876,"baromabsin":29.684,"tempf":59.9,"humidity":94,"winddir":262,"windspeedmph":1.1,"windgustmph":1.1,"maxdailygust":8.1,"hourlyrainin":0,"eventrainin":0,"dailyrainin":0.024,"weeklyrainin":0.024,"monthlyrainin":5,"totalrainin":5.902,"solarradiation":36.33,"uv":0,"feelsLike":59.9,"dewPoint":58.17,"feelsLikein":68.4,"dewPointin":51.4,"lastRain":"2020-01-15T11:07:00.000Z","deviceId":"5e127d53a25ddb590e0c4838","tz":"America/Chicago","date":"2020-01-15T21:51:00.000Z"},"info":{"name":"Parents Station","coords":{"geo":{"type":"Point","coordinates":[GPS]},"elevation":114.9538726806641,"location":"AnyOtherTown","address":"HomeAddress, AnyOtherTown, AR 72466, USA","coords":{"lon":GPS}}},"apiKey":"API-KEY"}],"method":"subscribe"}]
INFO:socketio.client:Received event "subscribed" [/]
INFO:root:Data received: {'devices': [{'macAddress': 'MAC', 'lastData': {'dateutc': 1579125060000, 'tempinf': 69.3, 'battin': 1, 'humidityin': 55, 'baromrelin': 29.743, 'baromabsin': 29.743, 'tempf': 61, 'battout': 1, 'humidity': 99, 'winddir': 326, 'winddir_avg10m': 352, 'windspeedmph': 2.7, 'windspdmph_avg10m': 2.9, 'windgustmph': 3.4, 'maxdailygust': 14.8, 'hourlyrainin': 0, 'eventrainin': 0.008, 'dailyrainin': 0.02, 'weeklyrainin': 0.039, 'monthlyrainin': 4.929, 'yearlyrainin': 30.142, 'solarradiation': 13.82, 'uv': 0, 'pm25': 3, 'batt_25': 1, 'pm25_24h': 2.9, 'temp1f': 68.5, 'humidity1': 57, 'temp2f': 68.5, 'humidity2': 56, 'temp3f': 70, 'humidity3': 53, 'temp4f': 60.4, 'humidity4': 80, 'temp5f': 60.3, 'humidity5': 86, 'temp6f': 73.6, 'humidity6': 47, 'batt1': 1, 'batt2': 1, 'batt3': 1, 'batt4': 1, 'batt5': 1, 'batt6': 1, 'feelsLike': 61, 'dewPoint': 60.72, 'feelsLike1': 67.7, 'dewPoint1': 52.7, 'feelsLike2': 67.7, 'dewPoint2': 52.2, 'feelsLike3': 69.2, 'dewPoint3': 52.1, 'feelsLike4': 60.4, 'dewPoint4': 54.2, 'feelsLike5': 60.3, 'dewPoint5': 56.1, 'feelsLike6': 72.9, 'dewPoint6': 52.1, 'feelsLikein': 68.5, 'dewPointin': 52.4, 'lastRain': '2020-01-15T12:38:00.000Z', 'deviceId': '5d3f933c3c7195414d3dfe42', 'tz': 'America/Chicago', 'date': '2020-01-15T21:51:00.000Z'}, 'info': {'coords': {'geo': {'coordinates': [-90.678905, 35.961957], 'type': 'Point'}, 'elevation': 114.2391052246094, 'location': 'AnyTown', 'address': '57 County Rd 7804, AnyTown, AR 72401, USA', 'coords': {'lon': -90.678905, 'lat': 35.961957}}, 'location': 'Home ', 'name': 'Woodard Home Station'}, 'apiKey': 'API-KEY'}, {'macAddress': 'MACADDRESS', 'lastData': {'dateutc': 1579125060000, 'tempinf': 69.3, 'humidityin': 53, 'baromrelin': 29.876, 'baromabsin': 29.684, 'tempf': 59.9, 'humidity': 94, 'winddir': 262, 'windspeedmph': 1.1, 'windgustmph': 1.1, 'maxdailygust': 8.1, 'hourlyrainin': 0, 'eventrainin': 0, 'dailyrainin': 0.024, 'weeklyrainin': 0.024, 'monthlyrainin': 5, 'totalrainin': 5.902, 'solarradiation': 36.33, 'uv': 0, 'feelsLike': 59.9, 'dewPoint': 58.17, 'feelsLikein': 68.4, 'dewPointin': 51.4, 'lastRain': '2020-01-15T11:07:00.000Z', 'deviceId': '5e127d53a25ddb590e0c4838', 'tz': 'America/Chicago', 'date': '2020-01-15T21:51:00.000Z'}, 'info': {'name': 'Parents Station', 'coords': {'geo': {'type': 'Point', 'coordinates': [GPS2]}, 'elevation': 114.9538726806641, 'location': 'AnyOtherTown', 'address': 'HomeAddress, AnyOtherTown, AR 72466, USA', 'coords': {'lon': -91.27442202275392, 'lat': 36.019268146394424}}}, 'apiKey': 'API-KEY'}], 'method': 'subscribe'}
INFO:root:Simulating some other task occurring...
INFO:root:Simulating some other task occurring...
INFO:root:Simulating some other task occurring...
INFO:root:Simulating some other task occurring...
INFO:engineio.client:Sending packet PING data None
INFO:root:Simulating some other task occurring...
INFO:engineio.client:Received packet PONG data None
INFO:root:Simulating some other task occurring...
INFO:engineio.client:Received packet MESSAGE data 2["data",{"dateutc":1579125120000,"tempinf":69.3,"battin":1,"humidityin":55,"baromrelin":29.743,"baromabsin":29.743,"tempf":60.8,"battout":1,"humidity":99,"winddir":346,"winddir_avg10m":355,"windspeedmph":4,"windspdmph_avg10m":3.4,"windgustmph":4.5,"maxdailygust":14.8,"hourlyrainin":0,"eventrainin":0.008,"dailyrainin":0.02,"weeklyrainin":0.039,"monthlyrainin":4.929,"yearlyrainin":30.142,"solarradiation":14.31,"uv":0,"pm25":3,"batt_25":1,"pm25_24h":2.9,"temp1f":68.5,"humidity1":57,"temp2f":68.5,"humidity2":56,"temp3f":70,"humidity3":53,"temp4f":60.4,"humidity4":80,"temp5f":60.3,"humidity5":86,"temp6f":73.6,"humidity6":47,"batt1":1,"batt2":1,"batt3":1,"batt4":1,"batt5":1,"batt6":1,"feelsLike":60.8,"dewPoint":60.52,"feelsLike1":67.7,"dewPoint1":52.7,"feelsLike2":67.7,"dewPoint2":52.2,"feelsLike3":69.2,"dewPoint3":52.1,"feelsLike4":60.4,"dewPoint4":54.2,"feelsLike5":60.3,"dewPoint5":56.1,"feelsLike6":72.9,"dewPoint6":52.1,"feelsLikein":68.5,"dewPointin":52.4,"lastRain":"2020-01-15T12:38:00.000Z","tz":"America/Chicago","date":"2020-01-15T21:52:00.000Z","macAddress":"MAC"}]
INFO:socketio.client:Received event "data" [/]
INFO:root:Data received: {'dateutc': 1579125120000, 'tempinf': 69.3, 'battin': 1, 'humidityin': 55, 'baromrelin': 29.743, 'baromabsin': 29.743, 'tempf': 60.8, 'battout': 1, 'humidity': 99, 'winddir': 346, 'winddir_avg10m': 355, 'windspeedmph': 4, 'windspdmph_avg10m': 3.4, 'windgustmph': 4.5, 'maxdailygust': 14.8, 'hourlyrainin': 0, 'eventrainin': 0.008, 'dailyrainin': 0.02, 'weeklyrainin': 0.039, 'monthlyrainin': 4.929, 'yearlyrainin': 30.142, 'solarradiation': 14.31, 'uv': 0, 'pm25': 3, 'batt_25': 1, 'pm25_24h': 2.9, 'temp1f': 68.5, 'humidity1': 57, 'temp2f': 68.5, 'humidity2': 56, 'temp3f': 70, 'humidity3': 53, 'temp4f': 60.4, 'humidity4': 80, 'temp5f': 60.3, 'humidity5': 86, 'temp6f': 73.6, 'humidity6': 47, 'batt1': 1, 'batt2': 1, 'batt3': 1, 'batt4': 1, 'batt5': 1, 'batt6': 1, 'feelsLike': 60.8, 'dewPoint': 60.52, 'feelsLike1': 67.7, 'dewPoint1': 52.7, 'feelsLike2': 67.7, 'dewPoint2': 52.2, 'feelsLike3': 69.2, 'dewPoint3': 52.1, 'feelsLike4': 60.4, 'dewPoint4': 54.2, 'feelsLike5': 60.3, 'dewPoint5': 56.1, 'feelsLike6': 72.9, 'dewPoint6': 52.1, 'feelsLikein': 68.5, 'dewPointin': 52.4, 'lastRain': '2020-01-15T12:38:00.000Z', 'tz': 'America/Chicago', 'date': '2020-01-15T21:52:00.000Z', 'macAddress': 'MAC'}
INFO:root:Simulating some other task occurring...
INFO:root:Simulating some other task occurring...
INFO:engineio.client:Received packet MESSAGE data 2["data",{"dateutc":1579125120000,"tempinf":69.3,"humidityin":53,"baromrelin":29.876,"baromabsin":29.684,"tempf":59.9,"humidity":94,"winddir":194,"windspeedmph":0.2,"windgustmph":1.1,"maxdailygust":8.1,"hourlyrainin":0,"eventrainin":0,"dailyrainin":0.024,"weeklyrainin":0.024,"monthlyrainin":5,"totalrainin":5.902,"solarradiation":35.48,"uv":0,"feelsLike":59.9,"dewPoint":58.17,"feelsLikein":68.4,"dewPointin":51.4,"lastRain":"2020-01-15T11:07:00.000Z","tz":"America/Chicago","date":"2020-01-15T21:52:00.000Z","macAddress":"MACADDRESS"}]
INFO:socketio.client:Received event "data" [/]
INFO:root:Data received: {'dateutc': 1579125120000, 'tempinf': 69.3, 'humidityin': 53, 'baromrelin': 29.876, 'baromabsin': 29.684, 'tempf': 59.9, 'humidity': 94, 'winddir': 194, 'windspeedmph': 0.2, 'windgustmph': 1.1, 'maxdailygust': 8.1, 'hourlyrainin': 0, 'eventrainin': 0, 'dailyrainin': 0.024, 'weeklyrainin': 0.024, 'monthlyrainin': 5, 'totalrainin': 5.902, 'solarradiation': 35.48, 'uv': 0, 'feelsLike': 59.9, 'dewPoint': 58.17, 'feelsLikein': 68.4, 'dewPointin': 51.4, 'lastRain': '2020-01-15T11:07:00.000Z', 'tz': 'America/Chicago', 'date': '2020-01-15T21:52:00.000Z', 'macAddress': 'MACADDRESS'}
INFO:root:Simulating some other task occurring...
INFO:engineio.client:Sending packet PING data None
INFO:root:Simulating some other task occurring...
INFO:engineio.client:Received packet PONG data None
INFO:root:Simulating some other task occurring...
INFO:root:Simulating some other task occurring...
INFO:root:Simulating some other task occurring...
INFO:root:Simulating some other task occurring...
INFO:engineio.client:Sending packet PING data None
INFO:root:Simulating some other task occurring...
INFO:engineio.client:Received packet PONG data None
INFO:root:Simulating some other task occurring...
INFO:root:Simulating some other task occurring...
INFO:root:Simulating some other task occurring...
INFO:engineio.client:Received packet MESSAGE data 2["data",{"dateutc":1579125180000,"tempinf":69.4,"battin":1,"humidityin":55,"baromrelin":29.74,"baromabsin":29.74,"tempf":60.8,"battout":1,"humidity":99,"winddir":15,"winddir_avg10m":353,"windspeedmph":2.5,"windspdmph_avg10m":3.4,"windgustmph":3.4,"maxdailygust":14.8,"hourlyrainin":0,"eventrainin":0.008,"dailyrainin":0.02,"weeklyrainin":0.039,"monthlyrainin":4.929,"yearlyrainin":30.142,"solarradiation":13.33,"uv":0,"pm25":3,"batt_25":1,"pm25_24h":2.9,"temp1f":68.5,"humidity1":57,"temp2f":68.7,"humidity2":56,"temp3f":70,"humidity3":53,"temp4f":60.4,"humidity4":80,"temp5f":60.3,"humidity5":86,"temp6f":73.6,"humidity6":47,"batt1":1,"batt2":1,"batt3":1,"batt4":1,"batt5":1,"batt6":1,"feelsLike":60.8,"dewPoint":60.52,"feelsLike1":67.7,"dewPoint1":52.7,"feelsLike2":67.9,"dewPoint2":52.4,"feelsLike3":69.2,"dewPoint3":52.1,"feelsLike4":60.4,"dewPoint4":54.2,"feelsLike5":60.3,"dewPoint5":56.1,"feelsLike6":72.9,"dewPoint6":52.1,"feelsLikein":68.6,"dewPointin":52.5,"lastRain":"2020-01-15T12:38:00.000Z","tz":"America/Chicago","date":"2020-01-15T21:53:00.000Z","macAddress":"MAC"}]
INFO:socketio.client:Received event "data" [/]
INFO:root:Data received: {'dateutc': 1579125180000, 'tempinf': 69.4, 'battin': 1, 'humidityin': 55, 'baromrelin': 29.74, 'baromabsin': 29.74, 'tempf': 60.8, 'battout': 1, 'humidity': 99, 'winddir': 15, 'winddir_avg10m': 353, 'windspeedmph': 2.5, 'windspdmph_avg10m': 3.4, 'windgustmph': 3.4, 'maxdailygust': 14.8, 'hourlyrainin': 0, 'eventrainin': 0.008, 'dailyrainin': 0.02, 'weeklyrainin': 0.039, 'monthlyrainin': 4.929, 'yearlyrainin': 30.142, 'solarradiation': 13.33, 'uv': 0, 'pm25': 3, 'batt_25': 1, 'pm25_24h': 2.9, 'temp1f': 68.5, 'humidity1': 57, 'temp2f': 68.7, 'humidity2': 56, 'temp3f': 70, 'humidity3': 53, 'temp4f': 60.4, 'humidity4': 80, 'temp5f': 60.3, 'humidity5': 86, 'temp6f': 73.6, 'humidity6': 47, 'batt1': 1, 'batt2': 1, 'batt3': 1, 'batt4': 1, 'batt5': 1, 'batt6': 1, 'feelsLike': 60.8, 'dewPoint': 60.52, 'feelsLike1': 67.7, 'dewPoint1': 52.7, 'feelsLike2': 67.9, 'dewPoint2': 52.4, 'feelsLike3': 69.2, 'dewPoint3': 52.1, 'feelsLike4': 60.4, 'dewPoint4': 54.2, 'feelsLike5': 60.3, 'dewPoint5': 56.1, 'feelsLike6': 72.9, 'dewPoint6': 52.1, 'feelsLikein': 68.6, 'dewPointin': 52.5, 'lastRain': '2020-01-15T12:38:00.000Z', 'tz': 'America/Chicago', 'date': '2020-01-15T21:53:00.000Z', 'macAddress': 'MAC'}
INFO:root:Simulating some other task occurring...
INFO:engineio.client:Sending packet PING data None
INFO:root:Simulating some other task occurring...
INFO:engineio.client:Received packet PONG data None
INFO:engineio.client:Received packet MESSAGE data 2["data",{"dateutc":1579125180000,"tempinf":69.1,"humidityin":53,"baromrelin":29.87,"baromabsin":29.678,"tempf":59.9,"humidity":94,"winddir":204,"windspeedmph":0,"windgustmph":0,"maxdailygust":8.1,"hourlyrainin":0,"eventrainin":0,"dailyrainin":0.024,"weeklyrainin":0.024,"monthlyrainin":5,"totalrainin":5.902,"solarradiation":32.9,"uv":0,"feelsLike":59.9,"dewPoint":58.17,"feelsLikein":68.2,"dewPointin":51.2,"lastRain":"2020-01-15T11:07:00.000Z","tz":"America/Chicago","date":"2020-01-15T21:53:00.000Z","macAddress":"MACADDRESS"}]
INFO:socketio.client:Received event "data" [/]
INFO:root:Data received: {'dateutc': 1579125180000, 'tempinf': 69.1, 'humidityin': 53, 'baromrelin': 29.87, 'baromabsin': 29.678, 'tempf': 59.9, 'humidity': 94, 'winddir': 204, 'windspeedmph': 0, 'windgustmph': 0, 'maxdailygust': 8.1, 'hourlyrainin': 0, 'eventrainin': 0, 'dailyrainin': 0.024, 'weeklyrainin': 0.024, 'monthlyrainin': 5, 'totalrainin': 5.902, 'solarradiation': 32.9, 'uv': 0, 'feelsLike': 59.9, 'dewPoint': 58.17, 'feelsLikein': 68.2, 'dewPointin': 51.2, 'lastRain': '2020-01-15T11:07:00.000Z', 'tz': 'America/Chicago', 'date': '2020-01-15T21:53:00.000Z', 'macAddress': ''}
INFO:root:Simulating some other task occurring...
INFO:root:Simulating some other task occurring...
INFO:root:Simulating some other task occurring...
INFO:root:Simulating some other task occurring...
INFO:engineio.client:Sending packet PING data None
INFO:root:Simulating some other task occurring...
INFO:engineio.client:Received packet PONG data None
INFO:root:Simulating some other task occurring...
INFO:engineio.client:Received packet MESSAGE data 2["device-data updated","2-b6d1e8cf5573c513bc6f0e1c9a2e2a53"]
INFO:socketio.client:Received event "device-data updated" [/]
INFO:engineio.client:Received packet MESSAGE data 2["device-data removed",[{"ok":true,"id":"5a50540d974be176ac88de44bf2aa028","rev":"2-3d1876eaf05175fe07ca2ef842a06578"}]]
INFO:socketio.client:Received event "device-data removed" [/]
INFO:engineio.client:Received packet MESSAGE data 2["device-data removed",{"cache-control":"must-revalidate","connection":"close","content-type":"application/json","date":"Wed, 15 Jan 2020 21:54:31 GMT","x-cloudant-action":"cloudantnosqldb.data-document.write","x-cloudant-cost-write":"1","x-couch-request-id":"edf092d0d5","x-frame-options":"DENY","strict-transport-security":"max-age=31536000","x-content-type-options":"nosniff","x-cloudant-request-class":"write","x-cloudant-backend":"bm-cc-us-south-20","via":"1.1 lb2.bm-cc-us-south-20 (Glum/1.84.0)","statusCode":201,"uri":"https://78a8cc5e-04af-4d62-9a35-0a08d6e56224-bluemix:b9773c947dee3c33b981fcb9a009d2f66bb3119a4df34e3236ddfeed65c9a544@78a8cc5e-04af-4d62-9a35-0a08d6e56224-bluemix.cloudant.com/ambient-prod-2/_bulk_docs"}]
INFO:socketio.client:Received event "device-data removed" [/]
INFO:root:Simulating some other task occurring...
INFO:root:Simulating some other task occurring...
INFO:root:Simulating some other task occurring...
INFO:engineio.client:Sending packet PING data None
INFO:engineio.client:Sending packet MESSAGE data 1
INFO:engineio.client:Sending packet CLOSE data None
INFO:socketio.client:Engine.IO connection dropped
INFO:engineio.client:Received packet PONG data None
INFO:engineio.client:Waiting for write loop task to end
INFO:engineio.client:Write loop: WebSocket connection was closed, aborting
INFO:engineio.client:Exiting write loop task
INFO:engineio.client:Waiting for ping loop task to end
INFO:engineio.client:Exiting ping task
INFO:engineio.client:Exiting read loop task
I see both devices in the data stream, which is good – that means the problem is mine to fix.
Would you be willing to generate temporary app/API keys for me to test with? I think that will be fastest. Feel free to reach out to me on the HASS discord, where I'm @bachya
.
Sure, i'll be happy to. Will be tomorrow before I can but I will.
On January 15, 2020 5:25:49 PM Aaron Bach notifications@github.com wrote:
I see both devices in the data stream, which is good – that means the problem is mine to fix. Would you be willing to generate temporary app/API keys for me to test with? I think that will be fastest. Feel free to reach out to me on the HASS discord, where I'm @bachya. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
@jwood55812 Thanks for keys. I can confirm that I don't see the additional temperature sensors for your station:
Will debug.
Alrighty, I can see what's going on. The integration creates sensors based only on the data coming from the Ambient websocket; however, I didn't account for the possibility that multiple stations might have different data sets and would, therefore, have different sensor sets. Dur. 😆
I'll get going on a fix.
Dude, you are freaking awesome! Thank you so much for being generous to fix this! People like you are what makes this a great project.
Home Assistant release with the issue: 103.5
Last working Home Assistant release (if known): Not sure if ever worked in this situation
Operating environment (Hass.io/Docker/Windows/etc.): Ubuntu Server 18.04 Docker - Hass.io Install
Integration: Ambient Weather
Description of problem:
I have 2 weather stations on my Ambient Weather account. One is a WS-2000 and the other is a WS-2902a. One (ws2000) is at my home and I have 6 temp/humidity sensors attached in different rooms. This Christmas I added a WS-2902a at my parents home and it has no external temp/humidity sensors. I have both on my AW account so I can just compare stats.
I noticed recently that I lost all the temp sensors on my ws-2000 in HA, however, it did pull in both stations. I tested further by removing the 2nd station from the AW site and redoing the integration. This time all the temp/humidity sensors were pulled in as expected. Adding the 2nd station back and re-running the integration lost the sensors again. I also checked the Rest API and it appears that all the sensor data is being presented from both stations. Hence, why I am filing the bug report here.
I realize I am very much a special case as most people will not have 2 stations. I also can create another account for the 2nd station if needed as a workaround. However, I did want to present the problem in case there was a possible fix.
Happy to provide further testing and information if needed.
Problem-relevant
configuration.yaml
entries and (fill out even if it seems unimportant):Traceback (if applicable):
Additional information: