kiboost / php-simplenetatmoapi Goto Github PK
View Code? Open in Web Editor NEWNeed a simple way to get your Netatmo Presence datas with a few lines of php? Here you are!
License: MIT License
Need a simple way to get your Netatmo Presence datas with a few lines of php? Here you are!
License: MIT License
Bonjour,
Serait-il possible d'ajouter une fonction pour récupérer l'intensité lumineuse d'une caméra Presence ?
Ne connaissant pas du tout le PHP, j'ai tout de même tenté de le faire moi-même en me basant sur la fonction getWeatherBatteries mais sans succès...
Merci d'avance.
Is it possible to add the functionality to change the behavior of detected humans or animals (e.g. notify and record or do nothing)?
It seems to work on this version:
https://github.com/damanujan/php-NetatmoCameraAPI
Thanks
L'authentification Netatmo a encore changé.
Il semble que le access token ait une durée de vie de 3 heures et qu'il faille le recuperer et le stocker pour l'utiliser (toutes les 3 heures).
La solution serait ici: https://github.com/philippelt/netatmo-api-python
Mais je n'ai pas reussi à recuperer le nouvel acces token. :(
je n'ai pas compris la procédure à priori.
Hi
Is script is valid with the new authorisation of netatmo (begin oct 2022) ?
Regards
Bonjour
Est ce que ce script va fonctionner avec la nouvelle api d'authorisation imposé par netatmo en octobre 2022 ?
Cordialement
I get this error direct after initialising. Just at testing to connect.
So splNetatmoAPI.php is found and included. I have entered variables for Netatmo_user, pass, id and secret in front of the initial $_splNetatmo = new splNetatmoAPI call.
ID and Secret is newly created at Netatmo Server.
What do I wrong?
Hi KiboOst,
Do you work on an update of your script to take under considération the Netatmo authentification change ?
Tx
Where to fill in "client_id" and "client_secret" within the PHP (what line & where) ?
Can you please be more precise.
Thanks in Advance
J'ai tenté de solutionner.
Je stocke access_token et refresh_token dans un json. La Doc dit que la durée de vie est de 3h mais je constate que le couple access_token refresh_token ne fonctionne qu'une fois et génère quand même des erreurs régulièrement.
Hi,
thank you very much for this great software.
Is it possible to create a function getLightIntensity?
Background: i wish to use a remotecontrol to decrease od increase the intensity.
Greetings
Kaloschke
Hi, didn't find a contact address so I just wanted to tell you that your simpleNetatmo API helped me to start with getting data from my Netatmo weather station.
I intend to query my Netatmo data periodically and forward it to OpenWeatherMap as my OpenSprinkler system needs weather data which were transferred to wunderground in the past but Netatmo does no longer support this data transfer. As OpenWeatherMap is also supported I trying to setup a data forwarder on my Synology NAS at home.
STILL NO ECHO with
//is home empty ? echo $_splNetatmo->isHomeEmpty();
Hello, I never used Github, I don't know how to propose new content. Thank you for your simple API.
I added 2 new function to splNetatmoAPI.php, it's mostly copy&paste but it can spare a few Minutes to someone:
public function getWeatherHumidity()
{
if (is_null($this->_weatherDatas)) $this->getWeatherDatas();
$modules = $this->_weatherDatas['body']['devices'][0]['modules'];
$jsonDatas = array();
foreach ($modules as $module)
{
if (!isset($module['dashboard_data']['Humidity'])) continue;
$name = $module['module_name'];
$humidity = $module['dashboard_data']['Humidity'];
$jsonDatas[$name] = $humidity;
}
//add main station:
$jsonDatas[ $this->_weatherDatas['body']['devices'][0]['station_name'] ] = $this->_weatherDatas['body']['devices'][0]['dashboard_data']['Humidity'];
return $jsonDatas;
}
public function getWeatherCO2()
{
if (is_null($this->_weatherDatas)) $this->getWeatherDatas();
$modules = $this->_weatherDatas['body']['devices'][0]['modules'];
$jsonDatas = array();
foreach ($modules as $module)
{
if (!isset($module['dashboard_data']['CO2'])) continue;
$name = $module['module_name'];
$co2 = $module['dashboard_data']['CO2'];
$jsonDatas[$name] = $co2;
}
//add main station:
$jsonDatas[ $this->_weatherDatas['body']['devices'][0]['station_name'] ] = $this->_weatherDatas['body']['devices'][0]['dashboard_data']['CO2'];
return $jsonDatas;
}
and you can use it easily with:
$getWeatherHumudity = $_splNetatmo->getWeatherHumidity();
echo "Humidity:".str_replace('"','',json_encode($getWeatherHumudity, JSON_PRETTY_PRINT));
$getWeatherCO2 = $_splNetatmo->getWeatherCO2();
echo "CO2:".str_replace('"','',json_encode($getWeatherCO2, JSON_PRETTY_PRINT));
Bonjour,
D'après ce que je comprends vous avez participé à "php-NetatmoCameraAPI".
Mon projet est juste de commander le projecteur de ma "Présence" depuis ma Home Center 2 Fibaro comme le fait SIRI via l'application Homekit. Je suis au bon endroit ?
Et merci pour le job accompli !!
Have a good day - Jean-Paul
Bonjour, @KiboOst
Je cherche a faire fonctionner ce script sur jeedom mais je ne comprend pas comment faire.
J'ai cherche sur le forum mais rien vu de probant ?.
Aurait tu un lien vers un tuto ou autre ?
Merci pour ton retour.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.