Netatmo API linked to Workflow


#22

Hey Leighton, Shortcut is installed and I have set it up as instructed. So far it’s capable of pulling down my indoor main data again but is failing to grab info from my outdoor sensors. So I did some tinkering and noticed by changing the number from 0 to 1 it was able to pull my additional module in my bedrooms temperature, and by changing the number to 2 it was able to get me an outside temp but that is as far as it seems to work. Any suggestions? I apologise for the basic level I am, I have learnt so much from this thread alone :).


#23

I completely reworked this to slimline it as much as possible and make it work theoretically with any modules. As I don’t have a wind or rain sensor I can’t test it on those though.

Netatmo Weather

The Shortcut is still quite long, though in part that’s to make it formatted in a way that when it is spoken it sounds natural.


#24

Thanks so much Rosemary for sharing this. Great read out of all my indoor sensors. It’s still not grabbing my rain guage or wind guage though but I will continue tinkering.

I am eagerly looking forward to seeing what Leighton does with the separation for a shortcut for each module.

Some incredible team work here!


#25

That’s odd, according to the diagram above it should be!


#26

It’s getting my station names correct (my wind guage is called Anemometer) , just not pulling any data for them.

Rain is saying 0 (0.6mm fell today).
And Anemometer is .

Still tinkering :).


#27

Every other sensor is getting the correct data. Just outdoor rain and wind sensors arent. It’s a good sign the module names are all correct though :slight_smile:


#28

I also just noticed I am not seeing my main module read out at all, or even it’s name.


#29

I forgot the main module doesn’t count as a module (which is very annoying, I wish it did!), here’s a new version which accounts for the main module, sadly there’s a lot of duplicated logic now: https://www.icloud.com/shortcuts/cb0d0f337e60453e84b922a5401b1511


#30

Well done Rosemary! :clap:t2:

What a sensational readout.

Alas the rain guage and wind module still aren’t providing any data apart from the module names :S. I know you don’t have those 2 outdoor modules so it’s impossible for you to test.


#31

If you’d be willing to send me the complete JSON you get back from the call I can dig into it and see what it’s not doing.


#32

I really appreciate that Rosemary.

Absolutely!

You may need to guide me where I can get this for you as I am at a very basic level but love to learn :).

Thanks again for your amazing support !

I’m just heading to bed (had a late night - Brisbane, Australia). Will action this in the morning :).


#33

I sent you a personal message as the data contains the co-ordinates of your module which I think it’s best if you don’t post in an open forum :wink:

For everyone who just wants to see all the data they get back, there’s this Shortcut:

https://www.icloud.com/shortcuts/103844962e9f4cb09fd4bdb7cd90e881


#34

Any progress Leighton?


#35

Hi there @IslandSandMan, I have now completed the desired shortcuts you wanted, they are good ideas and work in a way like Homekit should have done (if Netatmo ever gets around to it :upside_down_face:). The only problem I have found is that because I do not have extra indoor sensors like you do I haven’t made shortcuts for them yet. I know it would be in the same area as the there modules but in what order they are presented I am unsure. I have made some notes to help me break down the huge JSON File that is given by Netatmo and hopefully it helps you. As you can see, for me Index 0 in the loop of the shortcut is rain, index 1 is wind and index 2 outdoor. Can you investigate at what index are the indoor sensors then I can quickly make a shortcut for you that does those last two modules. This shortcut will get the modules part of the API Call and allow me to investigate it if you don’t understand what I’m saying (DM it to me if you want). As for the other modules, their shortcuts are attached below, enjoy and get back to me if there is anything you need me to do
Indoor
Outdoor
Wind
Rain


#36

Thanks so much for all your help buddy! This is awesome. I sadly still are only getting data from my living room sensor and nothing else, but Rosemary is helping trying and work out why. You have put some awesome effort in here! The dream is now coming true :slight_smile:


#37

You too kind with your support buddy!


#38

On Rosemary’s version I am getting data from all other indoor sensors and the outdoor module but still not the wind and rain, she said the data doesn’t confirm to the standard at all.


#39

This is correct. For every module but those two you get a list of data types which are present. For these modules you just get data which is very annoying.


#40

Hmm, interesting that it is broken down like that @RosemaryOrchard and @IslandSandMan. Can either of you do a tree diagram of the JSON file so I can investigate and see wether I can easily adapt my shortcuts to get the right data? I have used This website before to make the tree diagram which allowed me to see where I needed to go. It’s a shame that the JSON dump changes from user to user, there is always some complication in coding and this is the one we have met!


#41

Oh I have figured out the issue with the shortcut @RosemaryOrchard! The reason it doesn’t work is because the shortcut in the 2nd loop is only querying for: Temperature, Humidity, Sound, CO2 and Pressure. This can be successfully retreived by the extra indoor sensors and outdoor module, but can not by the rain and wind sensors. Their data is labeled as: sum_rain_24 and sum_rain_1 for the rain and for the wind it’s under: GustStrength, GustAngle, WindStrength and WindAngle. I personally don’t know how to add these queries your shortcut as it automatically retrieves the Temperature Humidity etc Query automatically and don’t know how to add it in to this loop. But that is what I believe to be the issue, can you verify what I think? I’ll try to annotate your shortcut with comments and send it back to you so you can see what I mean, but when this issue is resolved your shortcut should work in more situations compared to mine as yours can adapt to wether a person has one or many modules where mine lacks this flexibility. Thanks for all your work so far and help with this issue