Skip to content

Instantly share code, notes, and snippets.

@frazei
frazei / arpae_homeassistant.md
Last active April 25, 2025 13:43
ARPAE Air Quality in Home Assistant

Integrare i dati di ARPAE in Home Assistant tramite REST API

L'Agenzia regionale per la prevenzione, l'ambiente e l'energia dell´Emilia-Romagna (Arpae) espone tramite API malamente documentate tutta una serie di dati riguardanti le rilevazioni che vengono fatte in regione da varie centraline sparse sul territorio.

Qui scrivo tutti i modi che ho individuato per importare i dati dentro a Home Assistant sotto forma di sensori che possono poi essere utilizzati per visualizzare grafici e affini sulla dashboard.

L'end point a cui inviare le richieste è sempre https://apps.arpae.it/REST ma espone diversi tipi di estrazioni che non sono tutte documentate, o almeno io non ho trovato un gran che. La cosa migliore è copiare da alcune pagine di Arpae le chiamate e poi andare a sentimento...

Riferimenti utili

  • Dal sito di Home Assistant la pagina sui RESTful Sensor
  • Dal sito di ARPAE la pagina dove descrive l'API per ottenere la [Qualità dell’aria: sit
@frazei
frazei / RG350.md
Last active October 6, 2024 22:46
RG350 USB Internet Access on OSX

RG350 accesso Internet su OSX tramite USB

Read this in english

Il primo metodo (condivisione internet) ha il vantaggio di essere leggermente più semplice ma lo svantaggio che la RG350 sarà nattata dietro al mac. Il secondo metodo (interfaccia in bridge) è leggermente più complesso ma permette alla RG di essere direttamente nella rete locale.

Nota: purtroppo entrambe le procedure non sono persistenti al riavvio della RG350. Ogni volta che si spegne perde l'interfaccia poichè al momento non ho capito come fare a scrivere su /etc/network/interfaces che è readonly.

Metodo 1: condivisione internet

  1. Attivare condivisione internet sul mac:
  • Preferenze di Sistema > Condivisione > Condividi la tua connessione da: Wi-Fi (oppure USB 10/100/1000 LAN)
@frazei
frazei / qemu.md
Last active March 19, 2024 17:44
Apple Silicon M1 QEMU #osx #virtualization #arm

Apple Silicon M1 QEMU

How to run Windows ARM and Linux ARM on Apple Silicon M1

09/03/2021 Update: I've found this app UTM that is a GUI for qemu and includes a precompiled version of it in various formats (x86, x86_64, arm, risc..). It works very well!

Prerequisites

  • You need a clean brew install using the arm version (not the x86 on rosetta2). So, first of all, I've removed the x86/rosetta2 version:
% brew remove --force $(brew list)
% /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall.sh)"
@frazei
frazei / download.md
Last active March 5, 2024 11:46
Files download

How to wget a list of URLs in a text file?

wget -i list.txt

Run it in parallel with

cat list.txt | parallel --gnu "wget {}"
@frazei
frazei / activation.md
Last active February 23, 2024 11:22
Bonjour mDNS Apple TV Airplay

Reference: https://discussions.apple.com/thread/253467325?sortBy=best

Apple TV 3 activation failed

After a million tries.... the following process worked! This is using all legitimate tools, so no drama!

To fix failed activation, and therefore restore AirPlay capability, on a Mac, install Apple Configurator 2 from the app store.

Plug in your Apple TV 3rd Gen to power and to a Mac using a micro USB cable from the Apple TV to the Mac.

@frazei
frazei / hacking_wp600a.md
Last active February 8, 2024 10:47
Hacking Wildix WP600A

Hacking Wildix wp600a business phone

Intro

In teoria è l'equivalente di yealink t48u (oppure g?)

  • android 4.2.2
  • kernel 3.0.36+
  • build 47.145.7.450
  • Mali400
  • RockChip rk3066
@frazei
frazei / timemachine.md
Last active February 8, 2024 10:44
Debug Apple timemachine in bash #apple #osx

How to debug Apple Time Machine from console/bash

Stream the log, live (like tail):

$ log stream --style syslog  --predicate 'senderImagePath contains[cd] "TimeMachine"' --info

Don't stream, but show the log end exit:

$ log show --style syslog  --predicate 'senderImagePath contains[cd] "TimeMachine"' --info
@frazei
frazei / oracle_ubuntu.md
Last active February 7, 2024 17:09
Ubuntu desktop on Oracle Cloud Free Tier
@frazei
frazei / hidden files osx.md
Last active January 29, 2024 10:01
Hidden files in OSX #osx

Hidden files on OSX

The Quickest Way to Show/Hide Hidden Files

Since the release of macOS Sierra, when in Finder, it is now possible to use the shortcut:

CMD + SHIFT + .

The long way to show hidden Mac OS X files

@frazei
frazei / ol8_portainer.md
Created December 14, 2023 11:23
Oracle Linux 8 Portainer client

Install Docker

# dnf install -y dnf-utils zip unzip
# dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo
# dnf remove -y runc
# dnf install -y docker-ce --nobest

Enable and start the Docker service.

# systemctl enable docker.service