Tips & Tricks | satheesh.net https://satheesh.net Mon, 09 Dec 2024 10:25:22 +0000 en-US hourly 1 https://satheesh.net/wp-content/uploads/cropped-satheesh-32x32.jpg Tips & Tricks | satheesh.net https://satheesh.net 32 32 How to manually increase Unraid ZFS memory usage (ZFS ARC) https://satheesh.net/2024/12/08/how-to-manually-increase-unraid-zfs-memory-usage-zfs-arc/?utm_source=rss&utm_medium=rss&utm_campaign=how-to-manually-increase-unraid-zfs-memory-usage-zfs-arc https://satheesh.net/2024/12/08/how-to-manually-increase-unraid-zfs-memory-usage-zfs-arc/#respond Sun, 08 Dec 2024 10:02:32 +0000 https://satheesh.net/?p=2772 You can now try Unraid for 30 days – totally FREE! Click here to try or buy license. During system boot, the file /etc/modprobe.d/zfs.conf is auto-generated to limit the ZFS ARC to 1/8 of the installed memory (RAM). This can be overridden if necessary by creating a custom ‘config/modprobe.d/zfs.conf’ file. (More info in the official […]

The post How to manually increase Unraid ZFS memory usage (ZFS ARC) first appeared on satheesh.net.]]>
You can now try Unraid for 30 days – totally FREE! Click here to try or buy license.

During system boot, the file /etc/modprobe.d/zfs.conf is auto-generated to limit the ZFS ARC to 1/8 of the installed memory (RAM). This can be overridden if necessary by creating a custom ‘config/modprobe.d/zfs.conf’ file. (More info in the official docs here.)

Here is a guide to manually increase the ZFS ARC limit to something of your choosing. The given example is with 96GB of installed RAM.
You can either download this premade zfs.conf file – just edit the Byte value and save it. Or use the manual mode below.

  1. Use this byte calculator https://convertermaniacs.com/gigabyte-to-byte/convert-48-gb-to-bytes.html
  2. Set max ARC size half (1/2) of 96GB RAM => 48GB RAM == 48000000000 Bytes
  3. Create a new empty file (Notepad++/BBEdit, etc) with the following string: options zfs zfs_arc_max=48000000000
  4. Save file as zfs.conf and place the file in the following directory on the Unraid USB Key: /config/modprobe.d/
  5. Reboot the server and it should use the new ZFS ARC configuration when booting.

Good luck!

The post How to manually increase Unraid ZFS memory usage (ZFS ARC) first appeared on satheesh.net.]]>
https://satheesh.net/2024/12/08/how-to-manually-increase-unraid-zfs-memory-usage-zfs-arc/feed/ 0
Veeam Backup for Microsoft Office 365 – JetError -501, JET_errLogFileCorrupt, Log file is corrupt https://satheesh.net/2021/05/07/veeam-backup-for-microsoft-office-365-jeterror-501-jet_errlogfilecorrupt-log-file-is-corrupt/?utm_source=rss&utm_medium=rss&utm_campaign=veeam-backup-for-microsoft-office-365-jeterror-501-jet_errlogfilecorrupt-log-file-is-corrupt https://satheesh.net/2021/05/07/veeam-backup-for-microsoft-office-365-jeterror-501-jet_errlogfilecorrupt-log-file-is-corrupt/#respond Fri, 07 May 2021 06:32:43 +0000 https://satheesh.net/?p=2683 If Veeam Backup for Microsoft Office 365 gives this error when trying to backup a job: JetError -501, JET_errLogFileCorrupt, Log file is corrupt There is a way to solve this. This error is due to either the Veeam Backup for Microsoft Office 365 database not being stopped correctly, due to an unexpected shutdown of the […]

The post Veeam Backup for Microsoft Office 365 – JetError -501, JET_errLogFileCorrupt, Log file is corrupt first appeared on satheesh.net.]]>
If Veeam Backup for Microsoft Office 365 gives this error when trying to backup a job:

JetError -501, JET_errLogFileCorrupt, Log file is corrupt

There is a way to solve this. This error is due to either the Veeam Backup for Microsoft Office 365 database not being stopped correctly, due to an unexpected shutdown of the computer, or the volume where the database is located has run out of free space available or experienced some other unexpected error.

To solve the problem, we must first obtain the path of the database with problems.

Step 1: Obtain the path of the affected database(s)

To do this, we need to generate the log files first:

