mod_csi_battery_saver/README.markdown
author Matthew Wild <mwild1@gmail.com>
Fri, 23 Sep 2022 22:41:15 +0100
changeset 5058 62480053c87b
parent 3637 6b0db0f2d57a
permissions -rw-r--r--
mod_cloud_notify_encrypted: Additional debug logging when enabling/skipping
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2610
538c54d2dab3 mod_csi_battery_saver: CSI module to save battery on mobile devices, based on mod_csi_pump
tmolitor <thilo@eightysoft.de>
parents:
diff changeset
     1
---
538c54d2dab3 mod_csi_battery_saver: CSI module to save battery on mobile devices, based on mod_csi_pump
tmolitor <thilo@eightysoft.de>
parents:
diff changeset
     2
description: CSI module to save battery on mobile devices
538c54d2dab3 mod_csi_battery_saver: CSI module to save battery on mobile devices, based on mod_csi_pump
tmolitor <thilo@eightysoft.de>
parents:
diff changeset
     3
---
538c54d2dab3 mod_csi_battery_saver: CSI module to save battery on mobile devices, based on mod_csi_pump
tmolitor <thilo@eightysoft.de>
parents:
diff changeset
     4
2745
69248dcd7cff mod_csi_battery_saver: Fix interaction with smacks hibernation
tmolitor <thilo@eightysoft.de>
parents: 2610
diff changeset
     5
Please use this module instead of [mod_csi_pump] if you want timestamping,
69248dcd7cff mod_csi_battery_saver: Fix interaction with smacks hibernation
tmolitor <thilo@eightysoft.de>
parents: 2610
diff changeset
     6
properly handled carbon copies, support for handling encrypted messages and
69248dcd7cff mod_csi_battery_saver: Fix interaction with smacks hibernation
tmolitor <thilo@eightysoft.de>
parents: 2610
diff changeset
     7
correctly handled smacks events.
69248dcd7cff mod_csi_battery_saver: Fix interaction with smacks hibernation
tmolitor <thilo@eightysoft.de>
parents: 2610
diff changeset
     8
2749
b62cec32680e mod_csi_battery_saver: Fix bug when smacks is resumed before hibernating
tmolitor <thilo@eightysoft.de>
parents: 2745
diff changeset
     9
If smacks is used on the same server this needs at least version [f70c02c14161]
b62cec32680e mod_csi_battery_saver: Fix bug when smacks is resumed before hibernating
tmolitor <thilo@eightysoft.de>
parents: 2745
diff changeset
    10
of the smacks module! There could be message reordering on resume otherwise.
b62cec32680e mod_csi_battery_saver: Fix bug when smacks is resumed before hibernating
tmolitor <thilo@eightysoft.de>
parents: 2745
diff changeset
    11
2610
538c54d2dab3 mod_csi_battery_saver: CSI module to save battery on mobile devices, based on mod_csi_pump
tmolitor <thilo@eightysoft.de>
parents:
diff changeset
    12
Stanzas are queued in a buffer until either an "important" stanza is
538c54d2dab3 mod_csi_battery_saver: CSI module to save battery on mobile devices, based on mod_csi_pump
tmolitor <thilo@eightysoft.de>
parents:
diff changeset
    13
encountered or the buffer becomes full. Then all queued stanzas are sent
538c54d2dab3 mod_csi_battery_saver: CSI module to save battery on mobile devices, based on mod_csi_pump
tmolitor <thilo@eightysoft.de>
parents:
diff changeset
    14
at the same time. This way, nothing is lost or reordered while still
538c54d2dab3 mod_csi_battery_saver: CSI module to save battery on mobile devices, based on mod_csi_pump
tmolitor <thilo@eightysoft.de>
parents:
diff changeset
    15
allowing for power usage savings by not requiring mobile clients to
538c54d2dab3 mod_csi_battery_saver: CSI module to save battery on mobile devices, based on mod_csi_pump
tmolitor <thilo@eightysoft.de>
parents:
diff changeset
    16
bring up their radio for unimportant stanzas.
538c54d2dab3 mod_csi_battery_saver: CSI module to save battery on mobile devices, based on mod_csi_pump
tmolitor <thilo@eightysoft.de>
parents:
diff changeset
    17
2758
d1aa5fc005f7 mod_csi_battery_saver: Consider chat markers and outgoing carbon copies as important.
tmolitor <thilo@eightysoft.de>
parents: 2752
diff changeset
    18
