mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-04 05:16:45 +00:00
MYSENSORS MYSENSORS_DEVICE: cref patches (use id + enhanced formatting by drhirn)
git-svn-id: https://svn.fhem.de/fhem/trunk@24385 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
57892c3600
commit
45c01910a3
@ -1000,60 +1000,67 @@ __END__
|
||||
|
||||
=begin html
|
||||
|
||||
<a name="MYSENSORS"></a>
|
||||
<a id="MYSENSORS"></a>
|
||||
<h3>MYSENSORS</h3>
|
||||
<ul>
|
||||
<p>connects fhem to <a href="http://MYSENSORS.org">MYSENSORS</a>.</p>
|
||||
<p>A single MYSENSORS device can serve multiple <a href="#MYSENSORS_DEVICE">MYSENSORS_DEVICE</a> clients.<br/>
|
||||
Each <a href="#MYSENSORS_DEVICE">MYSENSORS_DEVICE</a> represents a mysensors node.<br/>
|
||||
<a name="MYSENSORSdefine"></a>
|
||||
<p><b>Define</b></p>
|
||||
<ul>
|
||||
<p><code>define <name> MYSENSORS <serial device>|<ip:port></code></p>
|
||||
<p>A single MYSENSORS device can serve multiple <a href="#MYSENSORS_DEVICE">MYSENSORS_DEVICE</a> clients.<br>
|
||||
Each <a href="#MYSENSORS_DEVICE">MYSENSORS_DEVICE</a> represents a mysensors node.</p>
|
||||
|
||||
<a id="MYSENSORS-define"></a>
|
||||
<h4>Define</h4>
|
||||
<p><code>define <name> MYSENSORS <serial device>|<ip:port></code></p>
|
||||
<p>Specifies the MYSENSORS device.</p>
|
||||
</ul>
|
||||
<a name="MYSENSORSset"></a>
|
||||
<p><b>Set</b></p>
|
||||
|
||||
<a id="MYSENSORS-set"></a>
|
||||
<h4>Set</h4>
|
||||
<ul>
|
||||
<li>
|
||||
<p><code>set <name> connect</code><br/>
|
||||
(re-)connects the MYSENSORS-device to the MYSENSORS-gateway</p>
|
||||
<p><a id="MYSENSORS-set-connect"></a><b>connect</b></p>
|
||||
<p><code>set <name> connect</code></p>
|
||||
<p>(re-)connects the MYSENSORS-device to the MYSENSORS-gateway</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>set <name> disconnect</code><br/>
|
||||
disconnects the MYSENSORS-device from the MYSENSORS-gateway</p>
|
||||
<p><a id="MYSENSORS-set-disconnect"></a><b>disconnect</b></p>
|
||||
<p><code>set <name> disconnect</code></p>
|
||||
<p>disconnects the MYSENSORS-device from the MYSENSORS-gateway</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>set <name> inclusion-mode on|off</code><br/>
|
||||
turns the gateways inclusion-mode on or off</p>
|
||||
<p><a id="MYSENSORS-set-inclusion-mode"></a><b>inclusion-mode</b></p>
|
||||
<p><code>set <name> inclusion-mode on|off</code></p>
|
||||
<p>turns the gateways inclusion-mode on or off</p>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="MYSENSORSattr"></a>
|
||||
<p><b>Attributes</b></p>
|
||||
|
||||
<a id="MYSENSORS-attr"></a>
|
||||
<h4>Attributes</h4>
|
||||
<ul>
|
||||
<li>
|
||||
<p><code>attr <name> autocreate</code><br/>
|
||||
enables auto-creation of MYSENSOR_DEVICE-devices on receival of presentation-messages</p>
|
||||
<p><a id="MYSENSORS-attr-autocreate"></a><b>autocreate</b></p>
|
||||
<p><code>attr <name> autocreate</code></p>
|
||||
<p>enables auto-creation of MYSENSOR_DEVICE-devices on receival of presentation-messages</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>attr <name> requestAck</code><br/>
|
||||
request acknowledge from nodes.<br/>
|
||||
if set the Readings of nodes are updated not before requested acknowledge is received<br/>
|
||||
if not set the Readings of nodes are updated immediatly (not awaiting the acknowledge).
|
||||
May also be configured for individual nodes if not set for gateway.</p>
|
||||
<p><a id="MYSENSORS-attr-requestack"></a><b>requestAck</b></p>
|
||||
<p><code>attr <name> requestAck</code></p>
|
||||
<p>request acknowledge from nodes.</p>
|
||||
<p>if set the Readings of nodes are updated not before requested acknowledge is received<br>
|
||||
if not set the Readings of nodes are updated immediatly (not awaiting the acknowledge).</p>
|
||||
<p>May also be configured for individual nodes if not set for gateway.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>attr <name> first-sensorid <<number <h; 255>></code><br/>
|
||||
configures the lowest node-id assigned to a mysensor-node on request (defaults to 20)</p>
|
||||
<p><a id="MYSENSORS-attr-first-sensorid"></a><b>first-sensorid</b></p>
|
||||
<p><code>attr <name> first-sensorid <number <h;255>></code></p>
|
||||
<p>configures the lowest node-id assigned to a mysensor-node on request (defaults to 20)</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>attr <name> OTA_firmwareConfig <filename></code><br/>
|
||||
specifies a configuration file for the <a href="https://www.mysensors.org/about/fota">FOTA</a>
|
||||
<p><a id="MYSENSORS-attr-ota_firmwareconfig"></a><b>OTA_firmwareConfig</b></p>
|
||||
<p><code>attr <name> OTA_firmwareConfig <filename></code></p>
|
||||
<p>specifies a configuration file for the <a href="https://www.mysensors.org/about/fota">FOTA</a>
|
||||
(firmware over the air - wireless programming of the nodes) configuration. It must be stored
|
||||
in the folder FHEM/firmware. The format of the configuration file is the following (csv):</p>
|
||||
<p><code>#Type,Name,Version,File,Comments</code><br/>
|
||||
<code>10,Blink,1,Blink.hex,blinking example</code><br/></p>
|
||||
<p>The meaning of the columns is the following:</br>
|
||||
<code>10,Blink,1,Blink.hex,blinking example</code></p>
|
||||
<p>The meaning of the columns is the following:</p>
|
||||
<dl>
|
||||
<dt><code>Type</code></dt>
|
||||
<dd>a numeric value (range 0 .. 65536) - each node will be assigned a firmware type</dd>
|
||||
@ -1066,10 +1073,9 @@ __END__
|
||||
<dd>the filename containing the firmware - must also be stored in the folder FHEM/firmware</dd>
|
||||
<dt><code>Comments</code></dt>
|
||||
<dd>a description / comment for the firmware</dd>
|
||||
</dl></p>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
=end html
|
||||
=cut
|
||||
|
@ -1339,126 +1339,158 @@ __END__
|
||||
|
||||
=begin html
|
||||
|
||||
<a name="MYSENSORS_DEVICE"></a>
|
||||
<a id="MYSENSORS_DEVICE"></a>
|
||||
<h3>MYSENSORS_DEVICE</h3>
|
||||
<ul>
|
||||
<p>represents a mysensors sensor attached to a mysensor-node</p>
|
||||
<p>requires a <a href="#MYSENSORS">MYSENSORS</a>-device as IODev</p>
|
||||
<a name="MYSENSORS_DEVICE define"></a>
|
||||
<p><b>Define</b></p>
|
||||
|
||||
<a id="MYSENSORS_DEVICE-define"></a>
|
||||
<h4>Define</h4>
|
||||
<p><code>define <name> MYSENSORS_DEVICE <Sensor-type> <node-id></code>
|
||||
<p>Specifies the MYSENSOR_DEVICE device.</p>
|
||||
|
||||
<a id="MYSENSORS_DEVICE-set"></a>
|
||||
<h4>Set</h4>
|
||||
<ul>
|
||||
<p><code>define <name> MYSENSORS_DEVICE <Sensor-type> <node-id></code><br/>Specifies the MYSENSOR_DEVICE device.</p>
|
||||
</ul>
|
||||
<a name="MYSENSORS_DEVICEset"></a>
|
||||
<p><b>Set</b></p>
|
||||
<ul>
|
||||
<b>AttrTemplate</b>
|
||||
<li>Helps to easily configure your devices. Just get a list of all available attrTremplates by issuing
|
||||
<ul>
|
||||
<p><code>set <name> attrTemplate ?</code></p>
|
||||
</ul>
|
||||
Have a look at the descriptions and choose a suitable one. Then use the drop-down list and click "set" or issue a.<br>
|
||||
<ul>
|
||||
<p><code>set <name> attrTemplate A_02a_atmospheric_pressure</code></p>
|
||||
</ul>
|
||||
</li><br>
|
||||
<b>clear</b>
|
||||
<li>
|
||||
<p><code>set <name> clear</code><br/>clears MySensors EEPROM area and reboot (i.e. "factory" reset) - requires MY_SPECIAL_DEBUG</p>
|
||||
<p><a id="MYSENSORS_DEVICE-set-update"></a><b>AttrTemplate</b></p>
|
||||
<p>Helps to easily configure your devices. Just get a list of all available attrTremplates by issuing<br>
|
||||
<code>set <name> attrTemplate ?</code></p>
|
||||
<p>Have a look at the descriptions and choose a suitable one. Then use the drop-down list and click "set" or use<br>
|
||||
<code>set <name> attrTemplate A_02a_atmospheric_pressure</code></p>
|
||||
</li>
|
||||
<b>flash</b>
|
||||
<li>
|
||||
<p><code>set <name> flash</code><br/>
|
||||
Checks whether a newer firmware version is available. If a newer firmware version is
|
||||
<p><a id="MYSENSORS_DEVICE-set-clear"></a><b>clear</b></p>
|
||||
<p><code>set <name> clear</code></p>
|
||||
<p>clears MySensors EEPROM area and reboot (i.e. "factory" reset) - requires MY_SPECIAL_DEBUG</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a id="MYSENSORS_DEVICE-set-flash"></a><b>flash</b></p>
|
||||
<p><code>set <name> flash</code></p>
|
||||
<p>Checks whether a newer firmware version is available. If a newer firmware version is
|
||||
available the flash procedure is started. The sensor node must support FOTA for
|
||||
this.</p>
|
||||
</li>
|
||||
<b>fwType</b>
|
||||
<li>
|
||||
<p><code>set <name> fwType <value></code><br/>
|
||||
assigns a firmware type to this node (must be a numeric value in the range 0 .. 65536).
|
||||
Should be contained in the <a href="#MYSENSORSattrOTA_firmwareConfig">FOTA configuration
|
||||
file</a>.</p>
|
||||
<p><a id="MYSENSORS_DEVICE-set-fwType"></a><b>fwType</b></p>
|
||||
<p><code>set <name> fwType <value></code></p>
|
||||
<p>assigns a firmware type to this node (must be a numeric value in the range 0 .. 65536).<br>
|
||||
Should be contained in the <a href="#MYSENSORS-attr-ota_firmwareconfig">FOTA configuration file</a>.</p>
|
||||
</li>
|
||||
<b>time</b>
|
||||
<li>
|
||||
<p><code>set <name> time</code><br/>sets time for nodes (that support it)</p>
|
||||
<p><a id="MYSENSORS_DEVICE-set-time"></a><b>time</b></p>
|
||||
<p><code>set <name> time</code></p>
|
||||
<p>sets time for nodes (that support it)</p>
|
||||
</li>
|
||||
<b>reboot</b>
|
||||
<li>
|
||||
<p><code>set <name> reboot</code><br/>reboots a node (requires a bootloader that supports it).<br/>Attention: Nodes that run the standard arduino-bootloader will enter a bootloop!<br/>Dis- and reconnect the nodes power to restart in this case.</p>
|
||||
<p><a id="MYSENSORS_DEVICE-set-reboot"></a><b>reboot</b></p>
|
||||
<p><code>set <name> reboot</code></p>
|
||||
<p>reboots a node (requires a bootloader that supports it).<br/>Attention: Nodes that run the standard arduino-bootloader will enter a bootloop!<br/>Dis- and reconnect the nodes power to restart in this case.</p>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
<a name="MYSENSORS_DEVICEget"></a>
|
||||
<p><b>Get</b></p>
|
||||
|
||||
<a id="MYSENSORS_DEVICE-get"></a>
|
||||
<h4>Get</h4>
|
||||
<ul>
|
||||
<li>
|
||||
<p><code>get <name> Extended_DEBUG</code><br/>
|
||||
requires MY_SPECIAL_DEBUG</p>
|
||||
<p><a id="MYSENSORS_DEVICE-get-extended_debug"></a><b>Extended_DEBUG</b></p>
|
||||
<p><code>get <name> Extended_DEBUG</code></p>
|
||||
<p>requires MY_SPECIAL_DEBUG<br>
|
||||
retrieves the CPU frequency, CPU voltage and free memory of the sensor</p>
|
||||
</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>
|
||||
<p><code>get <name> ReadingsFromComment</code><br/>
|
||||
rebuild reding names from comments of presentation messages if available</p>
|
||||
<p><a id="MYSENSORS_DEVICE-get-readingsfromcomment"></a><b>ReadingsFromComment</b></p>
|
||||
<p><code>get <name> ReadingsFromComment</code></p>
|
||||
<p>rebuild reding names from comments of presentation messages if available<br>
|
||||
After issuing this get check the log for changes.</p>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<p><code>get <name> RSSI</code><br/>
|
||||
requires MY_SIGNAL_REPORT_ENABLED, not supported by all transportation layers</p>
|
||||
<p><a id="MYSENSORS_DEVICE-get-rssi"></a><b>RSSI</b></p>
|
||||
<p><code>get <name> RSSI</code></p>
|
||||
<p>requires MY_SIGNAL_REPORT_ENABLED, not supported by all transportation layers<br>
|
||||
delievers a set of Signal Quality information.</p>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="MYSENSORS_DEVICEattr"></a>
|
||||
<p><b>Attributes</b></p>
|
||||
|
||||
<a id="MYSENSORS_DEVICE-attr"></a>
|
||||
<h4>Attributes</h4>
|
||||
<ul>
|
||||
<li>
|
||||
<p><code>attr <name> config [<M|I>]</code><br/>configures metric (M) or inch (I). Defaults to 'M'</p>
|
||||
<p><a id="MYSENSORS_DEVICE-attr-config"></a><b>config</b></p>
|
||||
<p><code>attr <name> config [<M|I>]</code></p>
|
||||
<p>configures metric (M) or inch (I). Defaults to 'M'</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>attr <name> OTA_autoUpdate [<0|1>]</code><br/>
|
||||
specifies whether an automatic update of the sensor node should be performed (1) during startup of the
|
||||
node or not (0). Defaults to 0</p>
|
||||
<p><a id="MYSENSORS_DEVICE-attr-ota_autoUpdate"></a><b>OTA_autoUpdate</b></p>
|
||||
<p><code>attr <name> OTA_autoUpdate [<0|1>]</code></p>
|
||||
<p>specifies whether an automatic update of the sensor node should be performed (1) during startup of the node or not (0). Defaults to 0</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>attr <name> setCommands [<command:reading:value>]*</code><br/>configures one or more commands that can be executed by set.<br/>e.g.: <code>attr <name> setCommands on:switch_1:on off:switch_1:off</code><br/>if list of commands contains both 'on' and 'off' <a href="#setExtensions">set extensions</a> are supported</p>
|
||||
<p><a id="MYSENSORS_DEVICE-attr-setcommands"></a><b>setCommands</b></p>
|
||||
<p><code>attr <name> setCommands [<command:reading:value>]*</code></p>
|
||||
<p>configures one or more commands that can be executed by set.</p>
|
||||
<p>e.g.:<br>
|
||||
<code>attr <name> setCommands on:switch_1:on off:switch_1:off</code></p>
|
||||
<p>if list of commands contains both 'on' and 'off' <a href="#setExtensions">set extensions</a> are supported</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>attr <name> setReading_<reading> [<value>]*</code><br/>configures a reading that can be modified by set-command<br/>e.g.: <code>attr <name> setReading_switch_1 on,off</code></p>
|
||||
<p><a id="MYSENSORS_DEVICE-attr-setreading"></a><b>setReading_<reading></b></p>
|
||||
<p><code>attr <name> setReading_<reading> [<value>]*</code></p>
|
||||
<p>configures a reading that can be modified by set-command</p>
|
||||
<p>e.g.:<br>
|
||||
<code>attr <name> setReading_switch_1 on,off</code></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>attr <name> setExtensionsEvent</code><br/>If set, the event will contain the command implemented by SetExtensions
|
||||
(e.g. on-for-timer 10), else the executed command (e.g. on).
|
||||
<p><a id="MYSENSORS_DEVICE-attr-setextensionsevent"></a><b>setExtensionsEvent</b></p>
|
||||
<p><code>attr <name> setExtensionsEvent</code></p>
|
||||
<p>If set, the event will contain the command implemented by SetExtensions (e.g. on-for-timer 10), else the executed command (e.g. on).</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>attr <name> mapReading_<reading> <childId> <readingtype> [<value>:<mappedvalue>]*</code><br/>configures the reading-name for a given childId and sensortype<br/>e.g.: <code>attr xxx mapReading_aussentemperatur 123 temperature</code>
|
||||
or <code>attr xxx mapReading_leftwindow 10 status 1:closed 0:open</code>. See also mapReadingType for setting defaults for types without predefined defaults</p>
|
||||
<p><a id="MYSENSORS_DEVICE-attr-mapreading"></a><b>mapReading_<reading></b></p>
|
||||
<p><code>attr <name> mapReading_<reading> <childId> <readingtype> [<value>:<mappedvalue>]*</code></p>
|
||||
<p>configures the reading-name for a given childId and sensortype</p>
|
||||
<p>e.g.:<br>
|
||||
<code>attr xxx mapReading_aussentemperatur 123 temperature</code><br>
|
||||
<code>attr xxx mapReading_leftwindow 10 status 1:closed 0:open</code></p>
|
||||
<p>See also mapReadingType for setting defaults for types without predefined defaults</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>attr <name> requestAck</code><br/>request acknowledge from nodes.<br/>if set the Readings of nodes are updated not before requested acknowledge is received<br/>if not set the Readings of nodes are updated immediatly (not awaiting the acknowledge).<br/>May also be configured on the gateway for all nodes at once</p>
|
||||
<p><a id="MYSENSORS_DEVICE-attr-requestack"></a><b>requestAck</b></p>
|
||||
<p><code>attr <name> requestAck</code></p>
|
||||
<p>request acknowledge from nodes.<br>
|
||||
if set the Readings of nodes are updated not before requested acknowledge is received<br>
|
||||
if not set the Readings of nodes are updated immediatly (not awaiting the acknowledge).<br>
|
||||
May also be configured on the gateway for all nodes at once</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>attr <name> mapReadingType_<reading> <new reading name> [<value>:<mappedvalue>]*</code><br/>configures reading type names that should be used instead of technical names<br/>e.g.: <code>attr xxx mapReadingType_LIGHT switch 0:on 1:off</code>to be used for mysensor Variabletypes that have no predefined defaults (yet)</p>
|
||||
<p><a id="MYSENSORS_DEVICE-attr-mapreadingtype"></a><b>mapReadingType_<reading></b></p>
|
||||
<p><code>attr <name> mapReadingType_<reading> <new reading name> [<value>:<mappedvalue>]*</code></p>
|
||||
<p>configures reading type names that should be used instead of technical names</p>
|
||||
<p>e.g.:<br>
|
||||
<code>attr xxx mapReadingType_LIGHT switch 0:on 1:off</code></p>
|
||||
<p>to be used for mysensor Variabletypes that have no predefined defaults (yet)</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>attr <name> OTA_BL_Type <either Optiboot or MYSBootloader>*</code><br/>For other bootloaders than Optiboot V3.0 OTA updates will only work if bootloader type is specified - MYSBootloader will reboot node if firmware update is started, so make sure, node will really recover</p>
|
||||
<p><a id="MYSENSORS_DEVICE-attr-ota_bl_type"></a><b>OTA_BL_Type</b></p>
|
||||
<p><code>attr <name> OTA_BL_Type <either Optiboot or MYSBootloader>*</code></p>
|
||||
<p>For other bootloaders than Optiboot V3.0 OTA updates will only work if bootloader type is specified - MYSBootloader will reboot node if firmware update is started, so make sure, node will really recover</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>attr <name> OTA_Chan76_IODev </code><br/>As MYSBootloader per default uses nRF24 channel 76, you may specify a different IODev for OTA data using channel 76</p>
|
||||
<p><a id="MYSENSORS_DEVICE-attr-ota_chan76_iodev"></a><b>OTA_Chan76_IODev</b></p>
|
||||
<p><code>attr <name> OTA_Chan76_IODev </code></p>
|
||||
<p>As MYSBootloader per default uses nRF24 channel 76, you may specify a different IODev for OTA data using channel 76</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>attr <name> timeoutAck <time in seconds>*</code><br/>configures timeout to set device state to NACK in case not all requested acks are received</p>
|
||||
<p><a id="MYSENSORS_DEVICE-attr-timeoutack"></a><b>timeoutAck</b></p>
|
||||
<p><code>attr <name> timeoutAck <time in seconds>*</code></p>
|
||||
<p>configures timeout to set device state to NACK in case not all requested acks are received</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>attr <name> timeoutAlive <time in seconds>*</code><br/>configures timeout to set device state to alive or dead. If messages from node are received within timout spec, state will be alive, otherwise dead. If state is NACK (in case timeoutAck is also set), state will only be changed to alive, if there are no outstanding messages to be sent.</p>
|
||||
<p><a id="MYSENSORS_DEVICE-attr-timeoutalive"></a><b>timeoutAlive</b></p>
|
||||
<p><code>attr <name> timeoutAlive <time in seconds>*</code></p>
|
||||
<p>configures timeout to set device state to alive or dead. If messages from node are received within timout spec, state will be alive, otherwise dead. If state is NACK (in case timeoutAck is also set), state will only be changed to alive, if there are no outstanding messages to be sent.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
=end html
|
||||
=cut
|
||||
|
Loading…
x
Reference in New Issue
Block a user