Chose to export the Proxy logs under Components (nothing else is needed):

Select a location to export the logs to:

Open one of the Veeam.Archiver.Proxy_xxx log files:

The quickest way to find the affected database is using the Find feature in Notepad and type inn the word: jeterror

When you have located the affected database repository.adb file and it’s location, you may proceed to the next step. In this example the path is:

\\Backup-NAS\o365backup\2021\repository.adb

Mount the backup location share to a drive, ie Z:

net use z: \\Backup-NAS\o365backup\

Step 2: Stop services

Start Services and stop the two following services:

Veeam Backup for Microsoft Office 365 Service

Veeam Backup Proxy for Microsoft Office 365 Service

Step 3: Very the status of the affected database(s)

We can verify the status of the affected database with the esentutl tool:

esentutl /mh repository.adb

Look for the State field and confirm it reads: Dirty Shutdown (look at the screenshot above)

Step 4: Repair the database(s)

Start the esentutl tool with this command (replace temp directory path with the one you created above):

esentutl /p repository.adb

When executing, the following warning appears. Just click OK and continue with the repair:

This process is going to take along time – potentially many hours. Especially if you have a large database repository. So be patient and let it finish:

When it’s finished, you can type in the command DIR. You will find a new file called repository.INTEG.RAW – delete this file.

Step 5: Final steps

Go back to Services and start the two services that was stopped in Step 2:

Veeam Backup for Microsoft Office 365 Service

Veeam Backup Proxy for Microsoft Office 365 Service

That’s it! You should now have a working database repository and all should work as normal.

Please share if you find this post useful. 🙂

The post Veeam Backup for Microsoft Office 365 – JetError -501, JET_errLogFileCorrupt, Log file is corrupt first appeared on satheesh.net.]]> https://satheesh.net/2021/05/07/veeam-backup-for-microsoft-office-365-jeterror-501-jet_errlogfilecorrupt-log-file-is-corrupt/feed/ 0 Skikkelig fiberbredbånd – levert trådløst via radio! https://satheesh.net/2021/02/25/skikkelig-fiberbredband-levert-tradlost-via-radio/?utm_source=rss&utm_medium=rss&utm_campaign=skikkelig-fiberbredband-levert-tradlost-via-radio https://satheesh.net/2021/02/25/skikkelig-fiberbredband-levert-tradlost-via-radio/#respond Thu, 25 Feb 2021 07:00:30 +0000 https://satheesh.net/?p=2665 Skikkelig fiberbredbånd – Levert trådløst via radio – Hastigheter opptil 100 Mbps – Rabatter for campingplasser – Lik fart opp og ned – Fri bruk uten begrensninger – Enkelt, rimelig og greit Dekning og bruksområder – Der internett ikke leveres i dag – Flere kilometer rekkevidde – Hytter – Campingplasser – Låver og uthus – […]

The post Skikkelig fiberbredbånd – levert trådløst via radio! first appeared on satheesh.net.]]>
Skikkelig fiberbredbånd

– Levert trådløst via radio
– Hastigheter opptil 100 Mbps
– Rabatter for campingplasser
– Lik fart opp og ned
– Fri bruk uten begrensninger
– Enkelt, rimelig og greit

Dekning og bruksområder

– Der internett ikke leveres i dag
– Flere kilometer rekkevidde
– Hytter
– Campingplasser
– Låver og uthus
– Uteområder
– Båt og havner
– Bro mellom bygninger
– Lik fart opp og ned

Hastigheter

Hjemmeside

https://cloudfiber.no

 

 

The post Skikkelig fiberbredbånd – levert trådløst via radio! first appeared on satheesh.net.]]>
https://satheesh.net/2021/02/25/skikkelig-fiberbredband-levert-tradlost-via-radio/feed/ 0
How to get Altibox TV to work with UniFi – VLAN enabled switches using one Ethernet cable https://satheesh.net/2021/01/24/how-to-get-altibox-tv-to-work-with-unifi-vlan-enabled-switches-using-one-ethernet-cable/?utm_source=rss&utm_medium=rss&utm_campaign=how-to-get-altibox-tv-to-work-with-unifi-vlan-enabled-switches-using-one-ethernet-cable https://satheesh.net/2021/01/24/how-to-get-altibox-tv-to-work-with-unifi-vlan-enabled-switches-using-one-ethernet-cable/#respond Sun, 24 Jan 2021 22:55:38 +0000 https://satheesh.net/?p=2642 This guide will show how you can get Altibox TV to work when used with Ubiquiti UniFi devices. Please note that this guide will only cover the following scenario: Altibox VMG Hjemmesentral in Bridge Mode, with UniFi Security Gateway (USG) and two UniFi switches in separate rooms with one Ethernet cable running between them. Simple illustration:     […]

