Skip to content

Implement new states for THINGER_STATE enum #53

@georgevbsantiago

Description

@georgevbsantiago

If possible, implement a state in THINGER_STATE enum to inform when the Router SSID and Password have not yet been registered on the device, either using WiFiManager (ThingerESP8266WebConfig and ThingerESP32WebConfig) or thing.add_wifi();

Something like NETWORK_NOT_REGISTERED

Another suggestion is to implement a state ( THINGER_CONNECTED ) to inform that the device is Online on the Thinger Server.

enum THINGER_STATE{
NETWORK_NOT_REGISTERED, <================
NETWORK_CONNECTING,
NETWORK_CONNECTED,
NETWORK_CONNECT_ERROR,
SOCKET_CONNECTING,
SOCKET_CONNECTED,
SOCKET_CONNECTION_ERROR,
SOCKET_DISCONNECTED,
SOCKET_TIMEOUT,
SOCKET_ERROR,
THINGER_AUTHENTICATING,
THINGER_AUTHENTICATED,
THINGER_AUTH_FAILED,
THINGER_STOP_REQUEST,
THINGER_CONNECTED  <================
};

This function can help to implement some functionality like:

if state_listener_ is equal to NETWORK_NOT_REGISTERED, then blink RED LED once every 2 seconds

if state_listener_ is equal to THINGER_CONNECTED, then blink BLUE LED once every 15 seconds

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions