diff --git a/fhem/CHANGED b/fhem/CHANGED
index 4111045ce..4fe2191a7 100644
--- a/fhem/CHANGED
+++ b/fhem/CHANGED
@@ -1,5 +1,6 @@
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
# Do not insert empty lines here, update check depends on it.
+ - feature: ESPEasy: command reference revised
- bugfix: 49_SSCam: crash after FHEM-restart if answer from DS is empty
- update: 98_DOIFtools: chaining DOIF's detailFn if present
- feature: ESPEasy: added: dmx, motorshield, neopixel, candle, serialsend...
diff --git a/fhem/FHEM/34_ESPEasy.pm b/fhem/FHEM/34_ESPEasy.pm
index c3fb48b54..eb039c22e 100644
--- a/fhem/FHEM/34_ESPEasy.pm
+++ b/fhem/FHEM/34_ESPEasy.pm
@@ -36,7 +36,7 @@ use Color;
# ------------------------------------------------------------------------------
# global/default values
# ------------------------------------------------------------------------------
-my $module_version = 1.17; # Version of this module
+my $module_version = 1.18; # Version of this module
my $minEEBuild = 128; # informational
my $minJsonVersion = 1.02; # checked in received data
@@ -2608,22 +2608,21 @@ sub ESPEasy_removeGit($)
Furthermore ESP controller IP must match FHEM's IP address. ESP controller
port and the FHEM ESPEasy bridge port must be the same.
-
Max. 2 ESPEasy bridges can be defined at the same time: 1 for IPv4 and
- 1 for IPv6
+
+ Max. 2 ESPEasy bridges can be defined at the same time: 1 for IPv4 and 1 for IPv6
Further information about this module is available here:
- Forum #55728
-
+ Forum #55728
Requirements:
- - ESPEasy build >= R128 (self compiled) or an ESPEasy precompiled image >=
- R140_RC3
+ -
+ ESPEasy build >= R128 (self compiled) or an ESPEasy precompiled image
+ >= R140_RC3
- perl module JSON
Use "cpan install JSON" or operating system's package manager to install
@@ -2634,19 +2633,20 @@ sub ESPEasy_removeGit($)
ESPEasy Bridge
-
+
Define (bridge)
define <name> ESPEasy bridge <[IPV6:]port>
-
-
<name>
+ <name>
Specifies a device name of your choise.
- eg. ESPBridge
+ example: ESPBridge
+
-
-
<port>
+ <port>
Specifies TCP port for incoming ESPEasy http requests. This port must
not be used by any other application or daemon on your system and
must be in the range 1025..65535 unless you run your FHEM installation
@@ -2656,67 +2656,66 @@ sub ESPEasy_removeGit($)
distributions to activate IPV6_V6ONLY socket option. Use "echo
1>/proc/sys/net/ipv6/bindv6only"
or systemctl for that purpose.
eg. 8383
- eg. IPV6:8383
- -
+ eg.
IPV6:8383
Example:
define ESPBridge ESPEasy bridge 8383
-
+
Get (bridge)
- - <reading>
+ - <reading>
returns the value of the specified reading
- - queueSize
+ - queueSize
returns number of entries for each queue (<ip>:number
[<ip>:number] [...]).
- - user
+ - user
returns username used by basic authentication for incoming requests.
- - pass
+ - pass
returns password used by basic authentication for incoming requests.
-
+
Set (bridge)
- - help
+ - help
Shows set command usage
required values: help|pass|user|clearQueue
- - clearQueue
+ - clearQueue
Used to erase all command queues.
required value: <none>
eg. : set ESPBridge clearQueue
- - pass
+ - pass
Specifies password used by basic authentication for incoming requests.
- Note that attribute authentication
+ Note that attribute authentication
must be set to enable basic authentication, too.
required value: <password>
eg. : set ESPBridge pass secretpass
- - user
+ - user
Specifies username used by basic authentication for incoming requests.
- Note that attribute authentication
+ Note that attribute authentication
must be set to enable basic authentication, too.
required value: <username>
eg. : set ESPBridge user itsme
-
+
Attributes (bridge)
- - allowedIPs
+ - allowedIPs
Used to limit IPs or IP ranges of ESPs which are allowed to commit data.
Specify IP, IP/netmask, regexp or a comma separated list of these values.
@@ -2762,28 +2761,28 @@ sub ESPEasy_removeGit($)
used in conjunction with regexps.
- - authentication
+ - authentication
Used to enable basic authentication for incoming requests.
Note that user, pass and authentication attribute must be set to activate
basic authentication
Possible values: 0,1
Default: 0
- - autocreate
+ - autocreate
Used to overwrite global autocreate setting.
Global autocreate setting will be detected by global attribut
'autoload_undefined_devices'
Possible values: 0,1
Default: 0 (disabled)
- - autosave
+ - autosave
Used to overwrite global autosave setting.
Global autosave setting will be detected by global attribut 'autosave'.
Possible values: 0,1
Default: 0 (disabled)
- - combineDevices
+ - combineDevices
Used to gather all ESP devices of a single ESP into 1 FHEM device even if
different ESP devices names are used.
Possible values: 0, 1, IPv64 address, IPv64/netmask, ESPname or a comma
@@ -2795,25 +2794,25 @@ sub ESPEasy_removeGit($)
Eg. ESP01,ESP02
Eg. 10.68.30.1,10.69.0.0/16,ESP01,2002:1a59:50a9::/48
- - deniedIPs
+ - deniedIPs
Used to define IPs or IP ranges of ESPs which are denied to commit data.
- Syntax see allowedIPs.
+ Syntax see allowedIPs.
This attribute will overwrite any IP or range defined by
- allowedIPs.
+ allowedIPs.
Default: none (no IPs are denied)
- - disable
+ - disable
Used to disable device.
Possible values: 0,1
Default: 0 (eanble)
- - httpReqTimeout
+ - httpReqTimeout
Specifies seconds to wait for a http answer from ESP8266 device.
Possible values: 4..60
Default: 10 seconds
- - maxHttpSessions
+ - maxHttpSessions
Limit maximal concurrent outgoing http sessions to a single ESP.
Set to 0 to disable this feature. At the moment (ESPEasy R147) it seems
to be possible to send 5 "concurrent" requests if nothing else keeps the
@@ -2821,7 +2820,7 @@ sub ESPEasy_removeGit($)
Possible values: 0..9
Default: 3
- - maxQueueSize
+ - maxQueueSize
Limit maximal queue size (number of commands in queue) for outgoing http
requests.
If command queue size is reached (eg. ESP is offline) any further
@@ -2829,12 +2828,12 @@ sub ESPEasy_removeGit($)
Possible values: >10
Default: 250
- - resendFailedCmd
+ - resendFailedCmd
Used to resend commands when http request returned an error
Possible values: 0,1
Default: 0 (disabled)
- - uniqIDs
+ - uniqIDs
This attribute has been removed.
- readingFnAttributes
@@ -2843,7 +2842,7 @@ sub ESPEasy_removeGit($)
ESPEasy Device
-
+
Define (logical device)
@@ -2853,355 +2852,531 @@ sub ESPEasy_removeGit($)
have to define logical devices. At least wifi rssi value could be defined
to use autocreate and presence detection.
- define <name> ESPEasy <ip|fqdn> <port>
- <IODev> <identifier>
+ define <name> ESPEasy <ip|fqdn> <port> <IODev> <identifier>
-
-
<name>
+ <name>
Specifies a device name of your choise.
- eg. ESPxx
+ example: ESPxx
+
-
-
<ip|fqdn>
+ <ip|fqdn>
Specifies ESP IP address or hostname.
- eg. 172.16.4.100
- eg. espxx.your.domain.net
+ example: 172.16.4.100
+ example: espxx.your.domain.net
+
-
-
<port>
- Specifies http port to be used for outgoing request to your ESP. Should
- be: 80
- eg. 80
+ <port>
+ Specifies http port to be used for outgoing request to your ESP. Should be 80
+ example: 80
+
-
-
<IODev>
+ <IODev>
Specifies your ESP bridge device. See above.
- eg. ESPBridge
+ example: ESPBridge
+
-
-
<identifier>
+ <identifier>
Specifies an identifier that will bind your ESP to this device.
- This identifier must be specified in this form:
- <esp name>_<esp device name>.
If attribute
- combineDevices is used then
- <esp name> is used, only.
+ This identifier must be specified in this form:
+ <esp name>_<esp device name>.
+ If bridge attribute combineDevices is used then <esp name> is used, only.
ESP name and device name can be found here:
- <esp name>: => ESP GUI => Config => Main Settings =>
- Name
- <esp device name>: => ESP GUI => Devices => Edit =>
- Task Settings => Name
- eg. ESPxx_DHT22
- eg. ESPxx
+ <esp name>: => ESP GUI => Config => Main Settings => Name
+ <esp device name>: => ESP GUI => Devices => Edit => Task Settings => Name
+ example: ESPxx_DHT22
+ example: ESPxx
+
- - Example:
+ - Example:
define ESPxx ESPEasy 172.16.4.100 80 ESPBridge EspXX_SensorXX
-
+
+
-
+
+
Get (logical device)
- - <reading>
- returns the value of the specified reading
+ - <reading>
+ returns the value of the specified reading
+
- - pinMap
- returns possible alternative pin names that can be used in commands
-
+ - pinMap
+ returns possible alternative pin names that can be used in commands
+
-
- Set (logical device)
+
+
+ Set (logical device)
+
Notes:
- Commands are case insensitive.
- Users of Wemos D1 mini or NodeMCU can use Arduino pin names instead of
- GPIO numbers:
+ GPIO numbers.
D1 => GPIO5, D2 => GPIO4, ...,TX => GPIO1 (see: get
- pinMap)
+ pinMap)
- low/high state can be written as 0/1 or on/off
-
+
+
- - clearReadings
+ - clearReadings
Delete all readings that are auto created by received sensor values
since last FHEM restart.
- required values: <none>
+
+ - arguments:
none
+ - example: set <esp> clearReadings
+
+
- - help
+ - help
Shows set command usage.
- required values: a valid set command
+
+ - arguments:
a valid set command
+ - example:
set <esp> help gpio
+
+
- - raw
+ - raw
Can be used for own ESP plugins or new ESPEasy commands that are not
considered by this module at the moment. Any argument will be sent
- directly to the ESP.
- Usage: raw <cmd> <param1> <param2> <...>
- eg: raw myCommand 3 1 2
+ directly to the ESP.
+
+ - arguments: raw <cmd> [<arg1>] [<arg2>] [<...>]
+ - example: set <esp> raw myCommand p1 p2 p3
+
+
- - statusRequest
+ - statusRequest
Trigger a statusRequest for configured GPIOs (see attribut pollGPIOs)
and do a presence check
- required values: <none>
+
+ - arguments:
n/a
+ - example:
set <esp> statusRequest
+
+
-
- Note: The following commands are built-in ESPEasy Software commands
- that are send directly to the ESP after passing a syntax check. A detailed
- description can be found here:
- ESPEasy Command Reference
+
+ Note: The following commands are built-in ESPEasy Software commands
+ that are send directly to the ESP after passing a syntax check. A detailed
+ description can be found here:
+ ESPEasy Command Reference
+
- - Event
- Create an event. Such events can be used in ESP rules.
- required value: <string>
+
+ Generic IO ESPEasy commands:
+
- - GPIO
- Direct control of output pins (on/off)
- required arguments: <pin> <0,1>
-
+ - GPIO
+ Switch output pins to high/low
+
+ - arguments:
<pin> <0|1|off|on>
+ - example:
set <esp> gpio 14 on
+
+
- - PWM
+ - PWM
Direct PWM control of output pins
- required arguments: <pin> <level>
-
+
+ - arguments:
<pin> <level>
+ - example:
set <esp> pwm 14 512
+
+
- - PWMFADE
- PWMFADE control of output pins
- required arguments: <pin> <target> <duration>
-
- pin: 0-3 (0=r,1=g,2=b,3=w), target: 0-1023, duration: 1-30 seconds.
-
+ - PWMFADE
+ Fade output pins to a pwm value
+
+ - arguments:
<pin> <target pwm> <duration 1-30s>
+ - example:
set <esp> pwmfade 14 1023 10
+
+
- - Lights (plugin can be found here)
- Control a rgb or ct light
- required arguments: <cmd> <color> <fading time>
-
- cmd: rgb, ct, pct, on, off, toggle
- color: rrggbb (if rgb) or color temperature in Kelvin (if ct)
- fading time: time in seconds
- eg. set <esp> lights rgb aa00aa
- eg. set <esp> lights ct 3200
- eg. set <esp> lights pct 50
- eg. set <esp> lights on
- eg. set <esp> lights off
- eg. set <esp> lights toggle
-
-
- - Pulse
+ - Pulse
Direct pulse control of output pins
- required arguments: <pin> <0,1> <duration>
-
-
+
+ - arguments:
<pin> <0|1|off|on> <duration>
+ - example:
set <esp> pulse 14 on 10
+
+
- - LongPulse
+ - LongPulse
Direct pulse control of output pins
- required arguments: <pin> <0,1> <duration>
-
-
+
+ - arguments:
<pin> <0|1|off|on> <duration>
+ - example:
set <esp> longpulse 14 on 10
+
+
- - Servo
+ - PCFGpio
+ Control PCF8574 (8-bit I/O expander for I2C-bus)
+
+ - arguments:
<port> <0|1|off|on>
+ - example:
set <esp> PCFGpio 128 on
+
+ Port numbering see:
+
+ ESPEasy Wiki PCF8574
+
+
+ - PCFPulse
+ Control PCF8574 (8-bit I/O expander for I2C-bus)
+
+ - arguments:
<port> <0|1|off|on> <duration>
+ - example:
set <esp> PCFPulse 128 on 10
+
+ Port numbering see:
+
+ ESPEasy Wiki PCF8574
+
+
+ - PCFLongPulse
+ Control on PCF8574 (8-bit I/O expander for I2C-bus)
+
+ - arguments:
<port> <0|1|off|on> <duration>
+ - example:
set <esp> PCFLongPulse 128 on 10
+
+ Port numbering see:
+
+ ESPEasy Wiki PCF8574
+
+
+ - mcpgpio
+ Control MCP23017 output pins (16-Bit I/O Expander with Serial Interface)
+
+ - arguments:
<port> <0|1|off|on>
+ - example:
set <esp> mcpgpio 48 on
+
+ Port numbering see:
+
+ ESPEasy Wiki MCP23017
+
+
+ - pcapwm
+ Control PCA9685 (16-channel / 12-bit PWM I2C-bus controller)
+
+ - arguments:
<pin 0-15> <level 0-4095>
+ - example:
set <esp> pcapwm 15 4095
+
+
+
+
+
+ Motor control ESPEasy commands:
+
+
+ - Servo
Direct control of servo motors
- required arguments: <servoNo> <pin> <position>
-
-
+
+ - arguments:
<servoNo> <pin> <position>
+ - example:
set <esp> servo 1 14 100
+
+
- - lcd
+ - MotorShieldCMD
+ Control a DC motor or stepper
+
+ -
+ arguments:
DCMotor <motornumber> <forward|backward|release> <speed>
+ arguments: Stepper <motornumber> <forward|backward|release> <steps> <single|double|interleave|microstep>
+
+ -
+ example:
set <esp> MotorShieldCMD DCMotor 1 forward 10
+ example: set <esp> MotorShieldCMD Stepper 1 backward 25 single
+
+
+
+
+
+
+ Display related ESPEasy commands:
+
+
+ - lcd
Write text messages to LCD screen
- required arguments: <row> <col> <text>
-
+ Pay attention to attributes
+ displayTextEncode and
+ displayTextWidth.
+
+ - arguments:
<row> <col> <text>
+ - example:
set <esp> lcd 1 1 Test a b c
+
+
- - lcdcmd
+ - lcdcmd
Control LCD screen
- required arguments: <on|off|clear>
-
+
+ - arguments:
<on|off|clear>
+ - example:
set <esp> lcdcmd clear
+
+
- - mcpgpio
- Control MCP23017 output pins
- required arguments: <pin> <0,1>
-
-
- - oled
+ - oled
Write text messages to OLED screen
- required arguments: <row> <col> <text>
-
+ Pay attention to attributes
+ displayTextEncode and
+ displayTextWidth.
+
+ - arguments:
<row> <col> <text>
+ - example:
set <esp> oled 1 1 Test a b c
+
+
- - oledcmd
+ - oledcmd
Control OLED screen
- required arguments: <on|off|clear>
+
+ - arguments:
<on|off|clear>
+ - example:
set <esp> oledcmd clear
+
+
+
+ - oledframedcmd
+ Switch oledframed on/off
+
+ - arguments:
<on|off>
+ - example:
set <esp> oledframedcmd on
+
+
+
+
+
+ DMX related ESPEasy commands:
+
+
+ - dmx
+ Send DMX commands to a device
+
+ - arguments:
<on|off|log|value|channel=value[,value][...]>
+ - example:
set <esp> dmx 1=255,2=127
+
+
+
+
+
+ LED/Lights related ESPEasy commands:
+
+
+ - Lights (plugin can be found here)
+ Control a rgb or ct light
+
+ - arguments:
<rgb|ct|pct|on|off|toggle> [<hex-rgb|color-temp|pct-value>] [<fading time>]
+ - examples:
+ set <esp> lights rgb aa00aa
+ set <esp> lights rgb aa00aa 10
+ set <esp> lights ct 3200
+ set <esp> lights ct 3200 10
+ set <esp> lights pct 50
+ set <esp> lights on
+ set <esp> lights off
+ set <esp> lights toggle
+
+
+
+
+ - candle
+ Control candle rgb plugin
+
+ - arguments:
+
CANDLE:<FlameType>:<Color>:<Brightness>
+ - example:
set <esp> CANDLE:4:FF0000:200
+
+
+
+ - neopixel
+ Control neopixel plugin (single LED)
+
+ - arguments:
<led nr> <red 0-255> <green 0-255> <blue 0-255>
+ - example:
set <esp> neopixel 1 255 255 255
+
- - pcapwm
- Control PCA9685 pwm pins
- required arguments: <pin> <level>
-
+ - neopixelall
+ Control neopixel plugin (all together)
+
+ - arguments:
<red 0-255> <green 0-255> <blue 0-255>
+ - example:
set <esp> neopixelall 255 255 255
+
+
- - PCFLongPulse
- Long pulse control on PCF8574 output pins
-
+ - neopixelline
+ Control neopixel plugin (line)
+
+ - arguments:
<start led no> <stop led no> <red 0-255> <green 0-255> <blue 0-255>
+ - example:
set <esp> neopixelline 1 5 0 127 255
+
+
- - PCFPulse
- Pulse control on PCF8574 output pins
-
- - pcfgpio
- Control PCF8574 output pins
-
+
+ Sound related ESPEasy commands:
+
- - irsend
+ - tone
+ Play a tone on a pin via a speaker or piezo element (ESPEasy >=
+ 2.0.0-dev6)
+
+
+ - arguments:
<pin> <freq Hz> <duration s>
+ - example:
set <esp> tone 14 4000 1
+
+
+
+ - rtttl
+ Play melodies via RTTTL
+ (ESPEasy >= 2.0.0-dev6)
+
+
+ - arguments: <rtttl> <pin>:<rtttl codes>
+ - example:
set <esp> rtttl 14:d=10,o=6,b=180,c,e,g
+
+
+
+ - buzzer
+ Beep a short time
+
+ - arguments:
none
+ - example:
set <esp> buzzer
+
+
+
+
+
+ Miscellaneous ESPEasy commands:
+
+
+ - Event
+ Trigger an ESP event. Such events can be used in ESP Easy rules.
+
+ - arguments:
<string>
+ - example:
set <esp> event testevent
+
+
+
+ - irsend
Send ir codes via "Infrared Transmit" Plugin
Supported protocols are: NEC, JVC, RC5, RC6, SAMSUNG, SONY, PANASONIC at
the moment. As long as official documentation is missing you can find
some details here:
-
+
IR Transmitter thread #1 and
-
+
IR Transmitter thread #61.
- required arguments: <NEC|JVC|RC5|RC6|SAMSUNG|SONY|PANASONIC> <hex code> <bit length>
- required arguments: <RAW> <B32 raw> <frequenz> <pulse> <blank length>
-
- eg. irsend NEC 7E81542B 32
- eg. irsend RAW 3U0GGL8AGGK588A22K58ALALALAGL1A22LAK45ALALALALALALALALAL1AK5 38 512 256
-
+
+ -
+ arguments:
<NEC|JVC|RC5|RC6|SAMSUNG|SONY|PANASONIC> <hex code> <bit length>
+ arguments: <RAW> <B32 raw> <frequenz> <pulse length> <blank length>
+
+ -
+ example:
set <esp> irsend NEC 7E81542B 32
+ example: set <esp> irsend RAW 3U0GGL8AGGK588A22K58ALALALAGL1A22LAK45ALALALALALALALALAL1AK5 38 512 256
+
+
+
- - tone
- Play a tone on a pin via a speaker or piezo element (ESPEasy >=
- 2.0.0-dev6)
-
- required arguments: <pin> <freq> <duration>
-
-
- - rtttl
- Play melodies via RTTTL
- (ESPEasy >= 2.0.0-dev6)
-
- required arguments: <rtttl>
-
-
- - status
- Request esp device status (eg. gpio)
- required values: <device> <pin>
- eg: gpio 13
-
-
- - dmx
- Send DMX commands to a device
- required values: <>
- eg: dmx 1=255
-
-
- - MotorShieldCMD
- Control a DC motor or stepper
- required values: <DCMotor|Stepper> <motornumber>
- <forward|backward|release> <speed|steps>
- <single|double|interleave|microstep>
- eg: MotorShieldCMD DCMotor 1 forward 10
- eg: MotorShieldCMD Stepper 1 backward 25 single
-
-
- - candle
- Control candle rgb plugin
- required values: CANDLE:<FlameType>:<Color>:<Brightness>
- eg: CANDLE:4:FF0000:200
-
-
- - neopixel
- Control neopixel plugin (single LED)
- required values: <led nr> <red 0-255> <green 0-255> <blue 0-255>
- eg: neopixel 1 255 255 255
-
-
- - neopixelall
- Control neopixel plugin (all together)
- required values: <red 0-255> <green 0-255> <blue 0-255>
- eg: neopixelall 255 255 255
-
-
- - neopixelline
- Control neopixel plugin (line)
- required values: <start led no> <stop led no> <red 0-255> <green 0-255> <blue 0-255>
- eg: neopixelline 1 5 0 127 255
-
-
- - oledframedcmd
- Switch oledframed on/off
- required values: <on|offxxx>
- eg: oledframedcmd on
-
-
- - serialsend
+ - serialsend
Used for ser2net plugin
- required values: <string>
- eg: serialsend test
-
-
- - buzzer
- Beep a short time
- required values: none
- eg: buzzer
-
-
- - inputswitchstate
- inputswitchstate
- required values: none
- eg: inputswitchstate
-
+
+ - arguments:
<string>
+ - example:
set <esp> serialsend test
+
+
- Administrative commands (be careful):
+
+ Administrative ESPEasy commands (be careful !!!):
+
- - erase
+ - erase
Wipe out ESP flash memory
- required values: none
-
+
+ - arguments:
none
+ - example:
set <esp> erase
+
+
- - reboot
+ - reboot
Used to reboot your ESP
- required values: none
-
+
+ - arguments:
none
+ - example:
set <esp> reboot
+
+
- - reset
+ - reset
Do a factory reset on the ESP
- required values: none
-
+
+ - arguments:
none
+ - example:
set <esp> reset
+
+
- Experimental commands (The following commands can be changed or
- removed at any time):
- - rgb
- EXPERIMENTAL, may be removed in later versions if a usable rgb plugin is
- available.
- Used to control a rgb light.
- You have to set attribute rgbGPIOs to enable this feature. Default
- colorpicker mode is HSVp but can be adjusted with help of attribute
- colorpicker to HSV or RGB. Set
- attribute webCmd to rgb to display a colorpicker
- in FHEMWEB room view and on detail page.
- required argument: <rrggbb>|on|off|toggle
-
- eg. rgb 00FF00
- eg. rgb on
- eg. rgb off
- eg. rgb toggle
-
- Full featured example:
- attr <ESP> colorpicker HSVp
- attr <ESP> devStateIcon { ESPEasy_devStateIcon($name) }
- attr <ESP> Interval 30
- attr <ESP> parseCmdResponse status,pwm
- attr <ESP> pollGPIOs D6,D7,D8
- attr <ESP> rgbGPIOs D6,D7,D8
- attr <ESP> webCmd rgb:rgb ff0000:rgb 00ff00:rgb 0000ff:toggle:on:off
-
-
+
+ Experimental ESPEasy commands: (The following commands can be changed or removed at any time)
+
+
+ - rgb
+ Used to control a rgb light wo/ an ESPEasy plugin.
+ You have to set attribute rgbGPIOs to
+ enable this feature. Default colorpicker mode is HSVp but can be adjusted
+ with help of attribute colorpicker
+ to HSV or RGB. Set attribute webCmd to rgb to
+ display a colorpicker in FHEMWEB room view and on detail page.
+
+ -
+ arguments:
<rrggbb>|on|off|toggle
+
+ -
+ examples:
+ set <esp> rgb 00FF00
+ set <esp> rgb on
+ set <esp> rgb off
+ set <esp> rgb toggle
+
+ - Full featured example:
+ attr <ESP> colorpicker HSVp
+ attr <ESP> devStateIcon { ESPEasy_devStateIcon($name) }
+ attr <ESP> Interval 30
+ attr <ESP> parseCmdResponse status,pwm
+ attr <ESP> pollGPIOs D6,D7,D8
+ attr <ESP> rgbGPIOs D6,D7,D8
+ attr <ESP> webCmd rgb:rgb ff0000:rgb 00ff00:rgb 0000ff:toggle:on:off
+
+
+
+
+
+
+ Deprecated ESPEasy commands: (will be removed in a later version)
+
+
+ - ESPEasy_device_set_status
+ Request esp device status (eg. gpio)
+ See attributes: parseCmdResponse, readingPrefixGPIO, readingSuffixGPIOState
+
+ - arguments:
<pin>
+ - example:
set <esp> status 14
+
+
+
-
-
- Attributes (logical device)
-
+
+ Attributes (logical device)
- - adjustValue
+
+ - adjustValue
Used to adjust sensor values
Must be a space separated list of <reading>:<formula>.
Reading can be a regexp. Formula can be an arithmetic expression like
@@ -3226,99 +3401,111 @@ sub ESPEasy_removeGit($)
Sample function to ignore negative values:
- sub my_OwnFunction($$$) {
- my ($name,$reading,$value) = @_;
- return ($value < 0) ? undef : $value;
- }
-
+ sub my_OwnFunction($$$) {
+ my ($name,$reading,$value) = @_;
+ return ($value < 0) ? undef : $value;
+ }
+
+
- - colorpicker
+ - colorpicker
Used to select colorpicker mode
Possible values: RGB,HSV,HSVp
- Default: HSVp
+ Default: HSVp
+
- - colorpickerCTcw
+ - colorpickerCTcw
Used to select ct colorpicker's cold white color temperature in Kelvin
Possible values: > colorpickerCTww
- Default: 6000
+ Default: 6000
+
- - colorpickerCTww
+ - colorpickerCTww
Used to select ct colorpicker's warm white color temperature in Kelvin
Possible values: < colorpickerCTcw
- Default: 2000
+ Default: 2000
+
- - disable
+ - disable
Used to disable device
Possible values: 0,1
- Default: 0
+ Default: 0
+
- - displayTextEncode
+ - displayTextEncode
Used to disable url encoding for text that is send to oled/lcd displays.
Useful if you want to encode the text by yourself.
Possible values: 0,1
- Default: 1 (enabled)
+ Default: 1 (enabled)
+
- - displayTextWidth
+ - displayTextWidth
Used to specify number of characters per display line.
If set then all characters before and after the text on the same line will
be overwritten with spaces. Attribute
- displayTextEncode must not be
+ displayTextEncode must not be
disabled to use this feature. A 128x64px display has 16 characters per
line if you are using a 8px font.
Possible values: integer
- Default: 0 (disabled)
+ Default: 0 (disabled)
+
- - Interval
+ - Interval
Used to set polling interval for presence check and GPIOs polling in
seconds. 0 will disable this feature.
Possible values: secs > 10.
- Default: 300
+ Default: 300
+
- IODev
Used to select I/O device (ESPEasy Bridge).
-
+
- - mapLightCmds
+ - mapLightCmds
Enable the following commands and map them to the specified ESPEasy
command: rgb, ct, pct, on, off, toggle
Needed if you want to use FHEM's colorpickers to control a rgb/ct ESPEasy
plugin.
required values: a valid set command
- eg. attr <esp> mapLightCmds Lights
+ eg. attr <esp> mapLightCmds Lights
+
- - presenceCheck
+ - presenceCheck
Used to enable/disable presence check for ESPs
Presence check determines the presence of a device by readings age. If any
- reading of a device is newer than interval
+ reading of a device is newer than interval
seconds then it is marked as being present. This kind of check works for
ESP devices in deep sleep too but require at least 1 reading that is
updated regularly. Therefore the ESP must send the corresponding data
regularly (ESP device option "delay").
Possible values: 0,1
- Default: 1 (enabled)
+ Default: 1 (enabled)
+
- - readingSwitchText
+ - readingSwitchText
Use on,off instead of 1,0 for readings if ESP device is a switch.
Possible values: 0,1
- Default: 1 (enabled)
+ Default: 1 (enabled)
+
- - setState
+ - setState
Summarize received values in state reading.
A positive number determines the number of characters used for abbreviated
reading names. Only readings with an age less than
- interval will be considered. If your are
+ interval will be considered. If your are
not satisfied with format or behavior of setState then disable this
attribute (set to 0) and use global attributes userReadings and/or
stateFormat to get what you want.
Possible values: integer >=0
- Default: 3 (enabled with 3 characters abbreviation)
+ Default: 3 (enabled with 3 characters abbreviation)
+
The following two attributes should only be use in cases where ESPEasy
software do not send data on status changes and no rule/dummy can be used
to do that. Useful for commands like PWM, STATUS, ...
- - parseCmdResponse
+ - parseCmdResponse
Used to parse response of commands like GPIO, PWM, STATUS, ...
Specify a module command or comma separated list of commands as argument.
Commands are case insensitive.
@@ -3326,49 +3513,56 @@ sub ESPEasy_removeGit($)
independently. Useful for commands like STATUS, PWM, ...
Possible values: <set cmd>[,<set cmd>][,...]
Default: status
- Eg. attr ESPxx parseCmdResponse status,pwm
+ Eg. attr ESPxx parseCmdResponse status,pwm
+
- - pollGPIOs
+ - pollGPIOs
Used to enable polling for GPIOs status. This polling will do same as
command 'set ESPxx status <device> <pin>'
Possible values: GPIO number or comma separated GPIO number list
Default: none
- Eg. attr ESPxx pollGPIOs 13,D7,D2
+ Eg. attr ESPxx pollGPIOs 13,D7,D2
+
+
The following two attributes control naming of readings that are
generated by help of parseCmdResponse and pollGPIOs (see above)
- - readingPrefixGPIO
+ - readingPrefixGPIO
Specifies a prefix for readings based on GPIO numbers. For example:
"set ESPxx pwm 13 512" will switch GPIO13 into pwm mode and set pwm to
512. If attribute readingPrefixGPIO is set to PIN and attribut
- parseCmdResponse contains pwm
+ parseCmdResponse contains pwm
command then the reading name will be PIN13.
Possible Values: string
- Default: GPIO
+ Default: GPIO
+
- - readingSuffixGPIOState
+ - readingSuffixGPIOState
Specifies a suffix for the state-reading of GPIOs (see Attribute
- pollGPIOs)
+ pollGPIOs)
Possible Values: string
Default: no suffix
- Eg. attr ESPxx readingSuffixGPIOState _state
+ Eg. attr ESPxx readingSuffixGPIOState _state
+
- - readingFnAttributes
-
+ -
+ readingFnAttributes
+
Experimental (The following attributes can be changed or removed at
any time):
- - rgbGPIOs
+ - rgbGPIOs
Use to define GPIOs your lamp is conneted to. Must be set to be able to
- use rgb set command.
+ use rgb set command.
Possible values: Comma separated tripple of ESP pin numbers or arduino pin
names
Eg: 12,13,15
Eg: D6,D7,D8
- Default: none
+ Default: none
+