Configure ip, submask, gateway, dns

Hello,
cause of my connection at home, I need to fill all of my IPv4 congif into device to connect to the internet.
Does anyone know, how to do that? Anything like thing.addWifi()? In what part of code should it be?
Thank you guys,
Michal

Hello @palos223,

It is quite easy, you just have to add

IPAddress ip(192,168,1,200);     //4example
IPAddress gateway(192,168,1,1);   
IPAddress subnet(255,255,255,0);   
 

ThingerESP8266 thing(USERNAME, DEVICE_ID, DEVICE_CREDENTIAL);
  
void setup() 
{
  thing.add_wifi(SSID, SSID_PASSWORD);
  WiFi.mode(WIFI_STA);
  WiFi.config(ip, gateway, subnet);

Then, the first time that your program executes thing.handle() instruction, the connection should apply your changes.

Hope it helps

Thank you for your reply,
unfortunately this addition doesnt work for me. My code is:

#include <ThingerESP8266.h>

#define USERNAME "name"
#define DEVICE_ID "ESP8266_1"
#define DEVICE_CREDENTIAL "pass"

#define SSID "wifi"
#define SSID_PASSWORD "pass"

IPAddress ip(192,168,1,200);     //4example
IPAddress gateway(192,168,1,1);   
IPAddress subnet(255,255,255,0);

ThingerESP8266 thing(USERNAME, DEVICE_ID, DEVICE_CREDENTIAL);

void setup() {
  pinMode(LED_BUILTIN, OUTPUT);

  thing.add_wifi(SSID, SSID_PASSWORD);
  WiFi.mode(WIFI_STA);
  WiFi.config(ip, gateway, subnet);

  // digital pin control example (i.e. turning on/off a light, a relay, configuring a parameter, etc)
  thing["led"] << digitalPin(LED_BUILTIN);

  // resource output example (i.e. reading a sensor value)
  thing["millis"] >> outputValue(millis());

  // more details at http://docs.thinger.io/arduino/
}

void loop() {
  thing.handle();
}

Adresses and all logins I use are right.
Without setting IP etc. works using my mobile hotspot. But my wifi is still not in connection.