Skip to content

mklossde/CmdOs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CmdOS V0.1.0 a OpenOn.org project

develop by [email protected]

CmdOS LOGO

CmdOS is a command based operation system for the ESP32.

Cmd

<a href="doc/CmdOscms.md">See cmd description for details</a>

All functions are controled via cmd
e.g. drawLine 0 0 10 0 => draw a line on a display

See examples

Build own Application

CmdOS do not have to run on its one, like Tasmota or EspHome. The idea is to build up own development and include basic functions with CmdOS.

// On Application

#include <ESPAsyncWebServer.h>
 
const char *prgTitle = "MyApp";
const char *prgVersion = "V1.0.0";

const char* user_admin = "admin"; // default user
char user_pas[]="";   // default espPas
const char *wifi_ssid_default = ""; // PRIVAT_WIFI_SSID; // define in privatdata.h 
const char *wifi_pas_default = ""; //PRIVAT_WIFI_PAS;   // define in privatdata.h 
const char *mqtt_default = ""; //PRIVAT_MQTTSERVER;     // define in privatdata.h 

byte MODE_DEFAULT=21; // MODE_WIFI_CL_TRY=21 / MODE_PRIVAT

boolean serialEnable=true; // enable/disbale serial in/out
boolean wifiEnable=true;  // enable/disbale wifi
boolean ntpEnable=true; // enable time server
boolean webEnable=true;    // enable/disbale http server
boolean mdnsEnable=true;   // enable/disable mDNS detection 
boolean bootSafe=true;    // enable/disbale boot safe
#define enableFs true         // enable fs / SPIFFS
#define netEnable true       // enable/disbale network ping/dns/HttpCLient 
#define webSerialEnable false // enable/disbale web serial
#define mqttEnable true      // enable/disbale mqtt
#define otaEnable true        // enabled/disbale ota update 
#define updateEnable false     // enabled/disbale update firmware via web 
#define ledEnable false       // enable/disbale serial
#define ledGpio 4             // io of led
#define LED_ON true           // gpio false=led-on
#define swEnable false        // enable/disbale switch
#define swGpio 13             // io pin of sw 
#define SW_ON false           // gpio false=sw-pressed

int _webPort = 80;
AsyncWebServer server(_webPort);

char* appCmd(char *cmd, char *p0, char *p1,char *p2,char *p3,char *p4,char *p5,char *p6,char *p7,char *p8,char *p9) {
	return "unkown cmd"; // add application cmd handling here 
}

void webApp() {	} // add application web handling here ----------------------------------------------------------

void setup() {
  cmdOSSetup();
  if(isModeOk()) { 
	// add application setup here 
  }  
}

void loop() {
  cmdOSLoop();
  if(isModeOk()) { 
	// add application loop here 
  }  
}

Feature:

Cmd Interfaces:

  • Serial cmd
  • WebSerial cmd
  • Rest cmd
  • MQTT cmd

Feature NTP

The Network time is received from ntp-server, or gateway (if no npt-server is defined)

[Require Libs]

If you use/like this project please https://buymeacoffee.com/openon (a good choise is 1Euro per ESP a year ;-)

LOGO a OpenOn.org project - develop by [email protected]

About

Esp32 command based Operation-System

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published