Comments (8)
I finally reworked my code, now working!
from netatmo-api-python.
The issue I see now is that the weather data I get from the home set in lnetatmo.WeatherStationData is in fact the weather data from my other home set in my account!
authorization = lnetatmo.ClientAuth(clientId = "xxx", clientSecret = "xxx", username = "xxx", password = "xxx")
weatherData = lnetatmo.WeatherStationData(authorization,unicode('Home A','utf-8'))
theWeatherData = weatherData.lastData()
externalTemperature = round(theWeatherData[unicode('Extérieur','utf-8')]['Temperature'],1)
gives me the external temperature of Home B...
from netatmo-api-python.
Thanks for reporting this issue. There was an error in default station selection for multi-home setup.
I just published the fix, if your confirm that the bug is fixed, please close the issue...
from netatmo-api-python.
Many thanks, I will test the fix and tell you!
I am also trying to make the checkNotUpdated to work.
for m in weatherData.checkNotUpdated(1800):
print("Warning, sensor %s information is obsolete" % m)
if moduleByName(m) == None :
print("The station is lost")
Since I only have 1 module, I simplified with:
if weatherData.checkNotUpdated(1800) == None
print("Module is lost")
But I always get None, even if some fresh data were published... What am I doing wrong?
Thanks in advance!
from netatmo-api-python.
The response is the list of "not updated modules". If your data is fresh, it is the expected response to have "none" as a response. If one of your module was out of power for example, the corresponding data would not be fresh and it's name would be returned...
By the way, there was an obsolete station_name parameter that I am going to clean
from netatmo-api-python.
Many thanks!!
And I have a last question:
Calling this is working:
weatherData = lnetatmo.WeatherStationData(authorization,unicode('Home A','utf-8'))
But if I add the station name like this:
weatherData = lnetatmo.WeatherStationData(authorization,unicode('Home A','utf-8'),unicode('Appart','utf-8'))
It says:
Traceback (most recent call last):
File "netamo.py", line 51, in
main()
File "netamo.py", line 48, in main
currentTemperature,currentHumidity,currentPressure = getCurrentWeatherData()
File "netamo.py", line 23, in getCurrentWeatherData
weatherData = lnetatmo.WeatherStationData(authorization,unicode('Épesses','utf-8'),unicode('Appart','utf-8'))
File "/home/pi/.local/lib/python2.7/site-packages/lnetatmo.py", line 323, in init
if station and station not in self.stations: raise NoDevice("No station with name %s" % station)
lnetatmo.NoDevice: No station with name Appart
Whereas my station main module is indeed named "Appart".
Station name is main module name correct?
from netatmo-api-python.
How can I try your fix? I tried to enforce the resintall of 2.0.0 but the latest commits are not included. Should I wait for release 2.1.0?
from netatmo-api-python.
Hi @philippelt ,
I applied your commits yesterday and it works: I now get the weather data from Home A instead of Home B.
Many thanks!
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.