$ luna-atlas --cat power-mgmt

Power Management luna-send commands.

Sleep, wake and power-management timers. 44 methods in 6 services.

44methods
6services
40documented
36public
0flagged dangerous

open Power Management in the catalog ↗

Services

servicemethodswhat it does
com.webos.service.sleep27Power/sleep management (legacy com.palm.power interface): handles suspend and resume activity tracking and coordinates shutdown and reboot…
com.webos.service.power211Power-management service (webOS OSE): powers the device on/off and reboots it, manages state transitions and wake locks, and reports/sets…
com.palm.sleep2Power-management service handling suspend/wake: wake-lock registration, suspend request handshakes, activity start/end, and system…
com.webos.service.wifi2Wi-Fi service: finds available networks, connects and disconnects, manages saved profiles, WPS and enterprise security, and reports…
com.webos.service.devicereset1Device factory-reset service: triggers reset, reports reset status and progress, requests reboot, and tracks in-store ('instop') demo state.
com.webos.service.tv.power1TV power service: reboots, turns the screen on and off, cancels a scheduled power-off, and enables Wake-on-LAN.

Documented methods to start with

Public and SSAP methods from LG's documentation, none flagged dangerous. Each opens in the catalog with its full parameter table. Run them on a rooted TV or in Developer Mode.

requestReboot ssapcom.webos.service.devicereset

Full TV reboot

params: reason

$ luna-send -n 1 -f luna://com.webos.service.devicereset/requestReboot '{}'
acquireWakeLock publiccom.webos.service.power2

Allows the device to remain powered on for a specific time period, after which the lock is released. Note: No other state change operation can be executed during this time period.

params: clientId, timeout

$ luna-send -n 1 -f luna://com.webos.service.power2/acquireWakeLock '{}'
getPowerOnReason publiccom.webos.service.power2

Gets the last reason set for powering-on the device.

params: subscribe

$ luna-send -n 1 -f luna://com.webos.service.power2/getPowerOnReason '{}'
getState publiccom.webos.service.power2

Obtains the currently set state.

params: subscribe

$ luna-send -n 1 -f luna://com.webos.service.power2/getState '{}'
notifyAlarmExpiry publiccom.webos.service.power2

Notifies about the alarm expiry.

params: clientId

$ luna-send -n 1 -f luna://com.webos.service.power2/notifyAlarmExpiry '{}'
reboot publiccom.webos.service.power2

Reboots the device with in timeout after acknowledged from registered client. LunaInterfacePMSRoot:TimeOut is configured in /var/PMS/pms.conf file as 15mins by default. Timeout is in HH:MM:SS format Note : Client will…

params: reason

$ luna-send -n 1 -f luna://com.webos.service.power2/reboot '{}'
registerStateTransition publiccom.webos.service.power2

Clients can register to get notified when the state changes from a specified state. For example, if registered to get notifications on state “ACTIVE”, you will get notified when state changes from “ACTIVE” to any other…

params: state

$ luna-send -n 1 -f luna://com.webos.service.power2/registerStateTransition '{}'
releaseWakeLock publiccom.webos.service.power2

Instantly releases the wake lock for the client.

params: clientId

$ luna-send -n 1 -f luna://com.webos.service.power2/releaseWakeLock '{}'
respondStateTransitionAck publiccom.webos.service.power2

For clients that have registered for state change notifications, some state transitions require acceptance (acknowledgement) of all clients who register for this state : If all subscribers approve (ACK), the state…

params: state, ack, token

$ luna-send -n 1 -f luna://com.webos.service.power2/respondStateTransitionAck '{}'
setPowerOnReason publiccom.webos.service.power2

Specify the reason that caused the device to be powered on.

params: reason

$ luna-send -n 1 -f luna://com.webos.service.power2/setPowerOnReason '{}'
setState publiccom.webos.service.power2

Sets the state of the device. This method forcefully sets the state and ignores the sequential flow of power states. This means that the client is not prompted for acknowledgement, even if you have registered for state…

params: state, reason

$ luna-send -n 1 -f luna://com.webos.service.power2/setState '{}'
shutdown publiccom.webos.service.power2

Shuts down the device. Note : Client will be prompted for acknowledgement if registered for state change notifications. This shutdown API will work differently for ose. If it is in ActiveState, it may go garage state…

params: reason

$ luna-send -n 1 -f luna://com.webos.service.power2/shutdown '{}'
com/palm/power/activityEnd publiccom.webos.service.sleep

Cancel a previous request (identified by "id") which was registered using activityStart.

params: id

$ luna-send -n 1 -f luna://com.webos.service.sleep/com/palm/power/activityEnd '{}'
com/palm/power/activityStart publiccom.webos.service.sleep

An activity is a specified time duration for which you do not want the system to suspend. This method requests that the system create an activity for "duration" (in milliseconds) with an associated "id" (activity name).

params: id, duration_ms

$ luna-send -n 1 -f luna://com.webos.service.sleep/com/palm/power/activityStart '{}'
com/palm/power/clientCancelByName publiccom.webos.service.sleep

