Skip to content

Instantly share code, notes, and snippets.

Obtain Mi Home device token

Use any of these methods to obtain the device token for the supported miio devices.

Method 1 - Obtain device token for miio devices that hide their token after setup

Use one of these methods to obtain the device token for devices that hide their tokens after setup in the Mi Home App (like the Mi Robot Vacuum Cleaner with firmware 3.3.9_003077 or higher). This is usually the case for most Mi Home devices. The latest versions of the Mi Home smartphone app dont hold the token anymore so before you begin with any of these methods you will need to install an older version of the smartphone app. Version 5.0.19 works for sure with the 1st gen Vacuum Robot, for the 2nd gen (S50) you should try version 3.3.9_5.0.30. Android users can find older version of the app here.

Android users

Rooted Android Phones

  • Setup your Android device with the Mi Home app version 5.0.19 or lower
  • Install [aSQLiteManager](https://play.google.c
@g3rhard
g3rhard / pip3_packages.txt
Created May 30, 2020 12:57
PIP3 Packages
ansible==2.9.9
ansible-lint==4.2.0
appdirs==1.4.4
asn1crypto==1.3.0
bcrypt==3.1.7
beautifulsoup4==4.9.1
certifi==2020.4.5.1
cffi==1.14.0
chardet==3.0.4
colorama==0.4.3
##
## Send message to Slack
## https://github.com/massimo-filippi/mikrotik
##
## script by Maxim Krusina, [email protected]
## based on: http://jeremyhall.com.au/mikrotik-routeros-slack-messaging-hack/
## created: 2017-08-21
## updated: 2018-09-22
##
## usage:
##
## Send a message to Slack on DHCP Bound
## https://github.com/massimo-filippi/mikrotik
##
## script by Maxim Krusina, [email protected]
## based on: http://jeremyhall.com.au/mikrotik-routeros-slack-messaging-hack/
## created: 2018-09-23
## updated: 2018-09-23
##
## usage:
#!/bin/bash
TEMP_STATUS="/tmp/cloudflared.status"
TEMP_ERR="/tmp/cloudflared.err"
TEMP_LOCK="/tmp/checkCloudflared.lock"
lockfile -r 0 $TEMP_LOCK || exit 1
sudo systemctl status cloudflared > $TEMP_STATUS
cat $TEMP_STATUS | grep "failed to connect to an HTTPS backend" > $TEMP_ERR
cat $TEMP_STATUS | grep "failed to perform an HTTPS request" >> $TEMP_ERR
## Monitor Pi-Hole service
check process pihole-FTL with pidfile /var/run/pihole-FTL.pid
start program = "/etc/init.d/pihole-FTL start"
stop program = "/etc/init.d/pihole-FTL stop"
if changed pid then exec "/bin/bash -c '/usr/local/bin/slack-webhook.rb'"
if 1 restart within 1 cycle then exec "/bin/bash -c '/usr/local/bin/slack-webhook.rb'"
if failed port 53 type tcp with timeout 5 seconds for 2 cycles then restart
## Check Pi-Hole web interface
check process lighttpd with pidfile /var/run/lighttpd.pid
#!/usr/bin/ruby
require 'net/https'
require 'json'
uri = URI.parse("https://hooks.slack.com/services/XXXXXXXXX/YYYYYYYYY/ZZZZZZZZZZZZZZZZZZZZZZZZ")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri.request_uri, {'Content-Type' => 'application/json'})
request.body = {
@g3rhard
g3rhard / Jenkinsfile
Created January 17, 2020 13:58 — forked from merikan/Jenkinsfile
Some Jenkinsfile examples
Some Jenkinsfile examples

Шаблон Postmortem

Вольный перевод Postmortem Template от Hosted Graphite.

Краткое описание

Background

Что произошло?

Хронология событий

@g3rhard
g3rhard / agent.Dockerfile
Created August 13, 2019 11:26
Puppet test environment
FROM debian:stretch
CMD ["apt-get update && apt-get install -y puppet nano"]
CMD tail -f /dev/null