Check if an installation went well or where to find the corresponding files, example where are samba’s configuration files):
whereis samba
Check if an installation went well or where to find the corresponding files, example where are samba’s configuration files):
whereis samba
backup [--full] [filename] -- Stores the current configuration of openHAB.
clean-cache -- Cleans the openHAB temporary folders.
console -- Opens the openHAB console.
info -- Displays distribution information.
reset-ownership -- Gives openHAB control of its own directories.
restore [--textconfig] [--uiconfig] filename
-- Restores openHAB configuration from a backup.
showlogs -- Displays the log messages of openHAB.
start [--debug] -- Starts openHAB in the terminal.
status -- Checks to see if openHAB is running.
stop -- Stops any running instance of openHAB.
I am using openHAB as my main home automation server. I want to be able to switch on/off Philips Hue lights with the Gira KNX TS3 sensors installed in my rooms.
Basically, you need to create a group address, map it to the TS switch channel, create a virtual KNX device in openHAB and create two rules to link both objects (one rule for switching ON and one for switching OFF).
In the ETS software, create a group address (e.g. 1/9/9) and map it to the TS button’s channel that should allow switching the Hue light ON and OFF.
In openHAB, create a KNX device thing called Virtual KNX switch. Add a channel with type Switch Control and configure it to address 1/9/9. Map an item of type Contact to this channel (let’s name it KitchenVirtualSwitch).
Assuming that your Hue light is called HueLight, create a rule to switch the light ON:
configuration: {}
triggers:
- id: "1"
configuration:
command: ON
itemName: KitchenVirtualSwitch
type: core.ItemCommandTrigger
conditions: []
actions:
- inputs: {}
id: "2"
configuration:
type: application/vnd.openhab.dsl.rule
script: "
\ HueLight.sendCommand(ON)
\ logInfo( \"openHAB.Rules\",\"KitchenVirtualSwitch TS => Hue ON\"
)
\ "
type: script.ScriptAction
The logInfo entry is optional, but very helpful when debugging. Let’s create a second rule for switching the light OFF:
configuration: {}
triggers:
- id: "1"
configuration:
command: OFF
itemName: KitchenVirtualSwitch
type: core.ItemCommandTrigger
conditions: []
actions:
- inputs: {}
id: "2"
configuration:
type: application/vnd.openhab.dsl.rule
script: "
\ HueLight.sendCommand(OFF)
\ logInfo( \"openHAB.Rules\",\"KitchenVirtualSwitch TS => Hue OFF\"
)
\ "
type: script.ScriptAction
Here is a working NGINX proxy configuration for Home Assistant:
server {
server_name HOST.DOMAIN.NAME;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
location / {
satisfy any;
allow 10.X.X.0/24;
allow 10.X.X.0/24;
deny all;
auth_basic "Restricted access";
auth_basic_user_file /etc/passwords/passwords;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Real-IP $remote_addr;
proxy_headers_hash_max_size 512;
proxy_headers_hash_bucket_size 128;
proxy_pass http://INTERNAL_HOME_ASSISTANT_IP:8123;
include proxy_params;
}
listen 443 ssl;
ssl_certificate /etc/letsencrypt/live/HOST.DOMAIN.NAME/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/HOST.DOMAIN.NAME/privkey.pem; # managed by Certbot
}
server {
if ($host = HOST.DOMAIN.NAME) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
server_name HOST.DOMAIN.NAME;
}
If you try to delete a thing via the GUI in openHAB 4 and it does not get removed (status remains stuck on: removing), you can remove it using the CLI.
For this, login to the karaf console:
openhab-cli console
Username: openhab ; password: habopen
openhab:things remove thing:full:name
Show all disks with their identifiers and partitions:
diskutil list
List all mounted disks:
df
List all locally mounted disks:
df -Hl
List all USB devices:
system_profiler SPUSBDataType
If you want to install cockpit on your server, follow these steps:
To install cockpit on Ubuntu, run the following command:
sudo apt install cockpit
Additionally, install the following package for more detailed metrics:
sudo apt install cockpit-pcp
Now there is a bug in Ubuntu, prohibiting cockpit to update the system through the webinterface (packagekit cannot refresh cache whilst offline). This seems to have to do with differences in netplan and network manager. To overcome this, you have to create a a placeholder file and a network interface:
nano /etc/NetworkManager/conf.d/10-globally-managed-devices.conf
Add the following two lines to that file. Save the file ant quit the nano editor.
[keyfile]
unmanaged-devices=none
Optionally: If you run Ubuntu on an ARM system, you may need to install the following packages:
sudo apt install linux-modules-extra-raspi
Now set up a dummy network interface:
nmcli con add type dummy con-name fake ifname fake0 ip4 1.2.3.4/24 gw4 1.2.3.1
Reboot your machine. Now you should be able to update the packages in the web interface.
Cockpit should be starting automatically. If this does not happen, configure it to do so:
systemctl start cockpit
systemctl enable cockpit
Access your cockpit installion under https://my.server.IP.address:9090
Source: https://cockpit-project.org/faq.html
If you happen to see the following error when enabling cockpit:
The unit files have no installation config (WantedBy=, RequiredBy=, Also=, Alias= settings in the [Install] section, and DefaultInstance= for template units). This means they are not meant to be enabled using systemctl.
Than you have to edit the configuration file:
sudo nano /usr/lib/systemd/system/cockpit.service
And add the following lines at the end, save and start the service:
[Install]
WantedBy=multi-user.target
systemctl enable cockpit.service
systemctl start cockpit.service
Most private landline phone users in Luxembourg use a FritzBox to connect their phones (often DECT phones) to the national telephone network, supposed they still have a landline phone in their home. Although that the FritzBox really does an excellent job at this and is very easy to use, I always felt that I wanted to have more control over my VoIP server. The path to go was for me to move over to locally hosted FreePBX server.
So I started installing FreePBX (16) in a virtual machine on my ProxMox server, providing it with decent resources (64 GB Disk, 4 GB RAM, 2 cores) and put it into the isolated Phone VLAN in my network, together with my VoIP phones (and my FritzBox phone server).
In order to get started with a single phone, you need to:
I was experimenting with FreePBX using a second VoIP number and in the same time keeping my other number online through the Fritzbox. This allowed me to do outbound calls on the FreePBX attached phone using the second number, but I was unable to receive inbound calls on that line. When calling inbound from the cellphone, the line appeared ringing, but no phone (extension) received the call. No entries were found in the FreePBX log file neither. So I assume that running the Fritzbox and the FreePBX system in parallel in a home network seems to lead to routing issues. The Fritzbox seemed to be the master receiver, as the other VoIP number still worked fine. This is all hypothetical, but in my case, things didn’t work. Shutting down the Fritzbox, and waiting for a few minutes, allowed the FreePBX system to receive the incoming calls too.
Go to the Connectivity menu, submenu Firewall. I guess you should run the Wizard to accomplish a basic configuration. Anyway, Make sure that the FreePBX main interface (eth0) is defined as Local(Local trusted traffic) under the Interfaces tab.
The networks tab should include all the devices that should be able to contact the FreePBX server:
I needed to define a Port Forwarding rule in my router’s (Unifi Dream Machine Pro) firewall to allow the external SIP server (my uplink) to contact my internal FreePBX server. I specifically allow the external server’s IP to access the IP of my FreePBX on port 5060 on both (UDP, TCP) protocols.
It is also recommended to disable the Conntrack Modules in the router that handle SIP traffic (H.323 and SIP), although it might help if you are in a double-NAT network.
Go to the Connectivity menu, submenu Inbound Routes. Click the button: Add Inbound Route.
Add a route Description, a DID Number (important if you use several incoming phone numbers) and define Set Destination to an Extension or to a Ring Group (if you have defined one).