`IQ` stanzas, and `message` stanzas containing a body or being encrypted,
3637
6b0db0f2d57a mod_csi_battery_saver: add compatibility with mod_csi_muc_priorities, make queue length configurable and update README
tmolitor <thilo@eightysoft.de>
parents: 2758
diff changeset
    19
chat markers (see [XEP-0333]) and all *nonzas* are considered important.
2752
ff0495909d4e mod_csi_battery_saver: Fix small bug and correct readme.
tmolitor <thilo@eightysoft.de>
parents: 2750
diff changeset
    20
If the config option `csi_battery_saver_filter_muc` is set to true,
ff0495909d4e mod_csi_battery_saver: Fix small bug and correct readme.
tmolitor <thilo@eightysoft.de>
parents: 2750
diff changeset
    21
groupchat messages must set a subject or have the user's username or nickname
3637
6b0db0f2d57a mod_csi_battery_saver: add compatibility with mod_csi_muc_priorities, make queue length configurable and update README
tmolitor <thilo@eightysoft.de>
parents: 2758
diff changeset
    22
mentioned in the messages (or be encrypted) to count as "important".
6b0db0f2d57a mod_csi_battery_saver: add compatibility with mod_csi_muc_priorities, make queue length configurable and update README
tmolitor <thilo@eightysoft.de>
parents: 2758
diff changeset
    23
**Warning:** you should only set this to true if your users can live with
6b0db0f2d57a mod_csi_battery_saver: add compatibility with mod_csi_muc_priorities, make queue length configurable and update README
tmolitor <thilo@eightysoft.de>
parents: 2758
diff changeset
    24
groupchat messages being delayed several minutes!
6b0db0f2d57a mod_csi_battery_saver: add compatibility with mod_csi_muc_priorities, make queue length configurable and update README
tmolitor <thilo@eightysoft.de>
parents: 2758
diff changeset
    25
On the other hand if this option is set to false (*default*),
6b0db0f2d57a mod_csi_battery_saver: add compatibility with mod_csi_muc_priorities, make queue length configurable and update README
tmolitor <thilo@eightysoft.de>
parents: 2758
diff changeset
    26
all groupchat messages having a body or being encrypted are considered "important".
6b0db0f2d57a mod_csi_battery_saver: add compatibility with mod_csi_muc_priorities, make queue length configurable and update README
tmolitor <thilo@eightysoft.de>
parents: 2758
diff changeset
    27
In this case [mod_csi_muc_priorities] can be used to let user configure per groupchat
6b0db0f2d57a mod_csi_battery_saver: add compatibility with mod_csi_muc_priorities, make queue length configurable and update README
tmolitor <thilo@eightysoft.de>
parents: 2758
diff changeset
    28
which of them are important for them (e.g. all messages having a body are important)
6b0db0f2d57a mod_csi_battery_saver: add compatibility with mod_csi_muc_priorities, make queue length configurable and update README
tmolitor <thilo@eightysoft.de>
parents: 2758
diff changeset
    29
and which are not (e.g. only mentions and own messages are important).
6b0db0f2d57a mod_csi_battery_saver: add compatibility with mod_csi_muc_priorities, make queue length configurable and update README
tmolitor <thilo@eightysoft.de>
parents: 2758
diff changeset
    30
If users don't change their settings, [mod_csi_muc_priorities] handles all groupchats
6b0db0f2d57a mod_csi_battery_saver: add compatibility with mod_csi_muc_priorities, make queue length configurable and update README
tmolitor <thilo@eightysoft.de>
parents: 2758
diff changeset
    31
as important (see its docs for more information).
2752
ff0495909d4e mod_csi_battery_saver: Fix small bug and correct readme.
tmolitor <thilo@eightysoft.de>
parents: 2750
diff changeset
    32
`Presence` stanzas are always considered not "important".
2610
538c54d2dab3 mod_csi_battery_saver: CSI module to save battery on mobile devices, based on mod_csi_pump
tmolitor <thilo@eightysoft.de>
parents:
diff changeset
    33
538c54d2dab3 mod_csi_battery_saver: CSI module to save battery on mobile devices, based on mod_csi_pump
tmolitor <thilo@eightysoft.de>
parents:
diff changeset
    34
All buffered stanzas that allow timestamping are properly stamped to
538c54d2dab3 mod_csi_battery_saver: CSI module to save battery on mobile devices, based on mod_csi_pump
tmolitor <thilo@eightysoft.de>
parents:
diff changeset
    35