The post How to get Altibox TV to work with UniFi – VLAN enabled switches using one Ethernet cable first appeared on satheesh.net.]]>
This guide will show how you can get Altibox TV to work when used with Ubiquiti UniFi devices. Please note that this guide will only cover the following scenario: Altibox VMG Hjemmesentral in Bridge Mode, with UniFi Security Gateway (USG) and two UniFi switches in separate rooms with one Ethernet cable running between them.

Simple illustration:

 

 

The whole idea here is to set up VLAN tagged switches in each room so the VMG can transfer its IPTV signals between them. Altibox have three VLANs assigned to the VMG:

  • VLAN 101 – TV
  • VLAN 102 – Internet
  • VLAN 103 – IP telephone and management (not used in this guide)

Note: Going forward with the guide, I will assume that you have a functional network up and running. With USG, the switches and maybe some access points to access the internet. The configuration and screenshots are from the UniFi Controller in Classic Mode (version 5.14.23).

  1. Log into your UniFi Controller and go to Settings -> Networks -> Create new network

    Type in a name, i.e altibox TV, select the purpose VLAN Only, type in 101 in the VLAN box, click Enable IGMP snooping and finally click SAVE.
  2. Go back to your UniFi overview and go to Devices and choose the switch you want to configure first. Click on one of the ports that you want to use for the IPTV signals. (In this illustration I chose port 14.)
  3. Click the little pencil icon to edit the port settings.
    When inside the edit box, select altibox TV (101) from the dropdown under Switch Port Profile and click Apply. (No other settings needs changing.)
  4. Let the UniFi Controller provision the new settings and repeat the steps above (steps 2 and 3) on the second switch. (You can choose whatever port you want.)
  5. Next you need to connect an Ethernet cable from the VMG to the newly configured port on the switch. When the VMG is in Bridge Mode the LAN ports 1, 2 and 3 are used for IPTV Decoder signals and LAN port 4, as you already should know, is used as the WAN link to the USG.
    In my example, I connected a cable from LAN port 1 on the VMG to port 14 on the UniFi switch.
  6. In the TV-room side, connect a cable from the IPTV Decoder’s LAN port to the port on the second UniFi switch you enabled the Switch Port Profile to.
  7. Turn on the power button on the IPTV Decoder and let it boot up. If you haven’t used the decoder before, it will probably have to be updated with the latest software. This is an automated process and you just need to let it finish.
  8. That’s it! You should now have TV signals via VLAN using one Ethernet cable.
The post How to get Altibox TV to work with UniFi – VLAN enabled switches using one Ethernet cable first appeared on satheesh.net.]]>
https://satheesh.net/2021/01/24/how-to-get-altibox-tv-to-work-with-unifi-vlan-enabled-switches-using-one-ethernet-cable/feed/ 0
react-native-win32.dll cannot be found – Outlook error – fix for Windows 8.x https://satheesh.net/2020/12/23/react-native-win32-dll-cannot-be-found-outlook-error-fix-for-windows-8-x/?utm_source=rss&utm_medium=rss&utm_campaign=react-native-win32-dll-cannot-be-found-outlook-error-fix-for-windows-8-x https://satheesh.net/2020/12/23/react-native-win32-dll-cannot-be-found-outlook-error-fix-for-windows-8-x/#respond Wed, 23 Dec 2020 11:05:32 +0000 https://satheesh.net/?p=2613 Now and then when updating Office 365 to newer versions, Outlook and other Office apps will generate an error when opening the app. This often happens with Outlook and while uninstalling and reinstalling Office 365 might fix the problem, it doesn’t always work. Especially on Windows 8.x. You might try doing this from an elevated command […]

The post react-native-win32.dll cannot be found – Outlook error – fix for Windows 8.x first appeared on satheesh.net.]]>
Now and then when updating Office 365 to newer versions, Outlook and other Office apps will generate an error when opening the app. This often happens with Outlook and while uninstalling and reinstalling Office 365 might fix the problem, it doesn’t always work. Especially on Windows 8.x.

