Comments (8)
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.
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.
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.
Thanks! That seems to do the trick!
from netatmo-api-python.
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.
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.
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.
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)
- No foreign station access (GetPublicData) HOT 4
- Accessing to /homestatus HOT 1
- Authentication request rejected HOT 2
- Unable to pull temperature from Netatmo weatherstation HOT 2
- New commits to lnetatmo.py break existing functionality HOT 7
- KeyError: 'home_name' HOT 3
- Add Homecoach from API HOT 1
- Thermostat not working HOT 1
- Auto-test not correctly executing HOT 1
- No camera reports as No home in standalone application HOT 10
- Sample printThermostat.py not working HOT 2
- Netatmo authentication breaking change again ! HOT 38
- Add favorite data HOT 4
- modulesNamesList does not work anymore HOT 2
- modulesNamesList() function parameter HOT 1
- lnetatmo - WARNING: Your current token scope do not allow access to Home data HOT 2
- Weather2file.py does not seem to download all weather data. HOT 1
- get historical data from multiple public weather stations HOT 5
- Authentication broken again HOT 88
- sudo apt install python3-netatmo-api-python WANTED HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from netatmo-api-python.