API /homesdata and /homestatus

mailpublic35

Hello,

I followed the documentation:
https://dev.netatmo.com/apidocumentation/control#homestatus
and
https://dev.netatmo.com/apidocumentation/control#homesdata

The schema to use is identical, so copy paste between the code,  except  the word homestatus to be replaced by homesdata.  The parameters gateway_types  or  device_types   are not used. I try basic request so only home_id

It works perfectly for homedata, however for homestatus the result is:

 Connection #0 to host api.netatmo.com left intact
array(1) {
 ["error"]=>
 array(2) {
   ["message"]=>
   string(55) "Unexpected token '-', "----------"... is not valid JSON"
   ["code"]=>
   int(400)
 }
}

The token is the same for both functions.
Any idea?
Thanks
Phil

0

Commentaires

66 commentaires

  • Comment author
    mailpublic35
    • Modifié

    Hello @Leslie,
    Thanks for your answer.
    hum, on the download page: https://www.domoticz.com/downloads/
    The official stable version available is: 2024.7.16157
    This is the version [Status: Domoticz V2024.7 (c)2012-2024 GizMoCuz] running since ... july 2024 without any issue about Netatmo login.
    So it does'nt work anymore the issue is not on this side, I think.

    I just retry on my side, with the new app created last week and I requested a  new code,
    Same result (hour indicated is french time, so UTC +1 )
    2025-03-24 16:51:30.467 Error: Netatmo: Invalid/no data received.

    Have a look here,  even with the latest(beta) version .. netatmo returns 400
    https://forum.domoticz.com/viewtopic.php?p=324644#p324644



    Phil


    0
  • Comment author
    cadkey
    • Modifié

    Hello,
    No, it's not the Netatmo API that's returning this message, but Domoticz. The Domoticz code contains an error, and the error interpretation is therefore necessarily incorrect as well. The API always returns a JSON file. This also returns a JSON file:

    https://api.netatmo.com/

    API response:

    {"error":{"code":11,"message":"Unable to match incoming request to an operation."}}

    On GitHub, the Domoticz developers say they found the problem and fixed it. Long story short, the API connection is validated in Domoticz, but the Domoticz code most of the time mistakenly returns a false connection. ;)

    0
  • Comment author
    mailpublic35

    Hello,
    Ok, why not, 
    so how to explain, that the version 2024.7 installed and up & running since July 2024 doesn't not work anymore. If nothing changes on the client side (raspberry pi / domoticz 2024.7)  what about the server side ie netatmo ?

    0
  • Comment author
    cadkey

    Who said nothing has changed on the Netatmo side? I hope it's evolving and progressing. I'm saying there's no API error. Read the Github, the implementation is bad, strange, that's what the developers themselves wrote in their Github messages. Read the passage about the frequency of requests sent by Domoticz which suddenly go from 15 minutes to 30 seconds, it's very informative.

    1
  • Comment author
    cadkey
    • Modifié

    I make very regular requests, among other things to reduce electricity consumption. You can get a preview on this temporary link, accessible for a few hours: https://script.cadkey.synology.me/dY%C2%B0)sqgjTLxwd452+!47.html
    I control about seventeen Legrand devices, which generate this consumption graph, but mostly on/off power outlets and interactions with the environment, presence, and other APIs. No errors for several days. The API works, it works very well! 

     

    0
  • Comment author
    mailpublic35

    @cadkey ,  très jolis graphes / bravo !

    0

Vous devez vous connecter pour laisser un commentaire.