Skip to content
Permalink
main
Switch branches/tags

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?
Go to file
 
 
Cannot retrieve contributors at this time
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)