Coder Social home page Coder Social logo

dcl777 / sensors2mqtt Goto Github PK

View Code? Open in Web Editor NEW
6.0 6.0 0.0 5.75 MB

Universal Sensor data transporter over MQTT. Sensor like water flow sensor (=pulse-counter), DS18B20 , INA219, 4-20mA, PMS5003, ...

License: GNU General Public License v3.0

Python 96.73% Shell 3.27%
4-20ma ds18b20 home-assistant ina219 mqtt plantower pms5003 pulse-counter raspberry-pi sensor water-flow water-flow-sensor

sensors2mqtt's People

Contributors

dcl777 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

sensors2mqtt's Issues

Sensor LINUX_Generic_SystemInfo error

Describe the bug
If you try to use Generic_SystemInfo sensor shows the same error:

AttributeError: module 'platform' has no attribute 'dist'

Error messages and traceback:

2022-07-19 20:15:01,799 - DEBUG -     --> CLASS: sensors.Generic_SystemInfo.LINUX_Generic_SystemInfo
Traceback (most recent call last):
  File "/home/pi/sensors2mqtt/sensors2mqtt.py", line 204, in <module>
    sens2mqtt.run()
  File "/home/pi/sensors2mqtt/sensors2mqtt.py", line 138, in run
    myClass = aClass(client,aSensor,mqtt_top_dir_name)
  File "/home/pi/sensors2mqtt/sensors/Generic_SystemInfo/LINUX_Generic_SystemInfo.py", line 51, in __init__
    dist = platform.dist()
AttributeError: module 'platform' has no attribute 'dist'

System:
Raspbian 11, Python 3.9.2

Possible workaround
Line 53 of file "sensors/Generic_SystemInfo/LINUX_Generic_SystemInfo.py"

import distro
dist = platform.dist()
to
dist = distro.like()

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.