Skip to content

Read data from sensors (e.g. one-wire, tinkerforge,...) and provide it via mqtt.

License

Notifications You must be signed in to change notification settings

klasch5town/data2mqtt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

data2mqtt

Motivation

There was the need to read one-wire and tinkerforge sensors and provide it an home-assistant instance. A general approach is to transfer it via mqtt. As there was not really a software that will cover all needs, I decided to write my own tailor-made solution.

Usage

Make sure you have a up-to-date python installed.

I suggest to create an virtual environment:

python -m venv venv

Activate the virtual environment:

# linux and MacOS
source ./venv/bin/activate
# windows - cmd
venv\Scripts\activate.bat
# windows - powershell
venv\Scripts\activate.ps1

After your virtual environment is active you can install the required python moduls:

# you can first check for the actual modules in your venv via
pip list
# after that you can install the needed modules via
pip install -r requirements.txt

Now all reqirements are met to be able to run the script, but you will run it with default values.

You should configure your sensor setup in the sensor.ini file and if you need credentials than create a credentials.ini file at ~/.data2mqtt/credentials.ini:

touch ~/.data2mqtt/credentials.ini

provide at least following information:

[MQTT]
host_url = <address of your mqtt broker>
user     = <your mqtt username>
password = <your top-secret mqtt password>

Links

About

Read data from sensors (e.g. one-wire, tinkerforge,...) and provide it via mqtt.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages