Problem with the API for the eco-meter
Hello Leslie,
I can’t find the moduleID of my meter, can you help me please?
In hardware, I have:
– the DRIVIA module (Ref Legrand 412181)
– the connected ecocounter module (ref Legrand 412033)
– the DRIVA 16A remote control switch (Ref Legrand 412170)
Everything works fine on the Home + Control mobile app.
My problem comes at the level of API’s, I first do API / API LIST / HOME + CONTROL, then:
“Get users’ plants” (topology.read), I get:
{
“plants”: [{
“id”: “00000000618842cb98a0bf33d83e768f”,
“name”: “14D Le Haillan”,
“country”: “FR”
}]
}
Then I did “Get all plant’s modules status” (topology.read)
{
“modules”: {
“lights”: [{
“reachable”: true,
“status”: “off”,
“fw”: 62,
“consumptions”: [{
“unit”: “watt”,
“value”: 0,
“timestamp”: “2021-11-12T12: 29: 30 + 00: 00”
}],
“sender”: {
“plant”: {
“module”: {
“id”: “000000047434076c000474000083a178”
}
}
}
}],
“plugs”: [],
“automations”: [],
“energymeters”: [],
“remotes”: [],
“heaters”: []
}
}
I do find a remote switch (moduleID: 000000047434076c000474000083a178) but there is nothing in energymeters.
I checked in my “Get plant’s topology” method
I found my configuration of my house and room (ambients) and we can see that it has the remote switch in the “Garage” but not the ecocounter although it appears in the mobile application also in the garage
{
“plant”: {
“id”: “00000000618842cb98a0bf33d83e768f”,
“ambients”: [{
“id”: “618842cb98a0bf33d83e768fe5b859c9”,
“name”: “Labestyle electrical panel”,
“type”: “electrical_cabinet”,
“modules”: []
}, {
“id”: “618842cb98a0bf33d83e768ff5f4cf56”,
“name”: “Garage Labestyle”,
“type”: “garage”,
“modules”: [{
“id”: “000000047434076c000474000083a178”,
“name”: “Labestyle remote switch”,
“hw_type”: “NLPT”,
“device”: “light”
}]
}],
“modules”: []
}
}
I couldn’t test the “Get Energy Meter’s status” and “Get energymeter’s consumptions” methods because I don’t have the corresponding moduleID.
Under my developer account, in my applications, the one named “LSP API LEGRAND”, I have in the scopes:
Get the state of automations (shutters, louvres, …) (automation.read)
Get the state of lights (light.read)
Get consumption data (electricity, gas, water, …) (meter.read)
Get the state of plugs (plug.read)
Get available scenes (scene.read)
Access to audio and video data (audiovideoterminal.read)
Get comfort data (temperature, hygrometry, …) (comfort.read)
Activate scene (scene.launch)
Get state of locks (lock.read)
Get state of safety modules (safety.read)
Access to your player settings and see what your player is playing (player.read)
Read network configuration data (network.read)
Can you tell me what is missing please?
I did not find in the forum problem and solution associated with the eco-meter.
Laurent
Hello Laurent,
Thanks for the infos
Some Drivia modules are not integrated into Home + Control API on Works with Legrand. But we just published the documentation for it on Netatmo’s developer’s website : https://dev.netatmo.com/apidocumentation/control
The principle of this API is nearly the same with authentication, tokens, and so on (you can use your Home + Control end-user account to connect to the website). You also have a try-it section. In case of problems or questions about the API, I also do the developer’s support for Netatmo devices
Have a good day,
Leslie – Community Manager
Hello Leslie,
Thanks for your feedback, I went to test this API right away.
In my LEGRAND by Netatmo configuration, I always have:
– the DRIVIA module (Ref Legrand 412181)
– the connected eco-meter module (Legrand ref 412033)
– the DRIVA 16A remote control switch (Ref Legrand 412170)
In Home + Control API Documentation, I used the / homesdata to get my home_id and the other references.
I want to focus on the recovery of consumption data, I tried first on the impulse switch (DRIVA 16A):
In / homesdata I found:
{
id: “00: 04: 74: 00: 00: 83: a1: 78”
name: “Labestyle remote switch”
Toggle switch type: “NLPT”
setup_date: 1636319951
room_id: “4126461782”
bridge: “00: 04: 74: 34: 07: 6c”
}
I used the getmeasure method (see screenshoot # 1) and I found my data over the desired period (timestamp 1636416000 (on 11/9/2021 at 0:00:00) at timestamp 1636502400 (on 11/10 / 2021 at 0:00:00). I found the data by making the selection type sum_energy_elec $ 0 only:
{
body:[
{
beg_time: 1636417800
step_time: 3600
value: [
[
0
]
…
[
2
]
[
4
]
[
6
]
…
]
status: “ok”
time_exec: 0.2853410243988037
time_server: 1637014425
}
On the other hand concerning my eco meter, I cannot find any data although I have all the figures in the mobile application and also on the site https://home.netatmo.com/control (See screenshoot # 2 on the day from 11/09/2021)
In the method / homesdata, I have for him:
modules: [
{
id: “00: 04: 74: 12: 0a: 94”
type: “NLE”
name: “Ecometer Labestyle”
setup_date: 1636321298
room_id: “4126461782”
modules_bridged: [
“00: 04: 74: 12: 0a: 94 # 0”
“00: 04: 74: 12: 0a: 94 # 1”
“00: 04: 74: 12: 0a: 94 # 2”
“00: 04: 74: 12: 0a: 94 # 3”
“00: 04: 74: 12: 0a: 94 # 5”
“00: 04: 74: 12: 0a: 94 # 6”
“00: 04: 74: 12: 0a: 94 # 7”
“00: 04: 74: 12: 0a: 94 # 8”
]
}
I used in the getmeasure method the correct devide_id, the bridge for example for the # 5 which is the total “00: 04: 74: 12: 0a: 94” and the module_id “00: 04: 74: 12: 0a : 94 # 5 “:
{
id: “00: 04: 74: 12: 0a: 94 # 5”
type: “NLE”
name: “Total”
setup_date: 1636321301
room_id: “4126461782”
bridge: “00: 04: 74: 12: 0a: 94”
}
I can not get any consumption value on this eco meter module, I tried all the module_id, all types, all scale, keeping only the same period because I know there was data.
Do you have an idea to help me please?
Thanks in advance Leslie and see you soon,
Laurent
Hello Laurent,
Could you please also send your message here : https://dev.netatmo.com/contact-us-form in “I need support with Netatmo API”. It will be easier if I need to ask some questions to Netatmo’s developers
Meanwhile, I keep on investigating and I’ll answer you when I know more
Have a good day,
Leslie – Community Manager
Hello Leslie, it’s done I just sent the email using the form. Thank you in advance for your answers.
Laurent
Hello leslie,
Do you have any news on my request please?
I very much need to recover the data via the API please.
can i send you an example of my homedata to see all blind references?
if not do you have a person in contact to give me to see with him please?
Laurent
Hi Laurent,
I didn’t forget you 😉
I tested on my side and I also don’t retrieve infos from my Ecometer (but it’s a beta version and doesn’t catch correctly some data … so I can also have an issue on my side). But it’s more probable that there is an problem with the API on this endpoint
I have a meeting with developers on Tuesday to perform some other tests and try to see what is happening
We should have enough information from your installation to investigate, I’ll tell you via Netatmo’s mailing tool if I need more information from you
Thanks for your patience and have a good day,
Leslie – Community Manager
Hello Leslie,
Thank you for your answer, and waiting for your feedback, I just wanted to clarify that in my tests, this API method works very well with a switch module, between the blind id and the module everything works, there is only the eco-meter that does not work with the same philosophy of ID
Laurent
Hello Laurent, Leslie,
I have the exact same issue with my ecometer.
Did you find any solution to get the values from the API?
Regards.
Étienne
Hello Etienne,
I saw your message on Netatmo’s side, I’ll answer to you here 😉
Have a good day,
Leslie – Community Manager
Bonjour Etienne,
Pouvez vous me joindre par mail à : laurent.berthe@gmail.com svp ?
Nous pourrons échanger sur notre problématique commune !
Laurent
Hello Jeremy,
I saw your message via the Netatmo’s API form and Netatmo’s forum : I answered you there
As the Home + Control API on Works with Legrand is deprecated, the ecometer will not be integrated. It will be done on Home + Control API on Netatmo Connect. As already said, there is a problem for now on the method and developers are working to fix it
Have a good day,
Leslie – Community Manager
You must be logged in to reply to this topic.