You might try doing this from an elevated command prompt:

1. Run the following command: cd “C:\Program Files\Common Files\microsoft shared\ClickToRun”

2. Run the following command: OfficeC2RClient.exe /changesetting Channel=Broad

3. Run the following command: OfficeC2RClient.exe /update user

Hopefully this fixes your issues and the problem will go away. Needless to say, Windows 8.x is not recommended and Windows 10 is now the best option on computers.

The post react-native-win32.dll cannot be found – Outlook error – fix for Windows 8.x first appeared on satheesh.net.]]>
https://satheesh.net/2020/12/23/react-native-win32-dll-cannot-be-found-outlook-error-fix-for-windows-8-x/feed/ 0
Outlook – Trusted Platform Module has malfunctioned (error code 80090016) https://satheesh.net/2020/08/07/outlook-trusted-platform-module-has-malfunctioned-error-code-80090016/?utm_source=rss&utm_medium=rss&utm_campaign=outlook-trusted-platform-module-has-malfunctioned-error-code-80090016 https://satheesh.net/2020/08/07/outlook-trusted-platform-module-has-malfunctioned-error-code-80090016/#respond Fri, 07 Aug 2020 09:41:08 +0000 https://satheesh.net/?p=2578 Sometimes Outlook 2016 with Office 365 account keeps prompting for the password. After entering it, an error pops up “Your computer’s Trusted Platform Module has malfunctioned. If this error persists, contact your system administrator with the error code 80090030”. Note: This will not affect users who use MFA (Multi Factor Authentication), so this can be […]

The post Outlook – Trusted Platform Module has malfunctioned (error code 80090016) first appeared on satheesh.net.]]>
Sometimes Outlook 2016 with Office 365 account keeps prompting for the password. After entering it, an error pops up “Your computer’s Trusted Platform Module has malfunctioned. If this error persists, contact your system administrator with the error code 80090030”.

Note: This will not affect users who use MFA (Multi Factor Authentication), so this can be enabled to solve this specific problem.

Workaround 1:

1. On the affected machine navigate to:

C:\users\%username%\AppData\Local\Packages\

2. Rename the folder:
Microsoft.AAD.BrokerPlugin_cw5n1h2txyewy

to:

Microsoft.AAD.BrokerPlugin_cw5n1h2txyewy.old

3. Log out and back in again.

Workaround 2:

Note: This involves disabling modern authentication. Do not consider this as a permanent fix.

1. On the affected machine, run regedit and navigate to:

HKEY_CURRENT_USER > Software > Microsoft > Office > 16.0 > Common > Identity

2. Create a new DWORD (32 Bit) entry with the value 0 (zero):

  • Name: EnableADAL
  • Value: 0

3. Restart Outlook. (It may prompt for the password.) Note: This disables “Modern Authentication”.

The post Outlook – Trusted Platform Module has malfunctioned (error code 80090016) first appeared on satheesh.net.]]>
https://satheesh.net/2020/08/07/outlook-trusted-platform-module-has-malfunctioned-error-code-80090016/feed/ 0
TeslaMate – Tesla logger (step-by-step Docker installation guide – DigitalOcean) https://satheesh.net/2019/09/28/teslamate-digitalocean-docker-step-by-step-installation-guide/?utm_source=rss&utm_medium=rss&utm_campaign=teslamate-digitalocean-docker-step-by-step-installation-guide https://satheesh.net/2019/09/28/teslamate-digitalocean-docker-step-by-step-installation-guide/#comments Sat, 28 Sep 2019 11:21:12 +0000 https://satheesh.net/?p=2443 There are a few commercial services that provides logging for Tesla vehicles, TeslaFi, LinkMyTesla, Teslascope and a few others. These often cost money and all of them requires you to “give up” your Tesla account username and password for the service to function as intended. TeslaMate on the other hand is a self-hosted data logger […]

The post TeslaMate – Tesla logger (step-by-step Docker installation guide – DigitalOcean) first appeared on satheesh.net.]]>
There are a few commercial services that provides logging for Tesla vehicles, TeslaFi, LinkMyTesla, Teslascope and a few others. These often cost money and all of them requires you to “give up” your Tesla account username and password for the service to function as intended.

TeslaMate on the other hand is a self-hosted data logger for Tesla vehicles. Which means you can install it locally and within your control, without giving away the Tesla account credentials to a third party.

