Skip to content

A lamp simulated device to test DomoticASW

License

LGPL-3.0, GPL-3.0 licenses found

Licenses found

LGPL-3.0
COPYING.LESSER
GPL-3.0
COPYING
Notifications You must be signed in to change notification settings

DomoticASW/lamp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lamp

A lamp simulated device to test DomoticASW

Docker Hub

Docker Hub - fracarluccii/domoticasw-lamp

Run with Docker

To run the lamp device using Docker, you can use the following commands:

docker run fracarluccii/domoticasw-lamp 

Variables

The following configurations can be passed to the container as environment variables

Variable name Default value Explanation
ID lamp-01 lamp ID
NAME Lamp lamp name
DEVICE_PORT 8093 Port used by the lamp device
SERVER_ADDRESS / Address:port of the server
DISCOVERY_ADDRESS 255.255.255.255 Address for discovery broadcasts
DISCOVERY_PORT 30000 Port for discovery broadcasts

How to use

At first send <<device-address>>/register request to the device to register it in the server.

Properties

  • state: The current state of the lamp (on/off).
  • brightness: The current brightness level of the lamp (0-100).
  • color: The current color of the lamp in RGB format.

Actions

  • <<device-address>>/execute/switch: Switch the state of the lamp.
  • <<device-address>>/execute/set-brightness: Set the desired brightness level on the lamp.
  • <<device-address>>/execute/set-color: Set the desired color on the lamp.

Body example for set-brightness:

{
  "input": 50
}

Body example for set-color:

{
  "input":
        {
          "r" : 127,
          "g" : 127,
          "b" : 127
        }
}

Events

  • turned-on: Triggered when the lamp is turned on.
  • turned-off: Triggered when the lamp is turned off.
  • brightness-changed: Triggered when the brightness level changes.
  • color-changed: Triggered when the color changes.

About

A lamp simulated device to test DomoticASW

Resources

License

LGPL-3.0, GPL-3.0 licenses found

Licenses found

LGPL-3.0
COPYING.LESSER
GPL-3.0
COPYING

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •