sdavides / AqaraPOST-Homeassistant

Aqara devices on Homeassistant
38 stars 2 forks source link

getting certificate onto phone #1

Closed J0han3s closed 8 months ago

J0han3s commented 8 months ago

Thank you for this. Really great tutorial. Really appreciate your efforts. please can you give more details on how you load the certificate onto the android phone. (should the CA certificate be saved as a '.cert', or '.pem' file?

Thanks

sdavides commented 8 months ago

on my phone pem, it depends on your smartphone, download the file to your phone and search for install certificate in the settings

sdavides commented 8 months ago

For some phones you need to enable developer settings

J0han3s commented 8 months ago

thanks. Will try again tomorrow and let you know how it does.


From: sdavides @.> Sent: Friday, February 23, 2024 11:17:15 PM To: sdavides/AqaraPOST-Homeassistant @.> Cc: gkchim @.>; Author @.> Subject: Re: [sdavides/AqaraPOST-Homeassistant] getting certificate onto phone (Issue #1)

For some phones you need to enable developer settings

— Reply to this email directly, view it on GitHubhttps://github.com/sdavides/AqaraPOST-Homeassistant/issues/1#issuecomment-1962125784, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AK3CPFC7OMWT4QUQSQYRKWDYVEPPXAVCNFSM6AAAAABDXPDMQGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRSGEZDKNZYGQ. You are receiving this because you authored the thread.Message ID: @.***>

J0han3s commented 8 months ago

Thanks - I have managed to load certificate I am almost there. I have tried to complete the Node Red stage, but i am getting errors:

on replacing my details in Node Red, there are two things i am not sure about.

1) in Burp Suite, it gives me "Area: EU". However in the Node Red flow, it asks for country, how should i deal with this? 2) in Node Red, it asks for subject id begining with 'lumi1.". However, in burp, i find 2 subject id. the first begins with "lumi.1" the other begins with "lumi.5". Does it matter which one i should use?


24/02/2024, 15:49:37 [node: change dataKey = friendly-resource](http://192.XXXX:8123/api/hassio_ingress/LZtPnAc-ppO5POKB9BJwnFOH4tqhAnmzbCBwjQzOT1o/#) function : (error)
"TypeError: Cannot read properties of undefined (reading 'attr')"

24/02/2024, 15:49:42[node: set eventlog](http://192.xxxx:8123/api/hassio_ingress/LZtPnAc-ppO5POKB9BJwnFOH4tqhAnmzbCBwjQzOT1o/#)
function : (error)
"TypeError: Cannot read properties of undefined (reading 'resourceId')"
24/02/2024, 15:49:52[node: change dataKey = friendly-resource](http://192.33:8123/api/hassio_ingress/LZtPnAc-ppO5POKB9BJwnFOH4tqhAnmzbCBwjQzOT1o/#)
function : (error)
"TypeError: Cannot read properties of undefined (reading 'dataKey')"
24/02/2024, 15:50:02[node: Camera G3 Face Know](http://192.:8123/api/hassio_ingress/LZtPnAc-ppO5POKB9BJwnFOH4tqhAnmzbCBwjQzOT1o/#)
msg : error
"InputError: Attribute: TypeError: Cannot read properties of undefined (reading 'faceName')"
sdavides commented 8 months ago

lumi1 and lumi5 are the devices you have, usually the mac address. You can find all the necessary data in burp suite. Remember that the flow is developed for camera-hub g3, what device do you have?

sdavides commented 8 months ago

If you have not set any facial recognition on the G3 camera, disable this node "Camera G3 Face Know" and relative autoboot

sdavides commented 8 months ago

country into node red is for time format

J0han3s commented 8 months ago

lumi1 and lumi5 are the devices you have, usually the mac address. You can find all the necessary data in burp suite. Remember that the flow is developed for camera-hub g3, what device do you have?

thanks. I have camera-hub g3. maybe the second mac address is for a contact sensor i have currently linked.

J0han3s commented 8 months ago

country into node red is for time format

for UK would this be 'gb-GB' ? not sure what the correct format should be

J0han3s commented 8 months ago

Also, i cannot see anywhere in Node-Red to put in the 'client id' - should there be somewhere i put this?

sdavides commented 8 months ago

es-ES en-UK de-DE it-IT pt-PT es-ES

client ID is not needed, use automatic configuration.

otherwise you can put manually: immagine

J0han3s commented 8 months ago

So, I am trying to do a little bit of debugging and added 2 debugging nodes:

image

here is the output from the second node. indicating a problem

image

Here is the debug node 1 output, which shows the payload going into the debug mode. Can you see any issues here?

image

J0han3s commented 8 months ago

I have added two more nodes.

image

It seems problem is coming at the the convert time stage/node:

image

this is what i have for my country.

en-UK image

sdavides commented 8 months ago

sorry, so I can't help you, I should have your data to do some tests, have you tried with time it-IT?

sdavides commented 8 months ago

basically you have to analyze the request on burp and replicate it, the time conversion is not part of the burp request.

J0han3s commented 8 months ago

sorry, so I can't help you, I should have your data to do some tests, have you tried with time it-IT?

is there anyway i can share my data with you securely? I am confident in the data i got from Burp

sdavides commented 8 months ago

if you want ok, but I can check your device and credentials I don't know how they can be disabled, at your own risk

sdavides commented 8 months ago

en-UK is correct

J0han3s commented 8 months ago

sorry, so I can't help you, I should have your data to do some tests, have you tried with time it-IT?

just tried this, with no change

sdavides commented 8 months ago

if you want to give me the data, create an aqara account with the devices at the end delete the account and create another one for you

J0han3s commented 8 months ago

if you want to give me the data, create an aqara account with the devices at the end delete the account and create another one for you

Cheers. I'll do that

J0han3s commented 8 months ago

Please can you drop me an email: xvga3va2@duck.com > this way i can email you my details in private

sdavides commented 8 months ago

sent

J0han3s commented 8 months ago

sorry, please send again: 3s5i9nah@duck.com

J0han3s commented 8 months ago

Thank you - this now works. after resetting my account and trying different details all now works! Thank you very much. I think it was my subject id that was incorrect

sdavides commented 8 months ago

yes you wrote lumi.1xxx instead of lumi1.xxx