This particular guide is focused on installing and getting TeslaMate up and running using a virtual computer from DigitalOcean. It is not for free, but it can be a very cheap alternative if you for some reason don’t like using the commercial services available.

Simply put – the perfect setup if you want total control and privacy!

Disclaimer:
Please note that the use of the Tesla API and this software in particular is not endorsed by Tesla Inc, the developer or myself. Use at your own risk as I or anyone else cannot be held accountable for your actions!

[Last updated: 7th. October 2019]
– Added index
– Added Tasker App setup

Update changelog:
– Autostart services
– Misc typos


 

Prerequisites:

The guide itself is a bit technical and you should have basic skills when it comes to editing files, transferring and running commands. Also, there is a more advanced step if you want more than the basic setup. The advanced setup guide features HTTPS, Let’s Encrypt SSL-certificate, FQDN and password protection of the sites. And an optional Tasker app setup for enabling Bluetooth connectivity check to resume/suspend logging.

Index step-by-step installation guide:

  1. DigitalOcean Docker installation
  2. Easy setup
    or
  3. Advanced setup
  4. Tasker App setup (optional for Android)

 


 

DigitalOcean Docker installation:

  1. Create a DigitalOcean Droplet and choose the Docker image from Marketplace:
    The Standard $5 /mo plan should suffice for this purpose:
  2. Log into your newly created Droplet by using the SSH command from a Terminal window or use i.e PuTTY (check your email for the root password):
    ssh -l root ip_address_of_droplet
  3. After logging in, you are asked to change the root password. Enter the current password, a new one and confirm again with your chosen password:
  4. You are actually now done with the installation of the Droplet (virtual machine) itself.
  5. Depending on you want the Easy or Advanced setup going forward, skip to the guide you want to use:
    Easy setup (recommended)
    
    Advanced setup (HTTPS, Let's Encrypt SSL-certificate, FQDN and password protection of sites)

 


 

Easy setup method:

  1. Open up your favourite text editor (Windows Notepad, BBEdit, Notepad++, etc) and paste in the following text and save it as docker-compose.yml. Remember to change the environment variables for the passwords if you want and the IP address after VIRTUAL_HOST:
    version: '3'
    services:
      teslamate:
        image: teslamate/teslamate:latest
        restart: unless-stopped
        environment:
          - DATABASE_USER=teslamate
          - DATABASE_PASS=secret # change this to whatever you like
          - DATABASE_NAME=teslamate
          - DATABASE_HOST=db
          - MQTT_HOST=mosquitto
          - VIRTUAL_HOST=_your_ip_ # if you're going to access the UI from another machine replace
                                   # "localhost" with the hostname / IP address of the Docker Droplet.
          - TZ=Europe/Berlin       # (optional) replace to use local time in debug logs. See "Configuration".
        ports:
          - 4000:4000
        cap_drop:
          - all
    
      db:
        image: postgres:11
        restart: unless-stopped
        environment:
          - POSTGRES_USER=teslamate
          - POSTGRES_PASSWORD=secret # change this to whatever you like
        volumes:
          - teslamate-db:/var/lib/postgresql/data
    
      grafana:
        image: teslamate/grafana:latest
        restart: unless-stopped
        environment:
          - DATABASE_USER=teslamate
          - DATABASE_PASS=secret # change this to whatever you like
          - DATABASE_NAME=teslamate
          - DATABASE_HOST=db
        ports:
          - 3000:3000
        volumes:
          - teslamate-grafana-data:/var/lib/grafana
    
      mosquitto:
        image: eclipse-mosquitto:1.6
        restart: unless-stopped
        ports:
          - 1883:1883
        volumes:
          - mosquitto-conf:/mosquitto/config
          - mosquitto-data:/mosquitto/data
    
    volumes:
        teslamate-db:
        teslamate-grafana-data:
        mosquitto-conf:
        mosquitto-data:
  2. Use your favourite SFTP-Client (FileZilla, Cyberduck, WinSCP, etc) to connect and upload the docker-compose.yml file to your Droplet. (Don’t worry if you can’t see all the files below, they might be hidden from view in the client software.):
  3. Go back to the Terminal window (or if you used PuTTY, etc) and type in:
    docker-compose up -d

    Note: The -d option runs container in the background (detached mode).

  4. Open your Internet browser and type in your docker_ip_address:port_number to access the dashboard or Grafana:
    http://ip-of-your-machine:4000 (Dashboard - Sign in with your Tesla account)
    
    http://ip-of-your-machine:3000 (Grafana)
  5. [OPTIONAL] If you need to upgrade to newer releases, this can be done with the pull command (always check the changelog for release notes before doing any upgrades!):
    docker-compose down
    docker-compose pull

    And restart with:

    docker-compose up -d
  6. That’s pretty much it! For more in-depth details and information, please visit the developer page at GitHub.

Note: If the Droplet (virtual machine) is shutdown or rebooted, the services will start automatically on boot. There is no need to do anything to get it up and running again.

 


 

Advanced setup method:

  1. Open up your favourite text editor (Windows Notepad, BBEdit, Notepad++, etc) and paste in the following text and save it as docker-compose.yml:
    version: '3'
    
    services:
      teslamate:
        image: teslamate/teslamate:latest
        restart: unless-stopped
        depends_on:
          - database
        environment:
          - DATABASE_USER=${TM_DB_USER}
          - DATABASE_PASS=${TM_DB_PASS}
          - DATABASE_NAME=${TM_DB_NAME}
          - DATABASE_HOST=database
          - MQTT_HOST=mosquitto
          - VIRTUAL_HOST=${FQDN_TM}
          - TZ={$TM_TZ}
        labels:
          - 'traefik.enable=true'
          - 'traefik.port=4000'
          - "traefik.http.middlewares.redirect.redirectscheme.scheme=https"
          - "traefik.http.middlewares.auth.basicauth.usersfile=/auth/.htpasswd"
          - "traefik.http.routers.teslamate-insecure.rule=Host(`${FQDN_TM}`)"
          - "traefik.http.routers.teslamate-insecure.middlewares=redirect"
          - "traefik.http.routers.teslamate.rule=Host(`${FQDN_TM}`)"
          - "traefik.http.routers.teslamate.middlewares=auth"
          - "traefik.http.routers.teslamate.entrypoints=websecure"
          - "traefik.http.routers.teslamate.tls.certresolver=tmhttpchallenge"
    
      database:
        image: postgres:11
        restart: unless-stopped
        environment:
          - POSTGRES_USER=${TM_DB_USER}
          - POSTGRES_PASSWORD=${TM_DB_PASS}
          - POSTGRES_DB=${TM_DB_NAME}
        volumes:
          - teslamate-db:/var/lib/postgresql/data
    
      grafana:
        image: teslamate/grafana:latest
        restart: unless-stopped
        environment:
          - DATABASE_USER=${TM_DB_USER}
          - DATABASE_PASS=${TM_DB_PASS}
          - DATABASE_NAME=${TM_DB_NAME}
          - DATABASE_HOST=database
          - GRAFANA_PASSWD=${GRAFANA_PW}
          - GF_SECURITY_ADMIN_USER=${GRAFANA_USER}
          - GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_PW}
          - GF_AUTH_BASIC_ENABLED=true
          - GF_AUTH_ANONYMOUS_ENABLED=false
          - GF_SERVER_ROOT_URL=https://${FQDN_GRAFANA}
        volumes:
          - teslamate-grafana-data:/var/lib/grafana
        labels:
          - 'traefik.enable=true'
          - 'traefik.port=3000'
          - "traefik.http.middlewares.redirect.redirectscheme.scheme=https"
          - "traefik.http.routers.grafana-insecure.rule=Host(`${FQDN_GRAFANA}`)"
          - "traefik.http.routers.grafana-insecure.middlewares=redirect"
          - "traefik.http.routers.grafana.rule=Host(`${FQDN_GRAFANA}`)"
          - "traefik.http.routers.grafana.entrypoints=websecure"
          - "traefik.http.routers.grafana.tls.certresolver=tmhttpchallenge"
    
      mosquitto:
        image: eclipse-mosquitto:1.6
        restart: unless-stopped
        volumes:
          - mosquitto-conf:/mosquitto/config
          - mosquitto-data:/mosquitto/data
    
      proxy:
        image: traefik:v2.0
        restart: unless-stopped
        command:
          - "--global.sendAnonymousUsage=false"
          - "--providers.docker"
          - "--providers.docker.exposedByDefault=false"
          - "--entrypoints.web.address=:80"
          - "--entrypoints.websecure.address=:443"
          - "--certificatesresolvers.tmhttpchallenge.acme.httpchallenge=true"
          - "--certificatesresolvers.tmhttpchallenge.acme.httpchallenge.entrypoint=web"
          - "--certificatesresolvers.tmhttpchallenge.acme.email=${LETSENCRYPT_EMAIL}"
          - "--certificatesresolvers.tmhttpchallenge.acme.storage=/etc/acme/acme.json"
        ports:
          - 80:80
          - 443:443
        volumes:
          - ./.htpasswd:/auth/.htpasswd
          - ./acme/:/etc/acme/
          - /var/run/docker.sock:/var/run/docker.sock:ro
    
    volumes:
        teslamate-db:
        teslamate-grafana-data:
        mosquitto-conf:
        mosquitto-data:
  2. Use your favourite SFTP-Client (FileZilla, Cyberduck, WinSCP, etc) to connect to the Droplet and upload the docker-compose.yml file. (Don’t worry if you can’t see all the files below, they might be hidden from view in the client software.):
  3. Create a .htpasswd file for the directory containing user and password for the TeslaMate Settings access. This can be done online her:
    https://www.htaccesstools.com/htpasswd-generator/
  4. Go back to the Terminal window (or if you used PuTTY, etc) and create the .htpasswd file and paste the contents from the previous step:
    nano .htpasswd

    Copy and paste the hash-generated text string from step 3 and quit Nano by pressing Ctrl+X (Control+X). Make sure you press Y (Yes) when asked to save modified buffer and acknowledge the filename .htpasswd by confirming with the ENTER key.

  5. You now have to create the .env file. Again we use Nano and the same procedure as before from the Terminal window:
    nano .env

    Copy and paste the code below. Make the changes you want and use separate urls! Quit Nano by pressing Ctrl+X (Control+X). Make sure you press Y (Yes) when asked to save modified buffer and acknowledge the filename .env by confirming with the ENTER key.

    TM_DB_USER=teslamate
    TM_DB_PASS=yourpassword
    TM_DB_NAME=teslamate
    
    GRAFANA_USER=teslamate
    GRAFANA_PW=yourpassword
    
    FQDN_GRAFANA=your_grafana_url
    FQDN_TM=your_teslamate_url
    
    TM_TZ=Europe/Berlin
    
    LETSENCRYPT_EMAIL=your@email.com

  6. Back at the Terminal window create a folder for the SSL cert information to be stored:
    mkdir acme
  7. And to finish of the installation from the Terminal window. (This typically takes a minute to finish.):
    docker-compose up -d

    Note: The -d option runs container in the background (detached mode).

  8. Open your Internet browser and type in your FQDN_urls to access both the sites:
    https://FQDN_teslamate_url (TeslaMate Dashboard and Settings site)
    
    https://FQDN_grafana_url (Grafana site)
  9. When accessing the TeslaMate Dashboard and Settings site, use the username and password you chose when creating .htpasswd. Then on the next login, use your Tesla account credentials:

    When accessing the Grafana site, use the username and password you entered in the .env file for GRAFANA_USER and GRAFANA_PW:
  10. [OPTIONAL: Upgrade] If you need to upgrade to newer releases, this can be done with the pull command (always check the changelog for release notes before doing any upgrades!):
    docker-compose down
    docker-compose pull

    And restart with:

    docker-compose up -d
  11. That’s pretty much it! For more in-depth details and information, please visit the developer page at GitHub.

