Skip to main content

Ethernet

The Ethernet component handles the ethernet interface of devices and uses Eth for RPC method namespace. It uses the key eth when enumerated in objects including multiple component payloads, like Shelly.GetStatus. Provides the minimal component interface:

Methods

Eth.SetConfig

Properties:

PropertyTypeDescription

config

object

Configuration that the method takes

Find more about the config properties in config section

Eth.GetConfig

The Eth.GetConfig method does not own any request properties.Find the response properties in config section

Eth.GetStatus

The Eth.GetStatus method does not own any request properties.Find the response properties in status section

Configuration

The configuration of the Ethernet component shows the current settings of the ethernet connection.

PropertyTypeDescription

enable

boolean

True if the connection is enabled, false otherwise

ipv4mode

string

IPv4 mode. Range of values: dhcp, static

ip

string or null

IP in the network when ipv4mode is static

netmask

string or null

Netmask of the network when ipv4mode is static

gw

string or null

Gateway of the network when ipv4mode is static

nameserver

string or null

Nameserver to use when ipv4mode is static

Status

The status of the Ethernet component contains the IP address which can be used to access the device over ethernet.

PropertyTypeDescription

ip

string or null

IP of the device in the network

Examples

Eth.SetConfig example

http://192.168.33.1/rpc/Eth.SetConfig?config={"enable":true}

Response

{
"restart_required": false
}

Eth.GetConfig example

http://192.168.33.1/rpc/Eth.GetConfig

Response

{
"enable": true,
"ipv4mode": "dhcp",
"ip": null,
"netmask": null,
"gw": null,
"nameserver": null
}

Eth.GetStatus example

http://192.168.33.1/rpc/Eth.GetStatus

Response

{
"ip": null
}