Giter Site home page Giter Site logo

Comments (8)

philippelt avatar philippelt commented on August 19, 2024

Hello,

I may help you but I need the full traceback information to understand the origin of the problem.

The error you mention doesn't look like a parameter issue (station or module names).
Did you customized the library with authentication data (CLIENT ID/PW, USER ID/PW) ?

from netatmo-api-python.

andersenthomas avatar andersenthomas commented on August 19, 2024

Hi,

The simpleLastData.py script executes fine and returns the expected data so I guess authentication data is not the issue? I am using Python 2.7 on Win7 if that makes any difference.

Traceback is attached below:
Traceback (most recent call last):
File "graphLast3Days.py", line 31, in
date_end=now)
File "C:\Users\thomas\Downloads\netatmo-api-python-master\netatmo-api-python-m
aster\lnetatmo.py", line 195, in getMeasure
return postRequest(_GETMEASURE_REQ, postParams)
File "C:\Users\thomas\Downloads\netatmo-api-python-master\netatmo-api-python-m
aster\lnetatmo.py", line 247, in postRequest
resp = urllib2.urlopen(req).read()
File "C:\Python27\lib\urllib2.py", line 154, in urlopen
return opener.open(url, data, timeout)
File "C:\Python27\lib\urllib2.py", line 437, in open
response = meth(req, response)
File "C:\Python27\lib\urllib2.py", line 550, in http_response
'http', request, response, code, msg, hdrs)
File "C:\Python27\lib\urllib2.py", line 475, in error
return self._call_chain(_args)
File "C:\Python27\lib\urllib2.py", line 409, in _call_chain
result = func(_args)
File "C:\Python27\lib\urllib2.py", line 558, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 404: Not Found

from netatmo-api-python.

philippelt avatar philippelt commented on August 19, 2024

You are right, as an other example is running, I didn't had the info, it can't be an authentication problem.

I checked that, effectively, an incorrect id for the station or the device return (from netatmo) a 404 error which is not very explicit.

I didn't noticed initially that you are using names instead of id (which is a property of each object).

The Netatmo API require ID for getMeasure, not the name.

You can find the ID using the devList.stationByName("The station name")["_id"]
and the module ID using devList.moduleByName("The module name")["_id"]

devList being the returned instance of lnetatmo.DeviceList(auth)

These ID are of type string with the format "xx:yy:zz:aa:bb:cc"

Yours

from netatmo-api-python.

andersenthomas avatar andersenthomas commented on August 19, 2024

Thanks! That seems to do the trick!

from netatmo-api-python.

philippelt avatar philippelt commented on August 19, 2024

moduleByName or stationByName returned None if the supplied name is not found.
If you are unsure of the names used, check them before requesting the value of the _id entry or you will have a "TypeError: 'NoneType' object has no attribute '_getitem' " error...

from netatmo-api-python.

sunithak avatar sunithak commented on August 19, 2024

Hello,
I would like to retrieve the same data by using getpublicdata api. I dont have device id and module id. I would like to retrieve the raw data from one area for one month. I am trying your sample code. It is giving me http error. Please suggest me what to do.

from netatmo-api-python.

SebastienPittet avatar SebastienPittet commented on August 19, 2024

You will have the device ID and module ID as a result to GetPublicData . The web service returns a list of devices and their associated modules.

from netatmo-api-python.

sunithak avatar sunithak commented on August 19, 2024

I would like to retrieve the whole output data like temperature, rain, Humidity, wind.. like all the data in whether map into csv by using getPublicData.

from netatmo-api-python.

Related Issues (20)

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.