Note: If the Droplet (virtual machine) is shutdown or rebooted, the services will start automatically on boot. There is no need to do anything to get it up and running again.

 


 

Tasker App setup:

Here are instructions for creating Tasker tasks (paid app) to resume and suspend logging when phone is connected via Bluetooth to the vehicle. This guide only works if TeslaMate is behind a reverse-proxy with HTTPS and basic access authentication. (E.g. if you use a FQDN.)

  1. You first need to install both Tasker and RESTask for Tasker:
    Tasker: https://play.google.com/store/apps/details?id=net.dinglisch.android.taskerm
    
    RESTask for Tasker: https://play.google.com/store/apps/details?id=com.freehaha.restask
  2. Open Tasker
  3. Do the following as shown in the pictures below:- Select the TASKS tab
    – Add a Task by pressing the plus sign in the bottom right ➕
    – Name the task TM Resume (or anything you like)
    – Press the checkmark ✔

    On the Task Edit view:
    – Add an Action by pressing the plus sign in the bottom right ➕On the Select Action Category dialog:
    – Type rest in the Filter field at the bottom
    – Select RESTask

    On the Action Edit view:
    – Press the configuration edit button 📝On the RESTask view:
    – Change Request Type to PUT
    – Change Host to https://YOUR_FQDN/api/car/1/logging/resume (replace YOUR_FQDN with the FQDN_TM url in the .env file)
    – Change Basic Auth to the credentials used in the .htpasswd file
    – Press the play button to test ▶ You should get a 204 response if it’s successful. (Check your host url, username and settings if not.)
    – Save and exit by pressing the save button 💾
    – Save and exit again by pressing the back arrow in Action Edit view ⬅
    – Save and exit once more by pressing the back arrow in Task Edit view ⬅
    Repeat the entire process and create one more task and call it TM Suspend (or anything you like):
    – This time change address of Host to https://YOUR_FQDN/api/car/1/logging/suspendYou should now have two tasks in the TASKS view:
    Select the PROFILES tab:
    – Add a Profile by pressing the plus sign in the bottom right ➕
    – Name the task TeslaMate (or anything you like)
    – Press the checkmark ✔
    Select the State option:
    On the Select State Category dialog:
    – Type bt in the Filter field at the bottom
    – Select BT Connected
    On the State Edit view:
    – In the Name option press the search button 🔍
    – Choose your vehicle
    – In the Address option press the search button 🔍
    – Choose your vehicle
    – Save and exit by pressing the back arrow ⬅
    Back at the PROFILES tab again:
    – Choose TM Resume (or whatever you named it before)
    Press and hold on the text TM Resume (or whatever you named it):
    – Press Add Exit Task
    – Choose TM Suspend
    PROFILES
    view:
    – You should now have a similar screen (depending on what names you chose above)
    – Save everything by pressing the checkmark ✔
  4. If the vehicle sleeps TeslaMate will now automatically resume logging as soon as your phone connects to the vehicles Bluetooth. And likewise suspend logging whenever it disconnects from the phone.
  5. You can easily check if it’s working as intended by going to you TeslaMate Dashboard and see the status changes.
  6. That’s it! 🙂

