Skip to content

Commit cf2454b

Browse files
Moved static ip setup to wifisetup.h
1 parent 82399a3 commit cf2454b

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

smartMeterLogger-esp32.ino

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,6 @@ const char* WS_BRIDGE_URL = "/raw"; /* bridge url */
4040
const char* NTP_POOL = "nl.pool.ntp.org";
4141
const char* TIMEZONE = "CET-1CEST,M3.5.0/2,M10.5.0/3"; /* Central European Time - see http://www.remotemonitoringsystems.ca/time-zone-abbreviations.php */
4242

43-
#define SET_STATIC_IP false /* If SET_STATIC_IP is set to true then STATIC_IP, GATEWAY, SUBNET and PRIMARY_DNS have to be set to some sane values */
44-
45-
const IPAddress STATIC_IP(192, 168, 0, 90); /* This should be outside your router dhcp range! */
46-
const IPAddress GATEWAY(192, 168, 0, 1); /* Set to your gateway ip address */
47-
const IPAddress SUBNET(255, 255, 255, 0); /* Usually 255,255,255,0 check in your router or pc connected to the same network */
48-
const IPAddress PRIMARY_DNS(192, 168, 0, 30); /* Check in your router */
49-
const IPAddress SECONDARY_DNS(192, 168, 0, 50); /* Check in your router */
50-
5143
const char* WS_RAW_URL = "/raw";
5244
const char* WS_EVENTS_URL = "/events";
5345

wifisetup.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,10 @@
11
const char* WIFI_NETWORK = "xxx";
22
const char* WIFI_PASSWORD = "xxx";
3+
4+
#define SET_STATIC_IP false /* If SET_STATIC_IP is set to true then STATIC_IP, GATEWAY, SUBNET and PRIMARY_DNS have to be set to some sane values */
5+
6+
const IPAddress STATIC_IP(192, 168, 0, 90); /* This should be outside your router dhcp range! */
7+
const IPAddress GATEWAY(192, 168, 0, 1); /* Set to your gateway ip address */
8+
const IPAddress SUBNET(255, 255, 255, 0); /* Usually 255,255,255,0 check in your router or pc connected to the same network */
9+
const IPAddress PRIMARY_DNS(192, 168, 0, 30); /* Check in your router */
10+
const IPAddress SECONDARY_DNS(192, 168, 0, 50); /* Check in your router */

0 commit comments

Comments
 (0)