Esempio n. 1
0
// Will be called when system initialization was completed
void startWebServer()
{
	Serial.println("starting web-server...");
	server.listen(80);
	server.addPath("/ajax/get-networks", onAjaxNetworkList);
	server.addPath("/ajax/connect", onAjaxConnect);
	server.addPath("/ajax/get-ip", onAjaxGetIP);
	server.addPath("/ajax/disable-ap", onAjaxDisableAP);

}
Esempio n. 2
0
void startWebServer()
{
	server.listen(80);
	server.addPath("/", onIndex);
	server.addPath("/lcd", onLcd);
	server.addPath("/volume", onVolume);
	server.addPath("/mute", onMute);
	server.addPath("/source", onSource);
	server.addPath("/state", onState);
	server.addPath("/power", onPower);
	server.addPath("/tune", onTune);
	server.addPath("/mixing", onMixing);
	server.addPath("/enhance", onEnhance);
	
		// Web Sockets configuration
	server.enableWebSockets(true);
	server.setWebSocketConnectionHandler(wsConnected);
	server.setWebSocketMessageHandler(wsMessageReceived);
	server.setWebSocketBinaryHandler(wsBinaryReceived);
	server.setWebSocketDisconnectionHandler(wsDisconnected);

	
	server.setDefaultHandler(onFile);

	Serial.println("\r\n=== WEB SERVER STARTED ===");
	Serial.println(WifiStation.getIP());
    lcd.clear();
    lcd.setCursor(1,1);
	lcd.print(WifiStation.getIP());
}
Esempio n. 3
0
void startWebServer()
{
	server.listen(80);
	server.addPath("/", onIndex);
	server.addPath("/hello", onHello);
	server.setDefaultHandler(onFile);

	Serial.println("\r\n=== WEB SERVER STARTED ===");
	Serial.println(WifiStation.getIP());
	Serial.println("==============================\r\n");
}
Esempio n. 4
0
void startWebServer()
{
	server.listen(80);
	server.addPath("/", onIndex);
	server.addPath("/ajax/input", onAjaxInput);
	server.addPath("/ajax/frequency", onAjaxFrequency);
	server.setDefaultHandler(onFile);

	Serial.println("\r\n=== WEB SERVER STARTED ===");
	Serial.println(WifiStation.getIP());
	Serial.println("==============================\r\n");
}
Esempio n. 5
0
void StartServers()
{
	server.listen(80);
	server.addPath("/", onIndex);
	server.setDefaultHandler(onFile);

	// Web Sockets configuration
	server.enableWebSockets(true);
	server.commandProcessing(true,"command");

	server.setWebSocketConnectionHandler(wsConnected);
	server.setWebSocketMessageHandler(wsMessageReceived);
	server.setWebSocketBinaryHandler(wsBinaryReceived);
	server.setWebSocketDisconnectionHandler(wsDisconnected);

	Serial.println("\r\n=== WEB SERVER STARTED ===");
	Serial.println(WifiStation.getIP());
	Serial.println("==============================\r\n");

	// Start FTP server
	ftp.listen(21);
	ftp.addUser("me", "123"); // FTP account

	Serial.println("\r\n=== FTP SERVER STARTED ===");
	Serial.println("==============================\r\n");

	telnet.listen(23);
	telnet.enableDebug(true);

	Serial.println("\r\n=== TelnetServer SERVER STARTED ===");
	Serial.println("==============================\r\n");
}
Esempio n. 6
0
void connectFail()
{
	debugf("Connection failed");

	WifiAccessPoint.config("Sprinkler Configuration " + WifiAccessPoint.getMAC().substring(WifiAccessPoint.getMAC().length() - 4), "", AUTH_OPEN);
	WifiAccessPoint.enable(true);

	WifiStation.enable(false);
	WifiStation.startScan(networkScanCompleted);
	WifiStation.waitConnection(connectOk); // Wait connection

	server.listen(80);
	server.addPath("/", onIndex);
	server.addPath("/ipconfig", onIpConfig);
	server.addPath("/ajax/get-networks", onAjaxNetworkList);
	server.addPath("/ajax/connect", onAjaxConnect);
	server.setDefaultHandler(onFile);
}
Esempio n. 7
0
/*
 * start http and telnet server
 * telnet can be used to configure cammera settings
 * unsing ArdCammCommand handler
 */
void StartServers()
{
	server.listen(80);
	server.addPath("/", onIndex);
	server.addPath("/cam/set", onCamSetup);
	server.addPath("/cam/capture", onCapture);
//	server.addPath("/stream", onStream);
	server.addPath("/favicon.ico", onFavicon);
	server.setDefaultHandler(onFile);

	Serial.println("\r\n=== WEB SERVER STARTED ===");
	Serial.println(WifiStation.getIP());
	Serial.println("==============================\r\n");


	telnet.listen(23);
	telnet.enableDebug(true);

	Serial.println("\r\n=== TelnetServer SERVER STARTED ===");
	Serial.println("==============================\r\n");
}
Esempio n. 8
0
void web_run() {
	WifiStation.enable(true);
	server.listen(80);
	server.addPath("/driver/pos", web_cb_driver_pos);
	server.addPath("/driver/setpos", web_cb_driver_setpos);
	server.addPath("/driver/forward", web_cb_driver_forward);
	server.addPath("/driver/backward", web_cb_driver_backward);
	server.addPath("/driver/stop", web_cb_driver_stop);
	server.addPath("/scan", web_cb_start_scan);
	server.addPath("/scanStatus", web_cb_scan_status);
	server.addPath("/connect", web_cb_connect);
	server.setDefaultHandler(onFile);
	startFTP();
}
Esempio n. 9
0
void startWebServer()
{
	server.listen(80);
	server.addPath("/", onIndex);
	server.addPath("/ipconfig", onIpConfig);
	server.addPath("/mqttconfig", onMqttConfig);
	server.addPath("/ota", onOtaConfig);
	server.addPath("/ajax/get-networks", onAjaxNetworkList);
	server.addPath("/ajax/run-ota", onAjaxRunOta);
	server.addPath("/ajax/connect", onAjaxConnect);
	server.setDefaultHandler(onFile);
}
Esempio n. 10
0
void ICACHE_FLASH_ATTR startWebServer()
{
	server.listen(80);
	server.addPath("/", onIndex);
	server.addPath("/test", onTest);
	server.addPath("/ota", onOta);
	server.addPath("/ipconfig", onIpConfig);
	server.addPath("/system", onSystem);
	server.addPath("/ajax/get-networks", onAjaxNetworkList);
	server.addPath("/ajax/connect", onAjaxConnect);
	server.setDefaultHandler(onFile);
}
Esempio n. 11
0
void startWebServer()
{
	server.listen(80);
	server.addPath("/", onIndex);
	server.setDefaultHandler(onFile);

	// Web Sockets configuration
	server.enableWebSockets(true);
	server.setWebSocketConnectionHandler(wsConnected);
	server.setWebSocketMessageHandler(wsMessageReceived);
	server.setWebSocketBinaryHandler(wsBinaryReceived);
	server.setWebSocketDisconnectionHandler(wsDisconnected);

	Serial.println("\r\n=== WEB SERVER STARTED ===");
	Serial.println(WifiStation.getIP());
	Serial.println("==============================\r\n");
}
void startWebServer()
{
        server.listen(80);
        server.addPath("/", onIndex);
        server.addPath("/index.html", onIndex);
}