# \#python

**URL:** https://community.openhab.org/tag/python/359.md

[Latest](https://community.openhab.org/latest.md) · [Categories](https://community.openhab.org/categories.md) · [Tags](https://community.openhab.org/tags.md)

---

## [Idea to use python for addons: allows to wrap home assistant addons](https://community.openhab.org/t/idea-to-use-python-for-addons-allows-to-wrap-home-assistant-addons/170614)

<div class="topic-metadata">

**Author:** [@Juno](https://community.openhab.org/u/Juno)\
**Replies:** 4\
**Last updated:** [October 8, 2026, 2:13am UTC](https://community.openhab.org/t/idea-to-use-python-for-addons-allows-to-wrap-home-assistant-addons/170614 "2026-10-08T02:13:04Z")

</div>

Came across the Dutch garbage calendar home assistant addon (GitHub - xirixiz/homeassistant-afvalwijzer: Provides sensors for some Dutch waste collectors · GitHub). And was wondering how to use this using Openhab without…

---

## [Python3 Binding (Discussion)](https://community.openhab.org/t/python3-binding-discussion/161914)

<div class="topic-metadata">

**Author:** [@holger\_hees](https://community.openhab.org/u/holger_hees)\
**Replies:** 263\
**Last updated:** [September 15, 2026, 8:38am UTC](https://community.openhab.org/t/python3-binding-discussion/161914 "2026-09-15T08:38:18Z")

</div>

The pythonscripting binding for openHAB is the successor of the jython binding. It is testet in openhab 5.1.x, 5.0.x and 4.3.x Details can be found in marketplace for openhab 5.0.x and openhab 4.3.x openhab 5.1.x alre…

---

## [Scripting best practice](https://community.openhab.org/t/scripting-best-practice/169823)

<div class="topic-metadata">

**Author:** [@v61](https://community.openhab.org/u/v61)\
**Replies:** 5\
**Last updated:** [July 18, 2026, 10:46am UTC](https://community.openhab.org/t/scripting-best-practice/169823 "2026-07-18T10:46:02Z")

</div>

Hi, I currently use UI based scripting (python) I have seen many posts about file based scripts. What is the community’s thoughts about UI versus file based? What is better in the long run? I think about back up, so…

---

## [\[Project\] Volvo 2025+ (Google AAOS) MQTT Bridge - Docker ready](https://community.openhab.org/t/project-volvo-2025-google-aaos-mqtt-bridge-docker-ready/169081)

<div class="topic-metadata">

**Author:** [@cmachtel](https://community.openhab.org/u/cmachtel)\
**Replies:** 0\
**Last updated:** [April 16, 2026, 6:58pm UTC](https://community.openhab.org/t/project-volvo-2025-google-aaos-mqtt-bridge-docker-ready/169081 "2026-04-16T18:58:41Z")

</div>

Hi everyone, As a owner of a Volvo XC60 (2025 model) with Google built-in (AAOS), I struggled to integrate it with openHAB since older APIs are not fully compatible with these newer models. I’ve developed a Python-base…

---

## [Simple Python script that reads Google Calendar and updates OH items with event information](https://community.openhab.org/t/simple-python-script-that-reads-google-calendar-and-updates-oh-items-with-event-information/21586)

<div class="topic-metadata">

**Author:** [@davorf](https://community.openhab.org/u/davorf)\
**Replies:** 150\
**Last updated:** [March 7, 2026, 8:22am UTC](https://community.openhab.org/t/simple-python-script-that-reads-google-calendar-and-updates-oh-items-with-event-information/21586 "2026-03-07T08:22:45Z")

</div>

Hello! Since I couldn’t make CalDAV Personal binding to work with Google Calendar, and, according to this post, there is a problem with CalDAV Personal binding in OH2, I’ve made a simple Python script that authenticates…

---

## [Guidance needed: Build docker container out of python script that connects bathroom body (fat) scales](https://community.openhab.org/t/guidance-needed-build-docker-container-out-of-python-script-that-connects-bathroom-body-fat-scales/162216)

<div class="topic-metadata">

**Author:** [@Cplant](https://community.openhab.org/u/Cplant)\
**Replies:** 4\
**Last updated:** [January 28, 2026, 10:13pm UTC](https://community.openhab.org/t/guidance-needed-build-docker-container-out-of-python-script-that-connects-bathroom-body-fat-scales/162216 "2026-01-28T22:13:22Z")

</div>

Some time back, I found a nice little python script that listens for bluetooth information from a number of Medisana body (fat) bathroom scale and passes the information (weight, fat, bone mass, etc) over to various plug…

---

## [Python logging question](https://community.openhab.org/t/python-logging-question/167922)

<div class="topic-metadata">

**Author:** [@v61](https://community.openhab.org/u/v61)\
**Replies:** 4\
**Last updated:** [January 14, 2026, 1:43pm UTC](https://community.openhab.org/t/python-logging-question/167922 "2026-01-14T13:43:25Z")

</div>

Hi, When I run this python test in OH 5.1.1: from openhab import logger logger.info("logger is used") print("print is used") the result is this: 2026-01-09 15:23:00.013 \[INFO \] \[g.openhab.automation.pythonscripting…

---

## [MoeBot MQTT Bridge: Integrate your Robot Mower via MQTT](https://community.openhab.org/t/moebot-mqtt-bridge-integrate-your-robot-mower-via-mqtt/167854)

<div class="topic-metadata">

**Author:** [@deswong](https://community.openhab.org/u/deswong)\
**Replies:** 0\
**Last updated:** [January 7, 2026, 3:48am UTC](https://community.openhab.org/t/moebot-mqtt-bridge-integrate-your-robot-mower-via-mqtt/167854 "2026-01-07T03:48:00Z")

</div>

Hi everyone, I’m excited to share a project I’ve been working on for the MoeBot robotic lawn mower: deswong/moebot. I primarily created this for my own use. While the MoeBot comes with its own app, I found the automati…

---

## [Nice (?) rule in Python for updating the HomeKit characteristic “Outlet.InUseStatus”](https://community.openhab.org/t/nice-rule-in-python-for-updating-the-homekit-characteristic-outlet-inusestatus/167584)

<div class="topic-metadata">

**Author:** [@wurkel](https://community.openhab.org/u/wurkel)\
**Replies:** 1\
**Last updated:** [December 19, 2025, 2:29pm UTC](https://community.openhab.org/t/nice-rule-in-python-for-updating-the-homekit-characteristic-outlet-inusestatus/167584 "2025-12-19T14:29:06Z")

</div>

You may be interested in this post regarding the use of Python for rules. It is not associated with a question. I have several switchable sockets that offer the option of measuring current and power. I connect these t…

---

## [Python inline condition script](https://community.openhab.org/t/python-inline-condition-script/167455)

<div class="topic-metadata">

**Author:** [@habnewbie](https://community.openhab.org/u/habnewbie)\
**Replies:** 3\
**Last updated:** [December 7, 2025, 7:26pm UTC](https://community.openhab.org/t/python-inline-condition-script/167455 "2025-12-07T19:26:43Z")

</div>

Hi, I want to use a small Python script as rule condition. Unfortunately it’s not clear for me how I can control that it evaluates to true or not. Can I just return an exit code using the exit() function? Thank you.

---

## [Non Native openHAB bridges (new binding: SMA inverter via bluetooth )](https://community.openhab.org/t/non-native-openhab-bridges-new-binding-sma-inverter-via-bluetooth/167051)

<div class="topic-metadata">

**Author:** [@LeeC77](https://community.openhab.org/u/LeeC77)\
**Replies:** 13\
**Last updated:** [November 10, 2025, 3:20pm UTC](https://community.openhab.org/t/non-native-openhab-bridges-new-binding-sma-inverter-via-bluetooth/167051 "2025-11-10T15:20:53Z")

</div>

8th Nov update: If anybody want to to test this, the .jar is on GitHub. Also see: README for the binding README for the CLI utility Hi I’m developing a binding to fetch data from an SMA Solar inverter over Bluetoot…

---

## [Send notification from Python automation](https://community.openhab.org/t/send-notification-from-python-automation/166931)

<div class="topic-metadata">

**Author:** [@banzaay](https://community.openhab.org/u/banzaay)\
**Replies:** 8\
**Last updated:** [October 28, 2025, 4:03pm UTC](https://community.openhab.org/t/send-notification-from-python-automation/166931 "2025-10-28T16:03:57Z")

</div>

Platform information: Hardware: Intel core i3 OS: linux debian Java Runtime Environment: 21 openHAB version: Hello, I’m writing a rule in python that send a notification. In documentation I can’t find detailed info…

---

## [Persistence and python in openHAB5](https://community.openhab.org/t/persistence-and-python-in-openhab5/165287)

<div class="topic-metadata">

**Author:** [@AlexW](https://community.openhab.org/u/AlexW)\
**Replies:** 3\
**Last updated:** [August 4, 2025, 1:52pm UTC](https://community.openhab.org/t/persistence-and-python-in-openhab5/165287 "2025-08-04T13:52:27Z")

</div>

Hello everyone, i try to get used to the new python script binding in openHAB5, but having some issues with the persistence class. Goal is to cleanup a sql database which is connected via JDBC (set as default) via the …

---

## [HABApp - Easy automation with openHAB](https://community.openhab.org/t/habapp-easy-automation-with-openhab/59669)

<div class="topic-metadata">

**Author:** [@Spaceman\_Spiff](https://community.openhab.org/u/Spaceman_Spiff)\
**Replies:** 814\
**Last updated:** [April 28, 2025, 6:40am UTC](https://community.openhab.org/t/habapp-easy-automation-with-openhab/59669 "2025-04-28T06:40:26Z")

</div>

Hello, since I started with it has always been puzzling to me how hard it is to write automation rules in openHAB. Things got a little bit better with the jsr223 integration and I think @steve1 contributed some great i…

---

## [Python lang. question, reference to value/variable?](https://community.openhab.org/t/python-lang-question-reference-to-value-variable/162924)

<div class="topic-metadata">

**Author:** [@perIpI](https://community.openhab.org/u/perIpI)\
**Replies:** 3\
**Last updated:** [March 6, 2025, 9:33am UTC](https://community.openhab.org/t/python-lang-question-reference-to-value-variable/162924 "2025-03-06T09:33:48Z")

</div>

Trying to access an object variable by reference but its not working the way I want (the list value will not follow the value of the ping\_stat.min/max/mean). Is it possible to achieve what I want?

---

## [HABApp 25.02.x scheduler - how do I show the execution times?](https://community.openhab.org/t/habapp-25-02-x-scheduler-how-do-i-show-the-execution-times/162750)

<div class="topic-metadata">

**Author:** [@hakan](https://community.openhab.org/u/hakan)\
**Replies:** 2\
**Last updated:** [February 26, 2025, 6:45pm UTC](https://community.openhab.org/t/habapp-25-02-x-scheduler-how-do-i-show-the-execution-times/162750 "2025-02-26T18:45:11Z")

</div>

I’m operating my window blinds with (among other triggers) with the sunset and sunrise triggers: self.run.at(self.run.trigger.sunset(), self.run\_sunset) self.run.at(self.run.trigger.sunrise(), self.run\_s…

---

## [Hot Tub Gecko inTouch2](https://community.openhab.org/t/hot-tub-gecko-intouch2/58451)

<div class="topic-metadata">

**Author:** [@Michael\_K](https://community.openhab.org/u/Michael_K)\
**Replies:** 56\
**Last updated:** [January 2, 2025, 6:06pm UTC](https://community.openhab.org/t/hot-tub-gecko-intouch2/58451 "2025-01-02T18:06:59Z")

</div>

Hello, can somebody help me to connect to my hot tub? There are two big companys out there: balboa and gecko. For the balboa someone already made a solution. gecko controller and android app and here Gecko Intouch Fou…

---

## [HabAPP fail to use async\_http.get\_client\_session()](https://community.openhab.org/t/habapp-fail-to-use-async-http-get-client-session/157213)

<div class="topic-metadata">

**Author:** [@rzylius](https://community.openhab.org/u/rzylius)\
**Replies:** 10\
**Last updated:** [July 17, 2024, 11:01am UTC](https://community.openhab.org/t/habapp-fail-to-use-async-http-get-client-session/157213 "2024-07-17T11:01:38Z")

</div>

I have all my complex rules working on HabAPP. I need to implement session handling in order to send http/json commands to IMEON inverter, but I am struggling to understand how this works. I am extending the example fr…

---

## [My HABApp Virtual Light Sensor](https://community.openhab.org/t/my-habapp-virtual-light-sensor/156163)

<div class="topic-metadata">

**Author:** [@RRoe](https://community.openhab.org/u/RRoe)\
**Replies:** 2\
**Last updated:** [May 29, 2024, 1:06pm UTC](https://community.openhab.org/t/my-habapp-virtual-light-sensor/156163 "2024-05-29T13:06:00Z")

</div>

I know there is an OpenHAB rule template for this, but I prefer to use HABApp Python rules whenever I can. Initially, I created a script inspired by the rule template that relied on the Astro Channel’s total radiation. H…

---

## [How can I add BME280 Sensor in an Openhab Docker](https://community.openhab.org/t/how-can-i-add-bme280-sensor-in-an-openhab-docker/154674)

<div class="topic-metadata">

**Author:** [@Dyxen07](https://community.openhab.org/u/Dyxen07)\
**Replies:** 5\
**Last updated:** [March 24, 2024, 1:32am UTC](https://community.openhab.org/t/how-can-i-add-bme280-sensor-in-an-openhab-docker/154674 "2024-03-24T01:32:33Z")

</div>

Platform information: Hardware: arm64/8GB RAM/128GB storage (Raspberry Pi5 8GB Ram) OS: Raspberry PiOS 64-Bit (Debian 12/Bookworm) → Gnome 43.9 OH running in docker-container openHAB version: 4.1.1 I am trying to fin…

---

## [Transitions library with timers in python](https://community.openhab.org/t/transitions-library-with-timers-in-python/103375)

<div class="topic-metadata">

**Author:** [@mladams922](https://community.openhab.org/u/mladams922)\
**Replies:** 7\
**Last updated:** [March 4, 2024, 3:07pm UTC](https://community.openhab.org/t/transitions-library-with-timers-in-python/103375 "2024-03-04T15:07:59Z")

</div>

I’m currently using the latest stable version of OpenHAB and I’m running JSR223 python scripting for my rules. I started using the transitions library to develop some state machine driven rules and for the most part it’s…

---

## [OH3 UI Python rules - how to obtain the Event object/argument](https://community.openhab.org/t/oh3-ui-python-rules-how-to-obtain-the-event-object-argument/147017)

<div class="topic-metadata">

**Author:** [@westward](https://community.openhab.org/u/westward)\
**Replies:** 3\
**Last updated:** [November 6, 2023, 8:26am UTC](https://community.openhab.org/t/oh3-ui-python-rules-how-to-obtain-the-event-object-argument/147017 "2023-11-06T08:26:04Z")

</div>

Hi! I’m struggling to create even a very simple Python rule using the OpenHAB3 Rules UI. I have multiple JavaScript rules triggered by various events and all of them works fine. Now I need far more complex logic, so I …

---

## [DateTime Item via Python](https://community.openhab.org/t/datetime-item-via-python/150066)

<div class="topic-metadata">

**Author:** [@kl8ter](https://community.openhab.org/u/kl8ter)\
**Replies:** 8\
**Last updated:** [October 10, 2023, 7:50pm UTC](https://community.openhab.org/t/datetime-item-via-python/150066 "2023-10-10T19:50:14Z")

</div>

Hello all, how can I change/write the value of a DateTime item via Python? Here is my script: DateTime Flower\_1\_TIME "FC2 LastUpdate" \<time\> (g1) from openhab import OpenHAB…

---

## [HABApp creates increasing load on OH4.0.1](https://community.openhab.org/t/habapp-creates-increasing-load-on-oh4-0-1/148420)

<div class="topic-metadata">

**Author:** [@lukics](https://community.openhab.org/u/lukics)\
**Replies:** 1\
**Last updated:** [August 12, 2023, 5:20pm UTC](https://community.openhab.org/t/habapp-creates-increasing-load-on-oh4-0-1/148420 "2023-08-12T17:20:43Z")

</div>

I have installed Cadvisor for monitoring the containers hosting my home automation stack. Currently, I am evaluating porting my rules from JSR223. What I saw this morning right now is that the OH processor load shows a…

---

## [Any way to access configuration parameters for HABApp from within a HABApp script](https://community.openhab.org/t/any-way-to-access-configuration-parameters-for-habapp-from-within-a-habapp-script/148487)

<div class="topic-metadata">

**Author:** [@RRoe](https://community.openhab.org/u/RRoe)\
**Replies:** 1\
**Last updated:** [August 9, 2023, 9:02am UTC](https://community.openhab.org/t/any-way-to-access-configuration-parameters-for-habapp-from-within-a-habapp-script/148487 "2023-08-09T09:02:15Z")

</div>

Is there any way to access configuration parameters for HABApp from within a HABApp python script? I have a HABApp script that needs the location data already defined in the configuration parameters for HABApp. I realiz…

---

## [HABApp simple test getting Item fails](https://community.openhab.org/t/habapp-simple-test-getting-item-fails/148186)

<div class="topic-metadata">

**Author:** [@lukics](https://community.openhab.org/u/lukics)\
**Replies:** 8\
**Last updated:** [July 31, 2023, 8:02am UTC](https://community.openhab.org/t/habapp-simple-test-getting-item-fails/148186 "2023-07-31T08:02:36Z")

</div>

I tried this simple test and got an assertion error, the item exists on openhab. I have at the moment a read-only connection to openhab. Switch ivetaAtHome "Iveta is at Home" (gAnyAtHome) Any idea what I am doing wrong…

---

## [HABApp migration from JSR223-Jython](https://community.openhab.org/t/habapp-migration-from-jsr223-jython/148114)

<div class="topic-metadata">

**Author:** [@lukics](https://community.openhab.org/u/lukics)\
**Replies:** 8\
**Last updated:** [July 29, 2023, 1:47pm UTC](https://community.openhab.org/t/habapp-migration-from-jsr223-jython/148114 "2023-07-29T13:47:38Z")

</div>

I am in the middle of an evaluation for the migration of my Jython rules to the HABApp. In my rules, I exclusively use the following sample setup: triggers = \[\] triggers.append(ChannelEventTrigger("deconz:switch:00212E…

---

## [Pylance annoyancess (using HABApp)](https://community.openhab.org/t/pylance-annoyancess-using-habapp/146312)

<div class="topic-metadata">

**Author:** [@RRoe](https://community.openhab.org/u/RRoe)\
**Replies:** 3\
**Last updated:** [April 25, 2023, 9:08am UTC](https://community.openhab.org/t/pylance-annoyancess-using-habapp/146312 "2023-04-25T09:08:50Z")

</div>

I’m using Pylance in Visual Studio Code for my HABApp scripts and there are some annoying code hints that I haven’t figured out yet how to get rid of. Module is not callable: I have some more examples but I want to…

---

## [OH3: exec binding with python script in virtenv not executing](https://community.openhab.org/t/oh3-exec-binding-with-python-script-in-virtenv-not-executing/145390)

<div class="topic-metadata">

**Author:** [@Max\_G](https://community.openhab.org/u/Max_G)\
**Replies:** 13\
**Last updated:** [March 23, 2023, 5:06am UTC](https://community.openhab.org/t/oh3-exec-binding-with-python-script-in-virtenv-not-executing/145390 "2023-03-23T05:06:57Z")

</div>

openHABian 3.3.0 on rPi4 with 4GB \[Post updated\] I thought I give the exec binding a go, and used the full example in the documentation The example seems to make sense. I have whitelisted the command. # For securit…

---

## [Using dominant color of Plex poster (currently playing item) to change color of RGB bulb](https://community.openhab.org/t/using-dominant-color-of-plex-poster-currently-playing-item-to-change-color-of-rgb-bulb/144363)

<div class="topic-metadata">

**Author:** [@davorf](https://community.openhab.org/u/davorf)\
**Replies:** 1\
**Last updated:** [February 13, 2023, 1:54pm UTC](https://community.openhab.org/t/using-dominant-color-of-plex-poster-currently-playing-item-to-change-color-of-rgb-bulb/144363 "2023-02-13T13:54:43Z")

</div>

Hello! Since I’ve been asked how to do this in another topic, here’s a short explanation with necessary Python script attached (it is attached as .txt file, since .py files can’t be attached). DominantImageColor.txt (1…

[Next page](https://community.openhab.org/tag/python/359.md?match_all_tags=true&page=1&tags%5B%5D=python)
