This commit is contained in:
Wolfgang Hottgenroth 2015-09-11 10:30:07 +02:00
parent 01e23e6608
commit b54d8ed287
2 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,6 @@
-- Constants
SSID = "MessWLAN"
APPWD = "UNVmpwbr6heQnMQ7ykXT"
SSID = "Kinderland"
APPWD = "test1234"
CMDFILE = "mqtt.lua"
-- Some control variables

View File

@ -1,4 +1,4 @@
BROKER = "172.16.2.15"
BROKER = "192.168.87.100"
BRPORT = 1883
BRUSER = ""
BRPWD = ""
@ -23,7 +23,7 @@ switch_state = 0
print("Connecting to MQTT broker. Please wait...")
m = mqtt.Client( CLIENTID, 120, BRUSER, BRPWD)
print("step 1")
tmr.alarm(4, 15, 1 mqtt_watchdog_expired)
tmr.alarm(4, 15, 1, mqtt_watchdog_expired)
print("step 2")
m:connect( BROKER , BRPORT, 0, function(conn)
print("Connected to MQTT:" .. BROKER .. ":" .. BRPORT .." as " .. CLIENTID )