Java: Remove brackets / leading slashes from String

My Android-app have always presented the DNS-Server(s) with brackets / leading slashes like:

How can we get rid of these unnecessary characters ?

String myIp2Dns1:

String myIp2Dns1 = String.valueOf (LinkProp.getDnsServers()) ;

Log:

Log.d("myDnsInfo - Domain - ", "Domain = " + LinkProp.getDomains());
D/myDnsInfo: dns = [/10.0.2.3]

Solution:
Manipulation of String myIp2Dns1:

myIp2Dns1 = myIp2Dns1.replaceAll("[\\[\\](){}\"^/+\"]","");

This command removes brackets / slashes / backslashes from the String.

The output looks much better now:

Home Assistant 2021.2.3 on Pi4 running Home Assistant OS: Fix Dyson add-on

Home Assistant 
Oveniew 
Innux0B 
Brows« 
ration 
Dashboard 
Addnn SWe 
Snapshots 
q port 
No results found in •Official add-ons.' 
Home Assistant Community Add-ons 
Port a i 
Manage your with
on Home-assistant click on Supervisor / Add-on Store and search for Portainer
Portainer 
1.410 (change!Q9) 
Manage Four Docket with ease, 
details 
portainer.io 
oeoo 
Stut 
Make the addon start dwinga system boot 
This win starl the if it cashes 
Auto update the addon when there is a new versicm avadable 
ion mod e 
glcrcks elevated svslem access from the add-on 
Hostna me 
Addon CPU usage 
Add•on RAM usage 
OPEN ul
disable Protection-Mode , enable Show in Sidebar. Start/Restart Portainer
Home Assistant 
Story 
Terminal 
Configwation 
iport 
alner.10 
PRI MARY 
App tes 
Conta i nerS 
Endpo 
Reg 
Settings 
non-a m s 
Dinble privileged mode fM 
Enable volume management for non-administrators O 
Enable host mangement 
Edge Compute 
Edge agent poll 
frequency O 
edge featuws 
Hidden containers 
hid. with u'. to sp„ify 
Value 
h sta nt 
e.g. bar
Click on Portainer in the Sidebar, click Settings . Remove core and homeassistant from the hidden Containers
Home Assistant 
Logbook 
History 
InnuxDB 
Terminal 
Media 
portainer.io 
pm MARY 
App plates 
Registries 
Container list 
Containers 
q search... 
Name 
iten(sl ted 
state 
Quick actions 
Stac 
mage 
"i sta 64• 2021.23 
2021-02-21 '287.47 
portainør support 
Columns Settings 
pub hed ports 
10
highlight the Container and click on exec
iii
click on Connect

Paste the following lines:

cd /usr/local/lib/python3.8/site-packages/libpurecool/

cd /usr/local/lib/python3.8/site-packages/libpurecool/
rm dyson.py
curl -O https://raw.githubusercontent.com/bfayers/libpurecool/auth_customdeps/libpurecool/dyson.py
Home Assistant 
Ovewiew 
Map 
stMy 
Teminal 
Server Controls 
Restart and Stop the ASS i Stant server 
Sew« 
Configuration validation 
Validate configuration if recently made some to your and 
make Sure that it is all valid 
Server management 
your A SSiStant server. from Home Assistant 
Rtsrz 
STOP 
YAML configuration reloading 
Sm parts of Assistant Qn a Hitting will 
unload their current YAML load new 
RELOAD LOCATION 
RELOAD AUTOMAr.ONS 
RELOAD GROUPS. GROUP ENTITIES. ANO GROUP NOTIFY SERVICES 
RELOAD INPUT BOOLEANS 
RELOAD 
RELOAO INPUT NUMBERS
Restart Home-Assistant

Now the Dyson-Device is connected:

-Done!

daily compression of InfluxDB

InfluxDB is an open source time series database built by InfluxData and used in e.g. Openhab for data persistance.
For small computers like raspi’s it is a best practice to compress the database regurlarly.

Why not using cron ?

Well, it works.. the only (security)-drawback is to grant /bin/bash to the influx-user:

cat /etc/cron.daily/00influx:

#!/bin/bash
#execute
/home/pi/1_influxrepair.sh


cat /home/pi/1_influxrepair.sh:

#!/bin/bash
service influxdb stop
echo "before su"
su influxdb -c /home/pi/1_subscript.sh
echo "after su"
whoami
service influxdb start

cat /home/pi/1_subscript.sh:

#!/bin/bash
echo "now in sub shell"
whoami
cd /var/lib/influxdb
influx_inspect buildtsi -compact-series-file -datadir ./data -waldir ./wal
exit
echo "exiting sub shell"

cat /etc/passwd|grep infl:

modify influxdb:/bin/bash

done!

Blink-Shell for IOS: change prompt

if you want to change the prompt go to:
-Sessions
–MCPSession.m
edit the Line:
 [_device prompt:@”blink> ” secure:NO shell:YES];

Here you can change the prompt. Rebuild and you are done.