Please share if you liked the guide! Want a new Tesla? Get it here: http://ts.la/satheesh5341


 

The post TeslaMate – Tesla logger (step-by-step Docker installation guide – DigitalOcean) first appeared on satheesh.net.]]>
https://satheesh.net/2019/09/28/teslamate-digitalocean-docker-step-by-step-installation-guide/feed/ 1
Surveillance Detection Scout – Your Lookout on Tesla Autopilot https://satheesh.net/2019/08/12/surveillance-detection-scout-your-lookout-on-tesla-autopilot/?utm_source=rss&utm_medium=rss&utm_campaign=surveillance-detection-scout-your-lookout-on-tesla-autopilot https://satheesh.net/2019/08/12/surveillance-detection-scout-your-lookout-on-tesla-autopilot/#respond Mon, 12 Aug 2019 07:49:03 +0000 https://satheesh.net/?p=2434 Surveillance Detection Scout is a hardware and software stack that makes use of your Tesla’s cameras to tell you if you’re being followed in real-time. The name, as you likely gathered, pays homage to the ever-effective “Surveillance Detection Route”. When parked, Scout makes an excellent static surveillance practitioner as well, allowing you to run queries […]

The post Surveillance Detection Scout – Your Lookout on Tesla Autopilot first appeared on satheesh.net.]]>
Surveillance Detection Scout is a hardware and software stack that makes use of your Tesla’s cameras to tell you if you’re being followed in real-time. The name, as you likely gathered, pays homage to the ever-effective “Surveillance Detection Route”. When parked, Scout makes an excellent static surveillance practitioner as well, allowing you to run queries and establish patterns-of-life on detected persons.

Scout currently supports Tesla Models S, 3 and X, running license plate recognition on 3 camera feeds to alert you in real time if you’re being followed. When you park, Scout remains vigilant, implementing familiar face detection as well. By combining timestamped vehicle location data & video, computer vision and an intuitive web interface, it becomes apparent that Scout has just as many offensive as defensive applications. Over time, SDS captures and reports on observed patterns of life, allowing you to quickly gain an overview of your surroundings (or your target) with minimal effort.

Scout v0.1 has been released, and we’re hard at work on the next iteration. There’s plenty of work to do, but we’re proud to be on the cutting edge of what we feel is an extremely important part of offensive security- leveraging the mass data that’s already out there and opening the public’s eyes to the dangers they face in this day & age.