Airthings / wave-reader

MIT License
50 stars 18 forks source link

Value cannot be read after latest FW update #1

Closed bortek closed 5 years ago

bortek commented 5 years ago

I have purchased two new Wave devices and connected first with the my Andround phone to test. During setup it updated the FW on the devices. Android app can read and connect to WAVE but the python script fails to do so spotting out "comerr"

I tested with gatttool to reach the characteristics and got these ones.

characteristics handle: 0x0002, char properties: 0x02, char value handle: 0x0003, uuid: 00002a00-0000-1000-8000-00805f9b34fb handle: 0x0004, char properties: 0x02, char value handle: 0x0005, uuid: 00002a01-0000-1000-8000-00805f9b34fb handle: 0x0006, char properties: 0x02, char value handle: 0x0007, uuid: 00002a04-0000-1000-8000-00805f9b34fb handle: 0x0008, char properties: 0x02, char value handle: 0x0009, uuid: 00002ac9-0000-1000-8000-00805f9b34fb handle: 0x000c, char properties: 0x02, char value handle: 0x000d, uuid: b42e4dcc-ade7-11e4-89d3-123b93f75cba handle: 0x000f, char properties: 0x2c, char value handle: 0x0010, uuid: b42e50d8-ade7-11e4-89d3-123b93f75cba handle: 0x0013, char properties: 0x10, char value handle: 0x0014, uuid: b42e538a-ade7-11e4-89d3-123b93f75cba handle: 0x0018, char properties: 0x1c, char value handle: 0x0019, uuid: f000ffc1-0451-4000-b000-000000000000 handle: 0x001c, char properties: 0x1c, char value handle: 0x001d, uuid: f000ffc2-0451-4000-b000-000000000000 handle: 0x0020, char properties: 0x14, char value handle: 0x0021, uuid: f000ffc5-0451-4000-b000-000000000000 handle: 0x0025, char properties: 0x02, char value handle: 0x0026, uuid: 00002a23-0000-1000-8000-00805f9b34fb handle: 0x0027, char properties: 0x02, char value handle: 0x0028, uuid: 00002a24-0000-1000-8000-00805f9b34fb handle: 0x0029, char properties: 0x02, char value handle: 0x002a, uuid: 00002a25-0000-1000-8000-00805f9b34fb handle: 0x002b, char properties: 0x02, char value handle: 0x002c, uuid: 00002a26-0000-1000-8000-00805f9b34fb handle: 0x002d, char properties: 0x02, char value handle: 0x002e, uuid: 00002a27-0000-1000-8000-00805f9b34fb handle: 0x002f, char properties: 0x02, char value handle: 0x0030, uuid: 00002a29-0000-1000-8000-00805f9b34fb

None of these are present in the python code.

Have they been changed with the latest FW if so can you clarify which ones should be which so I can update in the python code?

bortek commented 5 years ago

I figured out now that the python code for Waveplus is working with Wave (Wave with firmware version MSP:1.1.0 CC:1.2.0 SUB1:) and it needs only one UUID that stores all the necessary data. That is UUID=b42e4dcc-ade7-11e4-89d3-123b93f75cba (or handle 0x000c). Just ignore CO2 and VOC levels. So take the code from Waveplus and replace UUID with above. Edit printout as you wish.

Guys perhaps you should update Wave code as well, perhaps create a new branch called like firmware version and put it there.

orjangj commented 5 years ago

Hi bortek,

From the list of characteristics you have provided, I can see that you do not have a Wave but a second generation Wave 2 device. If the serial number of your devices starts with 2950, then this should confirm this. The Wave 2 devices behaves similarly to Wave +, but with different characteristic uuids. So this is why your PR #2 works for your device.

I cannot accept the PR since it would break compatibility with the first generation Wave devices. I will however, in the near future, add a new repository for a Wave 2 reader script. I'll happily look at a PR when that time comes.

Best regards

bortek commented 5 years ago

Thanks for your comment. That explains all the strangeness that I've experienced yesterday :) Now I have two Waves of 2nd gen and one 1st gen so I will have to maintain two different scripts :) No worries with the PR.

bortek commented 5 years ago

@orjangj I need to ask you one more question. In the Android app it show also the Air quality. I pressume it is a CO2 data that is being shown? I dont see any data reported by "working" python script though. Does it have a CO2 sensor and or/VOC sensor too. If not why is Android app showing it?

orjangj commented 5 years ago

I'm not familiar with how the Android app chooses to display, name or use its sensor readings to provide additional measures. I'll get back to you with a more thorough reply when I've talked to the App team.

Anyway, since this issue is closed, I'm not getting notifications when you post here. I was just scrolling through here by chance to see if you had more questions. Also, this question should probably be asked through customer support channels as you're more likely to get a faster response.

Best regards

orjangj commented 5 years ago

Hi @bortek

Wave 2 does not have CO2 or VOC sensors. The App team says that "Air Quality" is based on the radon measurements only (for Wave and Wave 2).

Hope this answers your questions.

Best regards

bortek commented 5 years ago

Great! Then I know. Thanks for checking it out.