Skip to main content
Version: 1.0

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. Changing any parameter requires restart.

PropertyTypeDescription

enable

boolean

true if the connection is enabled, false otherwise

ipv4mode

string

IPv4 mode. Range of values: dhcp, static. Can be omitted if once set

ip

string or null

IP in the network when ipv4mode is static. Required for static mode if not already set

netmask

string or null

Netmask of the network when ipv4mode is static. Optional, defaults to 255.255.255.0

gw

string or null

Gateway of the network when ipv4mode is static. Optional, set to null to clear

nameserver

string or null

Nameserver to use when ipv4mode is static. Optional, set to null to clear

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
}