# \#string

**URL:** https://community.openhab.org/tag/string/322.md

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

---

## [String.contains(java.lang.CharSequence) in a rule](https://community.openhab.org/t/string-contains-java-lang-charsequence-in-a-rule/156917)

<div class="topic-metadata">

**Author:** [@Ahiel](https://community.openhab.org/u/Ahiel)\
**Replies:** 1\
**Last updated:** [June 28, 2024, 4:20pm UTC](https://community.openhab.org/t/string-contains-java-lang-charsequence-in-a-rule/156917 "2024-06-28T16:20:14Z")

</div>

Hello, I’m trying to use contains in my rule but getting this error: \[ERROR\] \[internal.handler.ScriptActionHandler\] - Script execution of rule with UID 'sonos-3' failed: An error occurred during the script execution: …

---

## [YAML string compare](https://community.openhab.org/t/yaml-string-compare/153860)

<div class="topic-metadata">

**Author:** [@kdb](https://community.openhab.org/u/kdb)\
**Replies:** 19\
**Last updated:** [February 19, 2024, 7:20am UTC](https://community.openhab.org/t/yaml-string-compare/153860 "2024-02-19T07:20:19Z")

</div>

Hey, props.item contains weather information. Independent of the value icon: ‘=(props.item == “Bedeckt”) ? “f7:cloud” : “f7:snow”’ results in “f7:snow” ( I checked that props.item is “Bedeckt” ) Where can I find a …

---

## [\[Rules DSL\] Get item from string name!](https://community.openhab.org/t/rules-dsl-get-item-from-string-name/48279)

<div class="topic-metadata">

**Author:** [@5iver](https://community.openhab.org/u/5iver)\
**Replies:** 44\
**Last updated:** [November 24, 2023, 2:16pm UTC](https://community.openhab.org/t/rules-dsl-get-item-from-string-name/48279 "2023-11-24T14:16:17Z")

</div>

For a couple years now, I’ve been wanting/looking for a way to construct an item from its name as a string. There are other ways to do this, and the most popular requires the item to be in a group, which can have it’s ch…

---

## [Build String and output from Loop](https://community.openhab.org/t/build-string-and-output-from-loop/147308)

<div class="topic-metadata">

**Author:** [@DrScr3w](https://community.openhab.org/u/DrScr3w)\
**Replies:** 5\
**Last updated:** [August 7, 2023, 2:47pm UTC](https://community.openhab.org/t/build-string-and-output-from-loop/147308 "2023-08-07T14:47:23Z")

</div>

Platform information: openHAB version: 4.0.0.M3 Hey, can anyone help me please to understand how i can return a output of a assembled string? For each group member whose status is not “Keine”, it should expand the …

---

## [Split String only on last seperator](https://community.openhab.org/t/split-string-only-on-last-seperator/146000)

<div class="topic-metadata">

**Author:** [@helipus](https://community.openhab.org/u/helipus)\
**Replies:** 4\
**Last updated:** [April 12, 2023, 7:14pm UTC](https://community.openhab.org/t/split-string-only-on-last-seperator/146000 "2023-04-12T19:14:06Z")

</div>

Hi, I have items with different amount of Seperators “\_” in the Itemname. Example: Fenster\_Badezimmer\_Nord\_Links\_Zustand Fenster\_Badezimmer\_Nord\_Links\_LetztesUpdate Fenster\_Badezimmer\_Nord\_Rechts\_Zustand Fenster\_Bade…

---

## [OH4.0 Blockly compare stored value to string](https://community.openhab.org/t/oh4-0-blockly-compare-stored-value-to-string/146014)

<div class="topic-metadata">

**Author:** [@Mark\_VG](https://community.openhab.org/u/Mark_VG)\
**Replies:** 3\
**Last updated:** [April 12, 2023, 6:05pm UTC](https://community.openhab.org/t/oh4-0-blockly-compare-stored-value-to-string/146014 "2023-04-12T18:05:47Z")

</div>

Hi All. As part of my move to Blockly I have set up the following rule: which generates: cache.private.put('partition3NewState', event.itemState); cache.private.put('partition3PreviousState', event.oldItemState); c…

---

## [Network Binding latency output displays as datetime string - expecting milliseconds](https://community.openhab.org/t/network-binding-latency-output-displays-as-datetime-string-expecting-milliseconds/130170)

<div class="topic-metadata">

**Author:** [@Samo](https://community.openhab.org/u/Samo)\
**Replies:** 4\
**Last updated:** [December 17, 2021, 10:40pm UTC](https://community.openhab.org/t/network-binding-latency-output-displays-as-datetime-string-expecting-milliseconds/130170 "2021-12-17T22:40:20Z")

</div>

Hey folks, I’m porting my Ubuntu Linux 5.4.-90-generic to rpi 4 latest v3 openhabian 5.10.63-v71 (from uname -a) stable release. I have a few Zwave devices configured but I’m no programmer so I started porting with a si…

---

## [JDBC Persist](https://community.openhab.org/t/jdbc-persist/128659)

<div class="topic-metadata">

**Author:** [@paulfaure](https://community.openhab.org/u/paulfaure)\
**Replies:** 3\
**Last updated:** [November 14, 2021, 1:28am UTC](https://community.openhab.org/t/jdbc-persist/128659 "2021-11-14T01:28:42Z")

</div>

I just discovered that if you enable the JDBC persistence, but are missing the jdbc.persist file (in my case under this folder: /etc/openhab/persistence/), OpenHab opts to persist EVERY item in the system. I discovered t…

---

## [iOS App won't display String labels delimited with \\n](https://community.openhab.org/t/ios-app-wont-display-string-labels-delimited-with-n/119876)

<div class="topic-metadata">

**Author:** [@Chentadot](https://community.openhab.org/u/Chentadot)\
**Replies:** 4\
**Last updated:** [March 31, 2021, 4:14am UTC](https://community.openhab.org/t/ios-app-wont-display-string-labels-delimited-with-n/119876 "2021-03-31T04:14:34Z")

</div>

Hi all, since I don’t know where or how to file a bug report I decided to at least post it here. After my post: I think it’s safe to say I found what is appear to be a bug in the iOS OH App (version 2.4.20). When a …

---

## [MQTT Channel string not working](https://community.openhab.org/t/mqtt-channel-string-not-working/114876)

<div class="topic-metadata">

**Author:** [@micware](https://community.openhab.org/u/micware)\
**Replies:** 3\
**Last updated:** [January 21, 2021, 5:08pm UTC](https://community.openhab.org/t/mqtt-channel-string-not-working/114876 "2021-01-21T17:08:33Z")

</div>

Raspberry PI Openhab 3 MQTT binding 3 My channel “mqtt:topic:b8be661fe1:slaapkamer\_wireless\_wall\_switch:action” can produce 3 strings “single\_right”, “single\_left” and “single\_both” I can see this in my event.log 2…

---

## [String to Item and than change the label of the Item](https://community.openhab.org/t/string-to-item-and-than-change-the-label-of-the-item/103952)

<div class="topic-metadata">

**Author:** [@kl8ter](https://community.openhab.org/u/kl8ter)\
**Replies:** 7\
**Last updated:** [August 21, 2020, 8:49pm UTC](https://community.openhab.org/t/string-to-item-and-than-change-the-label-of-the-item/103952 "2020-08-21T20:49:05Z")

</div>

Hello, look at my rules: val bmitem = "KNX\_BM\_"+splititem+"\_ist" val mybmitem = gBMTermostate.members.findFirst\[ i | i.name == bmitem \] sendLogNotification("my BM Item:\\n" + mybmitem,"radiator","Debug") So far everyth…

---

## [Convert String item to Number item in OH2](https://community.openhab.org/t/convert-string-item-to-number-item-in-oh2/25424)

<div class="topic-metadata">

**Author:** [@SpaceGlider](https://community.openhab.org/u/SpaceGlider)\
**Replies:** 5\
**Last updated:** [January 24, 2020, 9:33am UTC](https://community.openhab.org/t/convert-string-item-to-number-item-in-oh2/25424 "2020-01-24T09:33:00Z")

</div>

Hello all, I have had a bit of trouble converting an output of the EXEC 2.0 (OH2) binding (which is always a “String” type) into a “Number” type, with many solutions being only valid for OH1.X it seems. So for anyone wh…

---

## [No Emojis in Telegram after splitting unicode string](https://community.openhab.org/t/no-emojis-in-telegram-after-splitting-unicode-string/85026)

<div class="topic-metadata">

**Author:** [@WOPR](https://community.openhab.org/u/WOPR)\
**Replies:** 5\
**Last updated:** [November 22, 2019, 4:37pm UTC](https://community.openhab.org/t/no-emojis-in-telegram-after-splitting-unicode-string/85026 "2019-11-22T16:37:25Z")

</div>

Hey guys, I am having trouble with Emojis in Telegram after using .split(). My Rule uses an item that contains user/group and message split by ;: rule “Telegram-Gateway” when Item Telegram\_Gateway received update …

---

## [String Group?](https://community.openhab.org/t/string-group/73240)

<div class="topic-metadata">

**Author:** [@dastrix80](https://community.openhab.org/u/dastrix80)\
**Replies:** 7\
**Last updated:** [April 27, 2019, 6:40am UTC](https://community.openhab.org/t/string-group/73240 "2019-04-27T06:40:15Z")

</div>

Hi All, I couldnt find any examples or doco on this. I have disks in a NAS, which have a SNMP state, GOOD, BAD, FAILED. I’ve managed to record these into items. I want to create a group, and have the state of the group…

---

## [\[SOLVED\] How to transform a string item to a switchable one to expose](https://community.openhab.org/t/solved-how-to-transform-a-string-item-to-a-switchable-one-to-expose/58935)

<div class="topic-metadata">

**Author:** [@lagging](https://community.openhab.org/u/lagging)\
**Replies:** 14\
**Last updated:** [December 6, 2018, 10:31pm UTC](https://community.openhab.org/t/solved-how-to-transform-a-string-item-to-a-switchable-one-to-expose/58935 "2018-12-06T22:31:57Z")

</div>

Hello all, as i’m walking deeper into the openhab rabbithole, my current endeavour is integrating my 3 perenz 7110 ceiling fans in openhab. I’m using the broadlink binding currently in beta Broadlink binding for RMx…

---

## [\[SOLVED\] JSONpath doesn't have enough parameters?](https://community.openhab.org/t/solved-jsonpath-doesnt-have-enough-parameters/28745)

<div class="topic-metadata">

**Author:** [@dikkedimi](https://community.openhab.org/u/dikkedimi)\
**Replies:** 5\
**Last updated:** [May 21, 2017, 6:48pm UTC](https://community.openhab.org/t/solved-jsonpath-doesnt-have-enough-parameters/28745 "2017-05-21T18:48:25Z")

</div>

I am having an issue parsing my sensor data from an ESP8266. The documentation is not much help (or i’m looking in the wrong direction). So I’d love to hear your views. I made this config by using \[SOLVED\] MQTT item pars…

---

## [I do not understand "Type mismatch: cannot convert from State to String"](https://community.openhab.org/t/i-do-not-understand-type-mismatch-cannot-convert-from-state-to-string/28699)

<div class="topic-metadata">

**Author:** [@christoph\_wempe](https://community.openhab.org/u/christoph_wempe)\
**Replies:** 2\
**Last updated:** [May 20, 2017, 11:33pm UTC](https://community.openhab.org/t/i-do-not-understand-type-mismatch-cannot-convert-from-state-to-string/28699 "2017-05-20T23:33:22Z")

</div>

I have a rule: rule therm\_manual\_auto when Item Therm\_Manual changed to AUTO then logInfo("Therm\_Manual", "Set Therm\_Mode to " + Therm\_Target.state) sendCommand(Therm\_Mode, Therm\_Target.state) end The last …

---

## [Sending my own text to the KNX binding](https://community.openhab.org/t/sending-my-own-text-to-the-knx-binding/14198)

<div class="topic-metadata">

**Author:** [@s1989](https://community.openhab.org/u/s1989)\
**Replies:** 5\
**Last updated:** [September 19, 2016, 2:24pm UTC](https://community.openhab.org/t/sending-my-own-text-to-the-knx-binding/14198 "2016-09-19T14:24:29Z")

</div>

Hello, I would like to know how it is possible to send to a KNX device my own string of text in openHAB 2. I’ve been searching for it on the forum and in the documentation but I don’t think I have the good keywords as …

---

## [Handling character set for value of Text elements](https://community.openhab.org/t/handling-character-set-for-value-of-text-elements/10446)

<div class="topic-metadata">

**Author:** [@wawa79](https://community.openhab.org/u/wawa79)\
**Replies:** 1\
**Last updated:** [May 14, 2016, 6:37pm UTC](https://community.openhab.org/t/handling-character-set-for-value-of-text-elements/10446 "2016-05-14T18:37:18Z")

</div>

Hello, I am using a Text element in my sitemap to render a String item which holds information of currently playing media in openHAB UI. Information is sent by Eventghost to openHAB using MQTT to send a ‘state’ message…

---

## [HTTP Binding - configuring string items](https://community.openhab.org/t/http-binding-configuring-string-items/2283)

<div class="topic-metadata">

**Author:** [@kevin](https://community.openhab.org/u/kevin)\
**Replies:** 16\
**Last updated:** [March 21, 2016, 5:12pm UTC](https://community.openhab.org/t/http-binding-configuring-string-items/2283 "2016-03-21T17:12:26Z")

</div>

I’m trying to get the HTTP Binding to work using a String as its input instead of a switch item to allow me to have 4 states. The item takes the form of String Test { http=“\>\[state1:POST:http://URL1\] \>\[state2:POST:http:…

---

## [Extract seperate values from a comma seperated string](https://community.openhab.org/t/extract-seperate-values-from-a-comma-seperated-string/7871)

<div class="topic-metadata">

**Author:** [@kevin](https://community.openhab.org/u/kevin)\
**Replies:** 2\
**Last updated:** [February 22, 2016, 8:14pm UTC](https://community.openhab.org/t/extract-seperate-values-from-a-comma-seperated-string/7871 "2016-02-22T20:14:21Z")

</div>

I’m trying to extract 2 values from a string so I can subtract one from the other, and postUpdate the result. The String is taken from incoming JSON and after using “transform” I end up with \[\[1038,1039\]\] I can remove…

---

## [Rules / string value problem](https://community.openhab.org/t/rules-string-value-problem/3031)

<div class="topic-metadata">

**Author:** [@BigCol](https://community.openhab.org/u/BigCol)\
**Replies:** 6\
**Last updated:** [October 7, 2015, 10:12pm UTC](https://community.openhab.org/t/rules-string-value-problem/3031 "2015-10-07T22:12:51Z")

</div>

Hi all, need some rule help please with my 1.6.2 config for this item: String AlarmString " \[%s\]" (Security) I have this rule: rule "test cron" when Time cron “0 28 10 \* \* ?” then if ( AlarmString.state = “unse…
