Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Cartrax/process.py
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
31 lines (20 sloc)
617 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import paho.mqtt.client as mqtt | |
import json, os | |
from random import uniform | |
from datetime import date, datetime | |
import time | |
from time import strftime | |
def locationData(client, userdata, msg): | |
from Location import on_message as location_on_message | |
location_on_message(client, userdata, msg) | |
return 'true' | |
def logUser(id): | |
from Security_Sensor import logging | |
logging(id) | |
return "true" | |
from main import on_message,on_message | |
client = mqtt.Client() | |
print(ogUser(client.client_id)) | |
client.on_connect = on_connect | |
client.on_message = on_message | |
client.connect("broker.hivemq.com", 1883) | |