Giter Site home page Giter Site logo

Comments (8)

genfersee avatar genfersee commented on August 19, 2024

I finally reworked my code, now working!

from netatmo-api-python.

genfersee avatar genfersee commented on August 19, 2024

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.

philippelt avatar philippelt commented on August 19, 2024

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.

genfersee avatar genfersee commented on August 19, 2024

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.

philippelt avatar philippelt commented on August 19, 2024

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.

genfersee avatar genfersee commented on August 19, 2024

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.

genfersee avatar genfersee commented on August 19, 2024

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.

genfersee avatar genfersee commented on August 19, 2024

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)

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.