reflect their original send time, see [XEP-0203].
538c54d2dab3 mod_csi_battery_saver: CSI module to save battery on mobile devices, based on mod_csi_pump
tmolitor <thilo@eightysoft.de>
parents:
diff changeset
    36
538c54d2dab3 mod_csi_battery_saver: CSI module to save battery on mobile devices, based on mod_csi_pump
tmolitor <thilo@eightysoft.de>
parents:
diff changeset
    37
Use with other CSI plugins such as [mod_throttle_presence],
3637
6b0db0f2d57a mod_csi_battery_saver: add compatibility with mod_csi_muc_priorities, make queue length configurable and update README
tmolitor <thilo@eightysoft.de>
parents: 2758
diff changeset
    38
[mod_filter_chatstates], [mod_csi_simple] or [mod_csi_pump] is **not** supported.
6b0db0f2d57a mod_csi_battery_saver: add compatibility with mod_csi_muc_priorities, make queue length configurable and update README
tmolitor <thilo@eightysoft.de>
parents: 2758
diff changeset
    39
Usage of [mod_csi_muc_priorities] is allowed (see configuration).
2610
538c54d2dab3 mod_csi_battery_saver: CSI module to save battery on mobile devices, based on mod_csi_pump
tmolitor <thilo@eightysoft.de>
parents:
diff changeset
    40
3637
6b0db0f2d57a mod_csi_battery_saver: add compatibility with mod_csi_muc_priorities, make queue length configurable and update README
tmolitor <thilo@eightysoft.de>
parents: 2758
diff changeset
    41
*Hint:* [mod_csi_muc_priorities] needs [mod_track_muc_joins] to function properly.
2749
b62cec32680e mod_csi_battery_saver: Fix bug when smacks is resumed before hibernating
tmolitor <thilo@eightysoft.de>
parents: 2745
diff changeset
    42
2750
d3a2f4bdaf09 mod_csi_battery_saver: Add config option for better muc handling
tmolitor <thilo@eightysoft.de>
parents: 2749
diff changeset
    43
Configuration
d3a2f4bdaf09 mod_csi_battery_saver: Add config option for better muc handling
tmolitor <thilo@eightysoft.de>
parents: 2749
diff changeset
    44
=============
d3a2f4bdaf09 mod_csi_battery_saver: Add config option for better muc handling
tmolitor <thilo@eightysoft.de>
parents: 2749
diff changeset
    45
3637
6b0db0f2d57a mod_csi_battery_saver: add compatibility with mod_csi_muc_priorities, make queue length configurable and update README
tmolitor <thilo@eightysoft.de>
parents: 2758
diff changeset
    46
  Option                                  Default           Description
6b0db0f2d57a mod_csi_battery_saver: add compatibility with mod_csi_muc_priorities, make queue length configurable and update README
tmolitor <thilo@eightysoft.de>
parents: 2758
diff changeset
    47
  ----------------------------------      ---------- -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
6b0db0f2d57a mod_csi_battery_saver: add compatibility with mod_csi_muc_priorities, make queue length configurable and update README
tmolitor <thilo@eightysoft.de>
parents: 2758
diff changeset
    48
  `csi_battery_saver_filter_muc`          false      Controls whether all MUC messages having a body should be considered as important as long as [mod_csi_muc_priorities] doesn't configure them to be **not** important (false) or only such containing the user's room nic (true). **WARNING:** you should only set this to true if your users can live with muc messages being delayed several minutes.
6b0db0f2d57a mod_csi_battery_saver: add compatibility with mod_csi_muc_priorities, make queue length configurable and update README
tmolitor <thilo@eightysoft.de>
parents: 2758
diff changeset
    49
  `csi_battery_saver_queue_size`          256        Size of the stanza buffer used for the queue (if the queue is full a flush will be forced)
2750
d3a2f4bdaf09 mod_csi_battery_saver: Add config option for better muc handling
tmolitor <thilo@eightysoft.de>
parents: 2749
diff changeset
    50
d3a2f4bdaf09 mod_csi_battery_saver: Add config option for better muc handling
tmolitor <thilo@eightysoft.de>
parents: 2749
diff changeset
    51
2749
b62cec32680e mod_csi_battery_saver: Fix bug when smacks is resumed before hibernating
tmolitor <thilo@eightysoft.de>
parents: 2745
diff changeset
    52
[f70c02c14161]: //hg.prosody.im/prosody-modules/raw-file/f70c02c14161/mod_smacks/mod_smacks.lua