Planning thermostat : Bad Request

Bonjour

J’utilise des plannings de thermostat et tout fonctionnait correctement jusqu’à fin mars.
Maintenant je vois des messages Bad request et le planning ne change pas sur le compte Netatmo.
Je viens d’installer la version Beta pour voir si c’est mieux, mais idem.

Voici les logs actuels :

[2025-06-23 09:06:15][ALERT] : Starting task (PNtaRelaisTermostat/Planning #3503)
[2025-06-23 09:06:15][ERROR] : execute:: ex:'Netatmo\\Exceptions\\NAApiErrorType - 400 - bad request'
[2025-06-23 09:06:15][ERROR] : Erreur exécution de la commande [Maison][PNtaRelaisTermostat][Planning] : bad request
[2025-06-23 09:10:05][ALERT] : cron5:: ex:'GuzzleHttp\\Exception\\ClientException - 403 - Client error: `POST https://app.netatmo.net/api/homesdata` resulted in a `403 Forbidden` response: {"error":{"code":2,"message":"Invalid access token"}} '
[2025-06-23 09:15:04][ALERT] : cron5:: ex:'GuzzleHttp\\Exception\\ClientException - 403 - Client error: `POST https://app.netatmo.net/api/homesdata` resulted in a `403 Forbidden` response: {"error":{"code":2,"message":"Invalid access token"}} '
[2025-06-23 09:17:56][ALERT] : Starting task (PNtaRelaisTermostat/Planning #3503)
[2025-06-23 09:17:56][ERROR] : execute:: ex:'Netatmo\\Exceptions\\NAApiErrorType - 400 - bad request'
[2025-06-23 09:17:56][ERROR] : Erreur exécution de la commande [Maison][PNtaRelaisTermostat][Planning] : bad request
[2025-06-23 09:20:04][ALERT] : cron5:: ex:'GuzzleHttp\\Exception\\ClientException - 403 - Client error: `POST https://app.netatmo.net/api/homesdata` resulted in a `403 Forbidden` response: {"error":{"code":2,"message":"Invalid access token"}} '
[2025-06-23 09:47:15][ALERT] : Starting task (PNtaRelaisTermostat/Planning #3503)
[2025-06-23 09:47:16][ERROR] : execute:: ex:'Netatmo\\Exceptions\\NAApiErrorType - 400 - bad request'
[2025-06-23 09:47:16][ERROR] : Erreur exécution de la commande [Maison][PNtaRelaisTermostat][Planning] : bad request
[2025-06-23 09:50:04][ALERT] : cron5:: ex:'GuzzleHttp\\Exception\\ClientException - 403 - Client error: `POST https://app.netatmo.net/api/homesdata` resulted in a `403 Forbidden` response: {"error":{"code":2,"message":"Invalid access token"}} '
[2025-06-23 09:55:04][ALERT] : cron5:: ex:'GuzzleHttp\\Exception\\ClientException - 403 - Client error: `POST https://app.netatmo.net/api/homesdata` resulted in a `403 Forbidden` response: {"error":{"code":2,"message":"Invalid access token"}} '
[2025-06-23 09:58:30][ALERT] : Starting task (PNtaRelaisTermostat/Planning #3503)
[2025-06-23 09:58:30][ERROR] : execute:: ex:'Netatmo\\Exceptions\\NAApiErrorType - 400 - bad request'
[2025-06-23 09:58:30][ERROR] : Erreur exécution de la commande [Maison][PNtaRelaisTermostat][Planning] : bad request
[2025-06-23 10:00:04][ALERT] : cron5:: ex:'GuzzleHttp\\Exception\\ClientException - 403 - Client error: `POST https://app.netatmo.net/api/homesdata` resulted in a `403 Forbidden` response: {"error":{"code":2,"message":"Invalid access token"}} '

Dans la configuration quand je fais Association, je vois bien l’oiseau ensuite, donc rien n’a changé.

Merci pour votre aide.

Peux-tu mettre à jour avec la dernière version beta du plugin ?
Il faut bien entendu associer à nouveau ton compte Netatmo et refaire une synchronisation.

Il ne devrait y avoir aucun soucis pour synchroniser tes équipements.
Par contre, il est encore possible d’avoir des erreurs lors de l’exécution de commandes mais uniquement ce cas précis.

Merci pour ta rapidité de réaction.
J’ai bien réussi à associer de nouveau, la cascade est apparue.
Par contre la synchronisation ne se fait pas.
Voici le message d’erreur :
Capture d’écran 2025-06-24 à 16.42.48

Et les logs :

[2025-06-24 16:34:55][DEBUG] : temperatureToCSS:: temperature:35.6
[2025-06-24 16:34:55][DEBUG] : temperatureToCSS:: temperature:30.5
[2025-06-24 16:34:55][DEBUG] : WindStrengthToLib:: wstrength:4.0
[2025-06-24 16:34:55][DEBUG] : WindAngleToLib:: wangle:0.0
[2025-06-24 16:34:55][DEBUG] : temperatureToCSS:: temperature:28.7
[2025-06-24 16:34:55][DEBUG] : temperatureToCSS:: temperature:31.2
[2025-06-24 16:35:02][DEBUG] : cron:: refresh:''
[2025-06-24 16:35:03][DEBUG] : synchronize:: update:true
[2025-06-24 16:35:03][DEBUG] : synchronize:: scope:'read_station;read_presence access_presence read_camera access_camera read_smokedetector;read_thermostat write_thermostat'
[2025-06-24 16:35:03][DEBUG] : synchronize:: Weather
[2025-06-24 16:35:03][DEBUG] : NARequest:: 'GET' 'https://api.netatmo.com/api/getstationsdata?get_favorites=false' ''
[2025-06-24 16:35:03][ALERT] : cron5:: ex:'GuzzleHttp\\Exception\\ClientException - 400 - Client error: `POST https://app.netatmo.net/oauth2/token` resulted in a `400 Bad Request` response: {"error":"invalid_grant"} '
[2025-06-24 16:35:04][DEBUG] : getIconFile::
[2025-06-24 16:35:04][DEBUG] : getIconFile::
[2025-06-24 16:35:04][DEBUG] : getIconFile::
[2025-06-24 16:35:04][DEBUG] : getIconFile::
[2025-06-24 16:35:04][DEBUG] : getIconFile::
[2025-06-24 16:35:04][DEBUG] : getIconFile::
[2025-06-24 16:35:04][DEBUG] : getIconFile::
[2025-06-24 16:35:04][DEBUG] : getIconFile::
[2025-06-24 16:35:04][DEBUG] : getIconFile::
[2025-06-24 16:35:09][DEBUG] : ajax:: redirectURI:'https://app.netatmo.net/oauth2/authorize?client_id=685918a817c2af8cc30221f3&redirect_uri=https://jeedomcrystal.cicard.fr/plugins/netatmopro/core/php/NARedirectURI.php&scope=read_station read_magellan write_magellan read_bubendorff write_bubendorff read_smarther write_smarther read_thermostat write_thermostat read_camera write_camera access_camera read_doorbell access_doorbell read_mx write_mx read_presence write_presence access_presence read_homecoach read_carbonmonoxidedetector read_smokedetector read_mhs1 write_mhs1&state=jT20k51VE8fLk63Jnp2tpWSYxhc1HE5b'
[2025-06-24 16:35:38][DEBUG] : redirectURI:: QUERY_STRING:'state=jT20k51VE8fLk63Jnp2tpWSYxhc1HE5b&code=8ea9f8c1e4caa074e02ead7c130c589e'
[2025-06-24 16:35:38][DEBUG] : redirectURI:: output:array ( 'state' => 'jT20k51VE8fLk63Jnp2tpWSYxhc1HE5b', 'code' => '8ea9f8c1e4caa074e02ead7c130c589e', )
[2025-06-24 16:35:38][DEBUG] : redirectURI:: response:GuzzleHttp\Psr7\Response::__set_state(array( 'reasonPhrase' => 'OK', 'statusCode' => 200, 'headers' => array ( 'Date' => array ( 0 => 'Tue, 24 Jun 2025 14:35:38 GMT', ), 'Content-Type' => array ( 0 => 'application/json', ), 'Transfer-Encoding' => array ( 0 => 'chunked', ), 'Connection' => array ( 0 => 'keep-alive', ), 'Cache-Control' => array ( 0 => 'no-store', ), 'X-XSS-Protection' => array ( 0 => '1; mode=block', ), 'Access-Control-Allow-Origin' => array ( 0 => '*', ), 'Strict-Transport-Security' => array ( 0 => 'max-age=31536000; includeSubDomains', ), 'X-Powered-By' => array ( 0 => 'Netatmo', ), 'x-azure-ref' => array ( 0 => '20250624T143538Z-r17cc69d484tj4vrhC1MRSv71s0000000acg000000000q0t', ), 'X-Cache' => array ( 0 => 'CONFIG_NOCACHE', ), ), 'headerNames' => array ( 'date' => 'Date', 'content-type' => 'Content-Type', 'transfer-encoding' => 'Transfer-Encoding', 'connection' => 'Connection', 'cache-control' => 'Cache-Control', 'x-xss-protection' => 'X-XSS-Protection', 'access-control-allow-origin' => 'Access-Control-Allow-Origin', 'strict-transport-security' => 'Strict-Transport-Security', 'x-powered-by' => 'X-Powered-By', 'x-azure-ref' => 'x-azure-ref', 'x-cache' => 'X-Cache', ), 'protocol' => '1.1', 'stream' => GuzzleHttp\Psr7\Stream::__set_state(array( 'stream' => NULL, 'size' => NULL, 'seekable' => true, 'readable' => true, 'writable' => true, 'uri' => 'php://temp', 'customMetadata' => array ( ), )), ))
[2025-06-24 16:35:38][INFO] : redirectURI:: body:array ( 'access_token' => '5312145a1977591987062cef|bc3c53608ac603787220c3c2f2ad2712', 'refresh_token' => '5312145a1977591987062cef|a011dc6a5192c1ea2a2aeacd76394648', 'expires_in' => 10800, 'expire_in' => 10800, 'scope' => array ( 0 => 'read_station', 1 => 'read_magellan', 2 => 'write_magellan', 3 => 'read_bubendorff', 4 => 'write_bubendorff', 5 => 'read_smarther', 6 => 'write_smarther', 7 => 'read_thermostat', 8 => 'write_thermostat', 9 => 'read_camera', 10 => 'write_camera', 11 => 'access_camera', 12 => 'read_doorbell', 13 => 'access_doorbell', 14 => 'read_mx', 15 => 'write_mx', 16 => 'read_presence', 17 => 'write_presence', 18 => 'access_presence', 19 => 'read_homecoach', 20 => 'read_carbonmonoxidedetector', 21 => 'read_smokedetector', 22 => 'read_mhs1', 23 => 'write_mhs1', ), 'restricted_access_token' => '5312145a1977591987062cef|454740d50778426f9bfbff0fdc405ccb', 'restricted_refresh_token' => '5312145a1977591987062cef|dd71786a5f34b0557188313f24d7ef3a', )
[2025-06-24 16:36:02][DEBUG] : cron:: refresh:''
[2025-06-24 16:36:02][DEBUG] : synchronize:: update:false
[2025-06-24 16:36:02][DEBUG] : synchronize:: scope:array ( )
[2025-06-24 16:36:02][DEBUG] : synchronize:: Weather
[2025-06-24 16:36:02][DEBUG] : NARequest:: 'GET' 'https://api.netatmo.com/api/getstationsdata?get_favorites=false' ''

RECTIFICATION :
J’ai supprimé et recréé une nouvelle app sur Netatmo et la synchronisation s’est bien déroulé.
Par contre toujours impossible d’envoyer un planning, voici le log :

[2025-06-24 17:37:02][DEBUG] : cron:: refresh:''
[2025-06-24 17:37:07][DEBUG] : execute:: options:array ( 'select' => '64b42e66297cb0be1b0e5890', 'user_login' => 'admin', 'user_id' => '1', )
[2025-06-24 17:37:07][DEBUG] : execute:: this:netatmoproCmd::__set_state(array( 'id' => '3503', 'logicalId' => 'switchhomeschedule', 'generic_type' => NULL, 'eqType' => 'netatmopro', 'name' => 'Planning', 'order' => '2', 'type' => 'action', 'subType' => 'select', 'eqLogic_id' => '365', 'isHistorized' => '0', 'unite' => '', 'configuration' => array ( 'listValue' => '53133eac197759b6341751d3|Vacances;53133eac197759b6341751d4|Standard;54fc23471b77597dcb2a35c7|Mi-saison;630f8a68b61001db070d4b1b|Climatisation ON;64a98eac3399ea82d10c5e40|Arrêt;64b42e66297cb0be1b0e5890|Climatisation OFF', 'minValue' => '', 'maxValue' => '', 'timeline::enable' => '0', 'timeline::folder' => '', ), 'template' => '{"dashboard":"core::default","mobile":"core::default"}', 'display' => '{"invertBinary":"0"}', 'value' => NULL, 'isVisible' => '1', 'alert' => '[]', '_collectDate' => '', '_valueDate' => '', '_eqLogic' => netatmopro::__set_state(array( 'id' => '365', 'name' => 'PNtaRelaisTermostat', 'logicalId' => '70:ee:50:03:23:ea', 'generic_type' => NULL, 'object_id' => '1', 'eqType_name' => 'netatmopro', 'isVisible' => '1', 'isEnable' => '1', 'configuration' => '{"type":"NAPlug","version":1,"scope":"read_thermostat","createtime":"2020-05-16 18:26:20","dashboard":[],"updatetime":"2025-06-24 17:05:29","home_id":"595b8e35e8ede193238b46f0","home_name":"Crystal","firmware_revision":251,"wifi_strength":73,"comment":"","previousIsEnable":"1","previousIsVisible":"1"}', 'timeout' => NULL, 'category' => '{"heating":"0","security":"0","energy":"1","light":"0","automatism":"0","multimedia":"0","default":"0","opening":"0"}', 'display' => '{"showObjectNameOnview":1,"showObjectNameOndview":1,"showObjectNameOnmview":1,"height":"254px","width":"338px"}', 'order' => '7', 'comment' => NULL, 'tags' => NULL, '_debug' => false, '_object' => jeeObject::__set_state(array( 'id' => '1', 'name' => 'Maison', 'father_id' => NULL, 'isVisible' => '1', 'position' => '1', 'configuration' => '{"parentNumber":0,"tagColor":"#000000","tagTextColor":"#FFFFFF","desktop::summaryTextColor":"","mobile::summaryTextColor":"","hideOnDashboard":"0","summary::global::security":"0","summary::global::motion":"0","summary::global::door":"0","summary::global::windows":"0","summary::global::shutter":"0","summary::global::light":"0","summary::global::outlet":"0","summary::global::temperature":"1","summary::global::humidity":"0","summary::global::luminosity":"0","summary::global::power":"0","summary::hide::desktop::security":"0","summary::hide::desktop::motion":"0","summary::hide::desktop::door":"0","summary::hide::desktop::windows":"0","summary::hide::desktop::shutter":"0","summary::hide::desktop::light":"0","summary::hide::desktop::outlet":"0","summary::hide::desktop::temperature":"0","summary::hide::desktop::humidity":"0","summary::hide::desktop::luminosity":"0","summary::hide::desktop::power":"0","summary::hide::mobile::security":"0","summary::hide::mobile::motion":"0","summary::hide::mobile::door":"0","summary::hide::mobile::windows":"0","summary::hide::mobile::shutter":"0","summary::hide::mobile::light":"0","summary::hide::mobile::outlet":"0","summary::hide::mobile::temperature":"0","summary::hide::mobile::humidity":"0","summary::hide::mobile::luminosity":"0","summary::hide::mobile::power":"0","summary":{"security":[],"presence":[],"motion":[],"door":[],"shutter":[],"windows":[],"light":[],"outlet":[],"chauffage":[],"temperature":[{"enable":"1","cmd":"#3478#","invert":"0"}],"humidity":[],"tempext":[{"enable":"1","cmd":"#7963#","invert":"0"}],"luminosity":[],"power":[],"pluie":[{"enable":"1","cmd":"#3469#","invert":"0"}]},"useCustomColor":"1","hideOnOverview":"0","synthToAction":"synthToDashboard","info::type":"room","info::orientation":"0","info::space":"","useBackground":"0","summary::global::presence":"0","summary::global::chauffage":"0","summary::global::tempext":"1","summary::hide::desktop::presence":"0","summary::hide::desktop::chauffage":"0","summary::hide::desktop::tempext":"0","summary::hide::mobile::presence":"0","summary::hide::mobile::chauffage":"0","summary::hide::mobile::tempext":"0","summary::global::pluie":"1","summary::hide::desktop::pluie":"0","summary::hide::mobile::pluie":"0","synthToView":"","synthToPlan":"","synthToPlan3d":"","orderEqLogicByUsage::auto":"0"}', 'display' => '{"icon":"<i class=\\"icon maison-modern13\\"><\\/i>","tagColor":"#9b59b6","tagTextColor":"#ffb43e","desktop::summaryTextColor":"","dashboard::size":"","sendToApp":"1"}', 'image' => '{"type":"jpg","sha512":"4cf21fabf242a9f751896c6bc530f0603600014726662711c53db74460fc3dba028918e0ef71649ec59e4578ffa8f33cda56ac3e48288fe6d04926c35c2c6b2b"}', '_child' => array ( ), '_changed' => false, '_summaryChanged' => false, )), '_needRefreshWidget' => false, '_timeoutUpdated' => false, '_batteryUpdated' => false, '_changed' => false, '_cmds' => array ( ), )), '_needRefreshWidget' => NULL, '_needRefreshAlert' => NULL, '_changed' => false, ))
[2025-06-24 17:37:07][DEBUG] : execute:: this:array ( 'listValue' => '53133eac197759b6341751d3|Vacances;53133eac197759b6341751d4|Standard;54fc23471b77597dcb2a35c7|Mi-saison;630f8a68b61001db070d4b1b|Climatisation ON;64a98eac3399ea82d10c5e40|Arrêt;64b42e66297cb0be1b0e5890|Climatisation OFF', 'minValue' => '', 'maxValue' => '', 'timeline::enable' => '0', 'timeline::folder' => '', )
[2025-06-24 17:37:07][ALERT] : Starting task (PNtaRelaisTermostat/Planning #3503)
[2025-06-24 17:37:07][ERROR] : execute:: ex:'Netatmo\\Exceptions\\NAApiErrorType - 400 - bad request'
[2025-06-24 17:37:07][ERROR] : Erreur exécution de la commande [Maison][PNtaRelaisTermostat][Planning] : bad request

Peux-tu essayer avec une toute nouvelle application depuis le site web de Netatmo ?

Il y a plusieurs sujets sur le forum officiel comme quoi le token est invalide alors que l’association est ok. Il semble qu’utiliser une nouvelle application corrige le problème.

Pour exemple :

1 « J'aime »

Tu m’as répondu avant que je rectifie mon message au-dessus.
Donc c’est bien ce que j’ai fait et la synchro est OK.
Par contre le planning pour le thermostat est toujours bad request.
Merci.

Comme indiqué dans un de mes messages, la synchronisation des données doit être ok avec la dernière version beta du plugin.

Par contre, il y a malheureusement encore des erreurs lors de l’exécution d’une commande ce qui est ton cas au vu des logs.
J’y travaille et je fais au plus vite !

Oui c’est embêtant, c’est Netatmo qui génère des erreurs et c’est à toi d’y remédier :upside_down_face:
Si je comprends, la relève des infos est correcte mais l’envoi de commandes ne passe pas ?
Pourtant jusqu’à fin mars/avril, les commandes passaient bien pendant la période de chauffage.
En attendant merci beaucoup pour ton dévouement et ta réactivité :grinning:

Bonjour
Un petit up pour savoir si on peut espérer une résolution, comme je n’arrive plus à piloter le thermostat…
Merci bien :pray:

1 « J'aime »

Je viens d’installer la dernière beta pensant qu’elle règlerait ce problème Bad Request de connexion avec le thermostat, mais non, l’erreur est toujours présente.

Merci bien.

[2025-07-17 13:14:41][ALERT] : Starting task (PNtaTermostat Relais/Planning #3503)
[2025-07-17 13:14:43][ERROR] : execute:: ex:'Netatmo\\Exceptions\\NAApiErrorType - 400 - bad request'
[2025-07-17 13:14:43][ERROR] : Erreur exécution de la commande [Maison][PNtaTermostat Relais][Planning] : bad request
[2025-07-17 13:15:07][ALERT] : cron5:: ex:'GuzzleHttp\\Exception\\ClientException - 403 - Client error: `POST https://app.netatmo.net/api/homesdata` resulted in a `403 Forbidden` response: {"error":{"code":2,"message":"Invalid access token"}} '

Toutes les modifications actuellement en beta seront en stable demain dans la matinée.
Je vais ensuite enfin intégrer la nouvelle caméra intérieure (Advance) en version beta qui sera disponible d’ici la fin du week-end.

Peux-tu m’inviter temporairement à ton compte Netatmo afin que je puisse avec l’application officielle voir exactement le contenu de la requête envoyée vers les serveurs Netatmo ?
Si ok pour toi, je peux t’envoyer en MP mon adresse email

1 « J'aime »

Oui merci @thanaus

MP envoyé… J’attend ton invitation :wink:

Je viens de push une mise à jour sur le market d’une nouvelle beta pour corriger ces 2 bugs : Planning + Manual Boost

Tout devrait être maintenant fonctionnel :wink:

Super, je viens de tester et plus aucun message de Bad Request.
Le contrôle sur l’app web de Netatmo permet de visualiser que tout est correct avec les plannings.

Merci beaucoup :pray:

Ce sujet a été automatiquement fermé après 24 heures suivant le dernier commentaire. Aucune réponse n’est permise dorénavant.