<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Programming strategies  vs Battery life]]></title><description><![CDATA[<p dir="auto">I'm using the python library to write a gateway between Flic buttons and  some Yoctopuce products. It worked well so far, but I'm a bit worried about something: I added button battery monitoring and noticed that batteries level is dropping quite fast, at this rate, batteries won't last more than a few weeks.</p>
<p dir="auto">So my question is:  are there some programming strategies that will suck less energy than others? I  found some mentions of <em>active</em> and <em>passive</em> modes, but there is no reference to such modes in the python API.</p>
]]></description><link>https://community.flic.io/topic/17514/programming-strategies-vs-battery-life</link><generator>RSS for Node</generator><lastBuildDate>Sat, 18 Apr 2026 03:53:01 GMT</lastBuildDate><atom:link href="https://community.flic.io/topic/17514.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 16 Apr 2019 09:29:08 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Programming strategies  vs Battery life on Wed, 08 May 2019 12:06:56 GMT]]></title><description><![CDATA[<p dir="auto">Ok, I assume that  channel.auto_disconnect_time  unit is seconds.</p>
<p dir="auto">But I think that I eventually found out what was draining the batteries, in the  <a href="https://github.com/50ButtonsEach/fliclib-linux-hci/blob/master/clientlib/python/scan_wizard.py" rel="nofollow ugc">python scan wizard exemple </a> in the  <em>is_private</em> case, the scanner is never removed. I suspect this forces all the buttons to stay active if no-one press on the foreign button for 7 sec. Since I fixed that with a timeout, batteries are felling much better <img src="https://community.flic.io/assets/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=qo8gs0ne6uk" class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face" title=":-)" alt="🙂" /></p>
]]></description><link>https://community.flic.io/post/18638</link><guid isPermaLink="true">https://community.flic.io/post/18638</guid><dc:creator><![CDATA[martinm]]></dc:creator><pubDate>Wed, 08 May 2019 12:06:56 GMT</pubDate></item><item><title><![CDATA[Reply to Programming strategies  vs Battery life on Fri, 26 Apr 2019 21:47:23 GMT]]></title><description><![CDATA[<p dir="auto">Passive mode is the way to go. It basically means setting the "auto disconnect timeout" to something other that infinity, for example 15 seconds. It means the button will disconnect 15 seconds after inactivity. When you later press it, it will connect again. This might result in slightly higher delay, so it's not good for games, but should be ok for light switches and similar.</p>
]]></description><link>https://community.flic.io/post/18629</link><guid isPermaLink="true">https://community.flic.io/post/18629</guid><dc:creator><![CDATA[Emil]]></dc:creator><pubDate>Fri, 26 Apr 2019 21:47:23 GMT</pubDate></item></channel></rss>