GithubHelp home page GithubHelp logo

kiboost / php-simplenetatmoapi Goto Github PK

View Code? Open in Web Editor NEW
35.0 35.0 9.0 225 KB

Need a simple way to get your Netatmo Presence datas with a few lines of php? Here you are!

License: MIT License

PHP 100.00%
automation camera domotic netatmo presence

php-simplenetatmoapi's People

Contributors

cadkey avatar kiboost avatar kokluch avatar zainjar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

php-simplenetatmoapi's Issues

Demande d'info

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.

Can't connect to Netatmo Server

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?

Ask question about authorization

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

description missing

Where to fill in "client_id" and "client_secret" within the PHP (what line & where) ?
Can you please be more precise.
Thanks in Advance

Netatmo change authentification

Hi KiboOst,
Do you work on an update of your script to take under considération the Netatmo authentification change ?
Tx

damanujan/php-NetatmoCameraAPI vs KiboOst/php-simpleNetatmoAPI

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

authentification Netatmo modifié depuis hier midi

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.

Fonction pour récupérer l'intensité lumineuse caméra Presence

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.

Not an issue, just a thank you

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.

Not an issue: I added 2 more funktion for CO2 and humidity

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));

function getLightIntensity

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.