Unregister the client by its name.

params: clientName

$ luna-send -n 1 -f luna://com.webos.service.sleep/com/palm/power/clientCancelByName '{}'
com/palm/power/forceSuspend publiccom.webos.service.sleep

Force the device to go into suspend even with charger connected or any activity is still active. Note: Used for developer testing purposes.

$ luna-send -n 1 -f luna://com.webos.service.sleep/com/palm/power/forceSuspend '{}'
com/palm/power/identify publiccom.webos.service.sleep

Register a new client with the given name

params: clientName, subscribe

$ luna-send -n 1 -f luna://com.webos.service.sleep/com/palm/power/identify '{}'
com/palm/power/prepareSuspendAck publiccom.webos.service.sleep

Used by a client to respond (ack or nack) to the "prepareSuspend" signal. Once the client sends ack to the "prepareSuspend" signal, the client does not do any more operations and prepare itself for the system suspend.

params: clientId, ack

$ luna-send -n 1 -f luna://com.webos.service.sleep/com/palm/power/prepareSuspendAck '{}'
com/palm/power/prepareSuspendRegister publiccom.webos.service.sleep

Register a client (already registered with "identify" call) for "prepare suspend" signal. This will add to the counter "sNumPrepareSuspend" before every polling to make a decision to proceed with the suspend action or…

params: clientId, register

$ luna-send -n 1 -f luna://com.webos.service.sleep/com/palm/power/prepareSuspendRegister '{}'
com/palm/power/suspendRequestAck publiccom.webos.service.sleep

Add the client's count in the total number of ACKs received for the "suspend request" signal.

params: clientId, ack

$ luna-send -n 1 -f luna://com.webos.service.sleep/com/palm/power/suspendRequestAck '{}'
com/palm/power/suspendRequestRegister publiccom.webos.service.sleep

Register a client (already registered with "identify" call) for "suspend request" signal. This will add to the counter "sNumSuspendRequest" before every polling to make a decision to proceed with the suspend action or…

params: clientId, register

$ luna-send -n 1 -f luna://com.webos.service.sleep/com/palm/power/suspendRequestRegister '{}'
com/palm/power/TESTSuspend publiccom.webos.service.sleep

Schedule the IdleCheck thread to check if the device can suspend. Note: Used for developer testing purposes.

$ luna-send -n 1 -f luna://com.webos.service.sleep/com/palm/power/TESTSuspend '{}'
shutdown/initiate publiccom.webos.service.sleep

Starts the shutdown process. It sends the shutdownApplications and shutdownServices signals to all the registered apps/services. Returns "true" once the shutdown process is complete and the system decides that it can…

$ luna-send -n 1 -f luna://com.webos.service.sleep/shutdown/initiate '{}'
shutdown/machineOff publiccom.webos.service.sleep

Shuts down the machine forcefully.

params: reason

$ luna-send -n 1 -f luna://com.webos.service.sleep/shutdown/machineOff '{}'
shutdown/machineReboot publiccom.webos.service.sleep

Reboots the machine forcefully by calling "reboot".

params: reason

$ luna-send -n 1 -f luna://com.webos.service.sleep/shutdown/machineReboot '{}'
shutdown/shutdownApplicationsAck publiccom.webos.service.sleep

Sets the client's response as ACK for the "shutdownApplications" signal and trigger the dispatcher for the shutdown state machine, so that if the total client ACK count exceeds total number of clients, it can proceed…

params: clientId

$ luna-send -n 1 -f luna://com.webos.service.sleep/shutdown/shutdownApplicationsAck '{}'
shutdown/shutdownApplicationsRegister publiccom.webos.service.sleep

Registers an application for the "shutdownApplications" signal. Returns the client ID of the client.

params: clientName

$ luna-send -n 1 -f luna://com.webos.service.sleep/shutdown/shutdownApplicationsRegister '{}'
shutdown/shutdownServicesAck publiccom.webos.service.sleep

Sets the client's response as ACK for the "shutdownServices" signal and trigger the dispatcher for the shutdown state machine, so that if the total client ACK count exceeds total number of clients, it can proceed to…

params: clientId

$ luna-send -n 1 -f luna://com.webos.service.sleep/shutdown/shutdownServicesAck '{}'
shutdown/shutdownServicesRegister publiccom.webos.service.sleep

Registers an application for the "shutdownApplications" signal. Returns the client ID of the client added.

params: clientName

$ luna-send -n 1 -f luna://com.webos.service.sleep/shutdown/shutdownServicesRegister '{}'
shutdown/TESTresetShutdownState publiccom.webos.service.sleep

Called by test code to reset state machine to square 1. Note: Used for developer testing purposes.

$ luna-send -n 1 -f luna://com.webos.service.sleep/shutdown/TESTresetShutdownState '{}'
Before you run anything. Methods marked dangerous can change, reset or break things on the TV. Running one from here is exactly as safe as typing the same luna-send yourself. See dangerous.md.

Other categories