xperimental / netatmo-exporter

Prometheus exporter for Netatmo sensor data.
MIT License
44 stars 18 forks source link

Integration with Netatmo Energy (thermostat/valves)? #33

Open giuliomagnifico opened 1 year ago

giuliomagnifico commented 1 year ago

Hi, I’m using this exporter and it’s great, thanks for it.

I’m also using the Netatmo smart thermostat and is very useful to integrate both services in one dashboard.

At the moment I’m using this exporter for the Energy: https://github.com/tipok/netatmo_energy_exporter

but it’s not well made, the queries are using some weird names, it’s hard to identify the correct sensors and call to it, etc… well I’ve done anyway but -since I know nothing of Golang- I was wondering if you can integrate this code into your exporter. I don’t think it should be complicated and this would result in one exporter for all the Netatmo service.

Obviously if you don’t have time, doesn’t matter.

Thanks anyway :)

xperimental commented 1 year ago

Good idea, I do not have any of these thermostats to test though, so this will be purely based on the documentation...

I think I'll tackle this after the authentication change is released.

giuliomagnifico commented 1 year ago

I have the thermostat only at the moment but surely there are people who own also the valves.

Yes you can use the code already written (that I’m using and is working fine) plus the docs. If you open a beta branch or whatever I can help you, unfortunately I’m not good in Go language.

Thanks anyway.

giuliomagnifico commented 1 year ago

Hi @xperimental just to update this post, now the old netatmo energy exporter doesn't work anymore due to the autenthication changes from Netatmo, but when you generate the access and refreshtoken via Netatmo dev web page, you can also specify to read the thermostat API

Screenshot 2023-07-14 at 09 26 34

So I think you have only the add to your exporter the parameters to read the thermostat and valves and it should work.

If you want I can test it, if you make something like a new branch I will clone into it and try to test it.

Thanks anyway

xperimental commented 1 year ago

Yes, reading data other than weather will require new scopes.

I have not looked at the API docs for this yet, it's probably also a different endpoint.

We can have a look, once the authentication situation is sorted :slightly_smiling_face:

giuliomagnifico commented 1 year ago

@xperimental thanks for the reply, I have no idea of Go language but if there are only some new scopes and a new endpoint I can try to modify your exporter adding the new scopes/endopoint and compiling it. So I can help without rely at all on your work.

If you have a link to the documentation some little tricks let me know, anyway we have some months before we will use again the thermostat fortunately 😂 (I live in Italy: 45°C now)

DEEJCUK commented 7 months ago

https://github.com/tipok/netatmo_energy_exporter this project reads thermostat and TRV data but its stopped working as it seem the auth flow changed again, any chance your project can implement the thermostat readings ? it would be super nice to get the data from one exporter

xperimental commented 7 months ago

Thanks @DEEJCUK . The project was already mentioned in this thread.

I know it's been well over a year, but I can see that other data is the most requested feature for the exporter. I hope that one of the next days will be a "private open-source projects" day again.