@@ -255,6 +255,7 @@ extern RemoteDebug Debug;
255255#define SOLARSTARTTIME 40 // Seconds to keep chargecurrent at 6A
256256#define OCPP_MODE 0
257257#define AUTOUPDATE 0 // default for Automatic Firmware Update: 0 = disabled, 1 = enabled
258+ #define SB2_WIFI_MODE 0
258259
259260// Mode settings
260261#define MODE_NORMAL 0
@@ -385,7 +386,7 @@ extern RemoteDebug Debug;
385386#define MENU_MODE 12 // 0x0200: EVSE mode
386387#define MENU_CIRCUIT 13 // 0x0201: EVSE Circuit max Current
387388#define MENU_GRID 14 // 0x0202: Grid type to which the Sensorbox is connected
388- #define MENU_UNUSED 15 // 0x0203: Unused
389+ #define MENU_SB2_WIFI 15 // 0x0203: WiFi mode of the Sensorbox 2
389390#define MENU_MAINS 16 // 0x0204: Max Mains Current
390391#define MENU_START 17 // 0x0205: Surplus energy start Current
391392#define MENU_STOP 18 // 0x0206: Stop solar charging at 6A after this time
@@ -465,6 +466,7 @@ extern struct tm timeinfo;
465466extern uint8_t Mode ; // EVSE mode
466467extern uint8_t LoadBl ; // Load Balance Setting (Disable, Master or Node)
467468extern uint8_t Grid ;
469+ extern uint8_t SB2_WIFImode ;
468470#if FAKE_RFID
469471extern uint8_t Show_RFID ;
470472#endif
@@ -531,7 +533,7 @@ const struct {
531533 {"MODE" , "Normal, Smart or Solar EVSE mode" , 0 , 2 , MODE },
532534 {"CIRCUIT" , "EVSE Circuit max Current" , 10 , 160 , MAX_CIRCUIT },
533535 {"GRID" , "Grid type to which the Sensorbox is connected" , 0 , 1 , GRID },
534- {"Unused" , "Unused" , 0 , 1 , 0 },
536+ {"SB2 WIFI" , "Connect Sensorbox-2 to WiFi" , 0 , 2 , SB2_WIFI_MODE },
535537 {"MAINS" , "Max MAINS Current (per phase)" , 10 , 200 , MAX_MAINS },
536538 {"START" , "Surplus energy start Current (sum of phases)" , 0 , 48 , START_CURRENT },
537539 {"STOP" , "Stop solar charging at 6A after this time" , 0 , 60 , STOP_TIME },
@@ -550,7 +552,7 @@ const struct {
550552 {"ENE REGI" ,"Register for Energy (kWh) of custom electric meter" , 0 , 65534 , EMCUSTOM_EREGISTER },
551553 {"ENE DIVI" ,"Divisor for Energy (kWh) of custom electric meter" , 0 , 7 , EMCUSTOM_EDIVISOR },
552554 {"READ MAX" ,"Max register read at once of custom electric meter" , 3 , 255 , 3 },
553- {"WIFI" , "Use ESPTouch APP on your phone" , 0 , 2 , WIFI_MODE },
555+ {"WIFI" , "Connect SmartEVSE to WiFi" , 0 , 2 , WIFI_MODE },
554556 {"AUTOUPDAT" ,"Automatic Firmware Update" , 0 , 1 , AUTOUPDATE },
555557 {"CONTACT 2" ,"Contactor2 (C2) behaviour" , 0 , sizeof (StrEnableC2 ) / sizeof (StrEnableC2 [0 ])- 1 , ENABLE_C2 },
556558 {"MAX TEMP" ,"Maximum temperature for the EVSE module" , 40 , 75 , MAX_TEMPERATURE },
@@ -588,6 +590,15 @@ struct DelayedTimeStruct {
588590 int32_t diff ; // StartTime minus current time in seconds
589591};
590592
593+ struct Sensorbox {
594+ uint8_t SoftwareVer ; // Sensorbox 2 software version
595+ uint8_t WiFiConnected ; // 0:not connected / 1:connected to WiFi
596+ uint8_t WiFiAPSTA ; // 0:no portal / 1: portal active
597+ uint8_t WIFImode ; // 0:Wifi Off / 1:WiFi On / 2: Portal Start
598+ uint8_t IP [4 ];
599+ uint8_t APpassword [8 ];
600+ };
601+
591602#define EPOCH2_OFFSET 1672531200
592603
593604extern struct DelayedTimeStruct DelayedStartTime ;
0 commit comments