Passage à un MQTT mosquitto en localhost

This commit is contained in:
Pierrick C 2017-09-18 23:10:36 +02:00
parent e897b59d1f
commit eb17eccb27
3 changed files with 7 additions and 7 deletions

View File

@ -15,7 +15,7 @@
/************************* MQTT broker Setup *********************************/
#define MQTT_SERVER "192.168.0.3"
#define MQTT_SERVER "192.168.0.18"
#define MQTT_SERVERPORT 1883 // use 8883 for SSL
#define MQTT_USERNAME "arofarn"
#define MQTT_KEY "WaKaW9XMGUZ3rRJD"

View File

@ -1,7 +1,7 @@
[SQL]
sql_host = aro-yuno
sql_port = 3306
sql_base = iot_test
sql_host = localhost
sql_port = 3306
sql_base = cameteo
sql_user = arofarn
sql_pass = WaKaW9XMGUZ3rRJD
sql_sys = mysql
@ -9,7 +9,7 @@ sql_api = pymysql
sql_verbose = 0
[MQTT]
mqtt_host = aro-yuno
mqtt_host = localhost
mqtt_port = 1883
mqtt_client_id = cameteo
mqtt_user = arofarn
@ -23,7 +23,7 @@ camera_resolution_x=2592
camera_resolution_y=1944
camera_warmup_time=2
camera_iso=0
camera_rotation=0
camera_rotation=180
camera_auto_white_balance=auto
camera_exposure_mode=auto
camera_contrast=0

View File

@ -61,7 +61,7 @@ def on_message(client, userdata, msg):
if val['type'] in coord_type:
disp.Dis_String(125, coord_type[val['type']], "{} {} ".format(val['value'], val['unit']), 16)
#Callback particulier pour gérer les date/heure arrivent sur le broker MQTT
#Callback managing date and time from MQTT broker
def on_message_date(client, userdata, msg):
payload = msg.payload.decode()
print("Date : " + payload)