Coder Social home page Coder Social logo

No module named 'paho' about enviro-monitor HOT 5 CLOSED

roscoe81 avatar roscoe81 commented on July 17, 2024
No module named 'paho'

from enviro-monitor.

Comments (5)

roscoe81 avatar roscoe81 commented on July 17, 2024

That's strange. Maybe try sudo pip3 install paho-mqtt

from enviro-monitor.

prutsky avatar prutsky commented on July 17, 2024

Thank you, that was it!
But after installing "Adafruit_IO" and creating a config.json file I got stuck at the following error:

$ python3 Northcliff_AQI_Monitor_Gen.py 
2020-04-06 12:22:37.354 INFO     Northcliff_Environment_Monitor.py - Combined enviro+ sensor capture, external sensor capture, Luftdaten and Home Manager Updates and display of readings.
#Press Ctrl+C to exit!

#Note: you'll need to register with Luftdaten at:
#https://meine.luftdaten.info/ and enter your Raspberry Pi
#serial number that's displayed on the Enviro plus LCD along
#with the other details before the data appears on the
#Luftdaten map.

#
Retrieved Config {'temp_offset': 0, 'enable_adafruit_io': False, 'aio_user_name': '<>', 'aio_key': '<>', 'aio_household_prefix': '<>', 'aio_location_prefix': '<>', 'enable_send_data_to_homemanager': False, 'enable_receive_data_from_homemanager': False, 'enable_indoor_outdoor_functionality': True, 'mqtt_broker_name': '<>', 'enable_luftdaten': True, 'enable_climate_and_gas_logging': True, 'enable_particle_sensor': True, 'incoming_temp_hum_mqtt_topic': '<>', 'incoming_temp_hum_mqtt_sensor_name': '<>', 'incoming_barometer_mqtt_topic': '<>', 'incoming_barometer_sensor_id': 0, 'indoor_outdoor_function': 'Indoor', 'mqtt_client_name': '<>', 'outdoor_mqtt_topic': '<>', 'indoor_mqtt_topic': '<>', 'city_name': 'Elst', 'time_zone': 'Europe/Amsterdam', 'custom_locations': ['Thuis, Nederland, Gelderland, 3.30000, 51.300000']}
2020-04-06 12:22:40.337 INFO     Raspberry Pi serial: xyz
2020-04-06 12:22:40.384 INFO     Wi-Fi: connected

Traceback (most recent call last):
  File "Northcliff_AQI_Monitor_Gen.py", line 1229, in <module>
    client.connect(mqtt_broker_name, 1883, 60)
  File "/usr/local/lib/python3.7/dist-packages/paho/mqtt/client.py", line 937, in connect
    return self.reconnect()
  File "/usr/local/lib/python3.7/dist-packages/paho/mqtt/client.py", line 1071, in reconnect
    sock = self._create_socket_connection()
  File "/usr/local/lib/python3.7/dist-packages/paho/mqtt/client.py", line 3522, in _create_socket_connection
    return socket.create_connection(addr, source_address=source, timeout=self._keepalive)
  File "/usr/lib/python3.7/socket.py", line 707, in create_connection
    for res in getaddrinfo(host, port, 0, SOCK_STREAM):
  File "/usr/lib/python3.7/socket.py", line 748, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known

from enviro-monitor.

roscoe81 avatar roscoe81 commented on July 17, 2024

Do you need the mqtt messages enabled? If so, do you have an mqtt broker on your network and have you set up config.json to use that broker's name or IP address?

from enviro-monitor.

roscoe81 avatar roscoe81 commented on July 17, 2024

Sorry, I answered before looking at your retrieved config file. You can solve the problem by setting 'enable_indoor_outdoor_functionality’: false in your config.json file. You need an mqtt broker if it’s set to true so that the indoor and outdoor Enviro Monitors to communicate with each other.

from enviro-monitor.

brunoHenriquePastor avatar brunoHenriquePastor commented on July 17, 2024

I just want to say thank you! You really helps me!

from enviro-monitor.

Related Issues (16)

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.