--
--   Version 1.1
--
--   Copyright 2016-2018 Lee Djavaherian
--
--   This file is part of TrillSat.
--
--   TrillSat is free software: you can redistribute it and/or modify
--   it under the terms of the GNU General Public License as published by
--   the Free Software Foundation, either version 3 of the License, or
--   (at your option) any later version.
--
--   TrillSat is distributed in the hope that it will be useful,
--   but WITHOUT ANY WARRANTY; without even the implied warranty of
--   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
--   GNU General Public License for more details.
--
--   You should have received a copy of the GNU General Public License
--   along with TrillSat.  If not, see <http://www.gnu.org/licenses/>.
-----------------------------------------------------------------------------------


routerssid = 'RouterSSID'
espssid = 'ESPSSID'
routerpass = 'RouterPassword'
esppass = 'ESPPassword' -- must be at least 8 chars
-- password is base64 encoded username + password used by SASL PLAIN protocol
-- in BASH, you can generate this by typing:   echo -en "\000username\000password" | base64
xmppusername = 'XMPPUsername'
xmpppassword = 'XMPPPassword'
xmppport = '5222'
espip = '192.168.0.100' -- must be same ip as esp client for xmpp to auto-switch (dns not avail)
phoneip = '192.168.0.140'
wifi.setmode(wifi.STATION)
wifi.sta.config(routerssid,routerpass)
wifi.sta.autoconnect(1)

tmr.delay(250*1000)

dofile('trillsat.lua')
