Giter Club home page Giter Club logo

Comments (9)

rvk01 avatar rvk01 commented on September 25, 2024 1

Station Name(s) are correct and data also Could the the main issue that I have two stations?

Yes, that could be. Somehow weatherData.lastData() returns None for one of the stations.

I looked at the json of both stations and I think I found the problem.
Your second station (DE-BYBR-Keller (BYMU WZ)) doesn't contain dashboard_data (incl. time_utc) in the modules.
And the lastData function expects that tag.

                # Skip lost modules that no longer have dashboard data available
                if 'dashboard_data' not in module : continue
                ds = module['dashboard_data']

You could build in a check in netatmo_influx.py to check for None (no dashboard_data) but if you really do want that data from that station you might want to report this issue at https://github.com/philippelt/netatmo-api-python/ because if it used to work and it is a valid station (the data is there) lnetatmo should be fixed for that.

You can post both json from your stations (they are separated by the names) and it will be very clear that dashboard_data is missing from the second one (also mention the type of that station and modules).

from grafana-netatmo.

rvk01 avatar rvk01 commented on September 25, 2024

This should be fixed in the last version of lnetatmo.

from grafana-netatmo.

vlsoft avatar vlsoft commented on September 25, 2024

Hello
thank you for your reply. i updated the latest version of lnetatmo to V3.0.0 . but i still have the same problem .
do you have an idea .

thank you

Capture

from grafana-netatmo.

rvk01 avatar rvk01 commented on September 25, 2024

Hello thank you for your reply. i updated the latest version of lnetatmo to V3.0.0 . but i still have the same problem . do you have an idea .

I'm not sure where your lnetatmo comes from but the latest version does have a station parameter.
See https://github.com/philippelt/netatmo-api-python/blob/73e5ea43311adf673cc35eca9cbf8a7ae0464798/lnetatmo.py#L353

I think you still have an older version.

(Second is that you probably still need to change a line with stationById to stationByName but that's one step further.)

from grafana-netatmo.

vlsoft avatar vlsoft commented on September 25, 2024

hello

you were right, i didn't have the right version of lnetatmo, with the link you provided i managed to update lnetatmo. and i corrected stationById to stationByName.
It works now.

Thank you

from grafana-netatmo.

routed avatar routed commented on September 25, 2024

I had version 3.0.3 of lnetatmo and updated following your conversation to 3.1.0
I also update line 28 of netatmo_influx.py from stationByID(station) to StationByName(station)
Now I get this error?

Traceback (most recent call last): File "/home/C3PO/netatmo_influx.py", line 34, in <module> for module, moduleData in weatherData.lastData(station=station_name, exclude=3600).items(): AttributeError: 'NoneType' object has no attribute 'items'

from grafana-netatmo.

rvk01 avatar rvk01 commented on September 25, 2024

I had version 3.0.3 of lnetatmo and updated following your conversation to 3.1.0 I also update line 28 of netatmo_influx.py from stationByID(station) to StationByName(station) Now I get this error?

You could try to put two print lines in the source above that line to see if it prints the correct station_name and station data:

print(station_name)
print(station)
for module, moduleData in weatherData.lastData(station=station_name, exclude=3600).items():

from grafana-netatmo.

routed avatar routed commented on September 25, 2024

Wow thanks for you fast response!

Station Name(s) are correct and data also
Could the the main issue that I have two stations?

DEBTO-Heißstraße (Innen) {'_id': '70:ee:50:12:90:94', 'station_name': 'DEBTO-Heißstraße (Innen)', 'date_setup': 1443947161, 'last_setup': 1443947161, 'type': 'NAMain', 'last_status_store': 1689666902, 'module_name': 'Innen', 'firmware': 201, 'last_upgrade': 1440392580, 'wifi_status': 52, 'reachable': True, 'co2_calibrating': False, 'data_type': ['Temperature', 'CO2', 'Humidity', 'Noise', 'Pressure'], 'place': {'altitude': 696, 'city': 'Bad Tölz', 'country': 'DE', 'timezone': 'Europe/Berlin', 'location': [11.563774, 47.772289]}, 'home_id': '5eea28b8c20743013186ba8f', 'home_name': 'DEBTO-Heißstraße', 'dashboard_data': {'time_utc': 1689666887, 'Temperature': 24, 'CO2': 428, 'Humidity': 62, 'Noise': 37, 'Pressure': 1021.7, 'AbsolutePressure': 940.2, 'min_temp': 23.1, 'max_temp': 24.7, 'date_max_temp': 1689631253, 'date_min_temp': 1689657828, 'temp_trend': 'stable', 'pressure_trend': 'stable'}, 'modules': [{'_id': '02:00:00:12:99:ac', 'type': 'NAModule1', 'module_name': 'Außen', 'last_setup': 1443947162, 'data_type': ['Temperature', 'Humidity'], 'battery_percent': 100, 'reachable': True, 'firmware': 53, 'last_message': 1689666900, 'last_seen': 1689666875, 'rf_status': 86, 'battery_vp': 6742, 'dashboard_data': {'time_utc': 1689666875, 'Temperature': 21.8, 'Humidity': 67, 'min_temp': 17.8, 'max_temp': 21.8, 'date_max_temp': 1689666875, 'date_min_temp': 1689652879, 'temp_trend': 'up'}}, {'_id': '03:00:00:02:83:34', 'type': 'NAModule4', 'module_name': 'Büro', 'last_setup': 1448389677, 'data_type': ['Temperature', 'CO2', 'Humidity'], 'battery_percent': 63, 'reachable': True, 'firmware': 53, 'last_message': 1689666900, 'last_seen': 1689666875, 'rf_status': 61, 'battery_vp': 5326, 'dashboard_data': {'time_utc': 1689666875, 'Temperature': 27.7, 'CO2': 562, 'Humidity': 49, 'min_temp': 24.5, 'max_temp': 27.8, 'date_max_temp': 1689631243, 'date_min_temp': 1689657801, 'temp_trend': 'up'}}, {'_id': '03:00:00:02:76:38', 'type': 'NAModule4', 'module_name': 'Bad', 'last_setup': 1449917723, 'data_type': ['Temperature', 'CO2', 'Humidity'], 'battery_percent': 56, 'reachable': True, 'firmware': 53, 'last_message': 1689666900, 'last_seen': 1689666875, 'rf_status': 78, 'battery_vp': 5207, 'dashboard_data': {'time_utc': 1689666875, 'Temperature': 24.5, 'CO2': 668, 'Humidity': 67, 'min_temp': 24.5, 'max_temp': 25.1, 'date_max_temp': 1689653596, 'date_min_temp': 1689661749, 'temp_trend': 'stable'}}, {'_id': '03:00:00:06:04:da', 'type': 'NAModule4', 'module_name': 'Wohnzimmer', 'last_setup': 1511539109, 'data_type': ['Temperature', 'CO2', 'Humidity'], 'battery_percent': 33, 'reachable': True, 'firmware': 53, 'last_message': 1689666900, 'last_seen': 1689666875, 'rf_status': 67, 'battery_vp': 4799, 'dashboard_data': {'time_utc': 1689666875, 'Temperature': 24, 'CO2': 406, 'Humidity': 60, 'min_temp': 22.8, 'max_temp': 25, 'date_max_temp': 1689631243, 'date_min_temp': 1689658415, 'temp_trend': 'stable'}}]} DE-BYBR-Keller (BYMU WZ) {'_id': '70:ee:50:3b:f4:04', 'station_name': 'DE-BYBR-Keller (BYMU WZ)', 'date_setup': 1556816203, 'last_setup': 1556816203, 'type': 'NAMain', 'last_status_store': 1619258289, 'module_name': 'BYMU WZ', 'firmware': 178, 'last_upgrade': 1556816336, 'wifi_status': 40, 'reachable': False, 'co2_calibrating': False, 'data_type': ['Temperature', 'CO2', 'Humidity', 'Noise', 'Pressure'], 'place': {'altitude': 475, 'city': 'Brannenburg', 'country': 'DE', 'timezone': 'Europe/Berlin', 'location': [12.111891, 47.734253]}, 'home_id': '5ef37f2e2f57744520074bf7', 'home_name': 'DE-BYBR-Keller', 'modules': [{'_id': '02:00:00:3c:0d:fe', 'type': 'NAModule1', 'module_name': 'BYMU-außen', 'last_setup': 1556816204, 'data_type': ['Temperature', 'Humidity'], 'battery_percent': 10, 'reachable': False, 'firmware': 50, 'last_message': 1619258283, 'last_seen': 1619258257, 'rf_status': 45, 'battery_vp': 4372}, {'_id': '03:00:00:05:ec:a0', 'type': 'NAModule4', 'module_name': 'Bad', 'last_setup': 1557079590, 'data_type': ['Temperature', 'CO2', 'Humidity'], 'battery_percent': 100, 'reachable': False, 'firmware': 255, 'last_message': 0, 'last_seen': 0, 'rf_status': 255, 'battery_vp': 65535}, {'_id': '03:00:00:05:fb:ce', 'type': 'NAModule4', 'module_name': 'Kitchen', 'last_setup': 1557079621, 'data_type': ['Temperature', 'CO2', 'Humidity'], 'battery_percent': 100, 'reachable': False, 'firmware': 255, 'last_message': 0, 'last_seen': 0, 'rf_status': 255, 'battery_vp': 65535}]} Traceback (most recent call last): File "/home/marpet/netatmo_influx.py", line 38, in <module> for module, moduleData in weatherData.lastData(station=station_name, exclude=3600).items(): AttributeError: 'NoneType' object has no attribute 'items'

from grafana-netatmo.

routed avatar routed commented on September 25, 2024

I deleted the second station on the side of netatmo.
Now the script runs through.
Thx a lot!

from grafana-netatmo.

Related Issues (14)

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.