MESURE DES GRANDEURS
- Dominant language
- TypeScript
- Stars
- 117
- Forks
- 51
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 4
Description
import paho.mqtt.client as mqtt
import mysql.connector
import json
db = mysql.connector.connect(
host="localhost", user="root", password="root", database="qos_mqtt"
)
cursor = db.cursor()
def on_message(client, userdata, message):
data = json.loads(message.payload.decode())
sql = "INSERT INTO mesures_sources (source, tension, courant, puissance, temperature) VALUES (%s,%s,%s,%s,%s)"
values = (data['source'], data['tension'], data['courant'], data['tension']*data['courant'], data['temperature'])
cursor.execute(sql, values)
db.commit()
client = mqtt.Client()
client.connect("localhost")
client.subscribe("energie/#", qos=1)
client.on_message = on_message
client.loop_forever()
Contributor guide
No contributing guide indexed for this repository
Research direction
The issue provides only a Python MQTT-to-MySQL script and does not name any repository file, entry point, test, requested change, or acceptance criteria. First confirm whether this content belongs in influxdata/ui and ask the author to describe the intended outcome before investigating implementation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- json, mysql, python
- Domain
- backend, databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 10/100