Find the Module Mac Adress
I use the getmeasure in Python code to get historical measures. But to get access to the outdoor-unit i must have a value for module_id in the code and reads that this must be the mac-address.
https://dev.netatmo.com/apidocumentation/control#getmeasure
For the indoor-unit i use this code: device_id='xx:xx:xx:xx:xx:xx'
And for the outdoor unit it ask for: module_id=' ? ', but i cant find what i should use here.
Can anyone help me?
Comments
7 comments
Hello,
You must perform a call to /homesdata endpoint (https://dev.netatmo.com/apidocumentation/control#homesdata)
In the JSON response check for the "id" value of the NAModule1 (it's the outdoor module)
Then, use it in your /getmeasure call to get data related to it
Have a good day,
Leslie - Community Manager
Hello and thank for your fast answer.
I tried with my client id:671ea6187aad507ff0055093 in the GET/homesdata (your link) but the response body i empty. I tried to paste the: https://api.netatmo.com/api/homesdatahome_id=671ea6187aad507ff0055093 in å browser and got this:
"Access token is missing"
So what do i do wrong?
Hello,
Your client_id is not your home_id. It's the "id" value in "homes" array (I checked in database, your home_id finishes with "eda"). Here, you used the "id" value in "user" array
Have a good day,
Leslie - Community Manager
Hello. We are getting closer i think. I had an idea the the client_id was something other, but the number format was so similar so i tried it. But i can't find the home_id, where is it? I have searched everywhere on my pc and app, but no luck.
Hi again,
When you perform a call to /homesdata by just being connected to the developer website with your end-user account, you don't need to fill "home_id" field
Just connect, leave all fields empty, and click on "execute /homesdata" and you'll get the value
Have a good day,
Leslie - Community Manager
That did the trick! Now it works!. Thank you.
I tried tried this too:
https://helpcenter.netatmo.com/hc/en-us/articles/5604016495378-How-do-I-find-my-product-s-serial-number-or-its-MAC-address
It says: "The MAC address can be deduced from the serial number. Simply replace the letter 'g' in the serial number with '70:ee:50' and complete it with the final six characters of the serial number. For example, if the serial number is g123456, the MAC address is 70:ee:50:12:34:56"
The correct MAC address is: 02:00:00:b5:1b:e4. (the last 6 digit is om my outdoor unit)
So the '70:ee:50' is wrong? In my case i should have used '02:00:00' and it have worked?
Thank you again and have a nice day.
Regards Roy
Hi Roy,
02:xx:xx.... corresponds to the id related to Outdoor Modules (it's 05:xx:xx for example for the rain gauge)
70:ee:xx... corresponds to the Main (indoor) module MAC Address. It's the bridge that gathers information sent by other modules and communicates them with your router
Have a good day,
Leslie - Community Manager
Please sign in to leave a comment.