Mattermost Mqtt Flag Integration

UPDATE 20231020 – Via USB Serial (also schematic for below integration)
https://www.henriaanstoot.nl/2023/10/20/thunderbird-mail-notification-flag-via-usb/

Using a servo which is MQTT controlled, and a slash command in Mattermost, i can be notified by friends and colleages.

Flag, and monitor-stand are 3D printed.

ESP is a simple wemos mini.

Note the slash command, M5 stick flow is unrelated!

Laser pointer web controlled

Coline sometimes plays games with her sisters online using my streaming server. (Due to Covid)

Some games are difficult because you have to point to a location on the table. So i came up with a laser pointer solution.

The idea is: Send a url to the players with a streaming camera, you see the game on your screen but you can click on a location on the screen to move a laser pointer to that location.

Below is a proof of concept using the Lasercut worldmap on the wall and a website with a worldmap.

Laser pointer module

Code to place on the ESP:

This will connect to the MQTT broker and listens for messages on the servo/pan and tilt topic.

#include <ESP8266WiFi.h>
#include <PubSubClient.h>
#include <Servo.h> 
Servo pan; 
Servo tilt;

const char* ssid = "MYSSI";                
const char* password = "MYWIFIPASS";
const char* mqtt_server = "IPMQTTBROKER";
const char* topic_pan = "servo/pan";
const char* topic_tilt = "servo/tilt";
 
WiFiClient espClient;
PubSubClient client(espClient);
long lastMsg = 0;
char msg[50];
int value = 0;

void setup() {
  pan.attach(D5);
  tilt.attach(D6);
  setup_wifi();
  client.setServer(mqtt_server, 1883);
  client.setCallback(callback);
}

void setup_wifi() {
  delay(5);
  WiFi.begin(ssid, password);

  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
  }
}

void callback(char* topic, byte* payload, unsigned int length) {
 String string;
 for (int i = 0; i < length; i++) {
 string+=((char)payload[i]); 
 }
 int pos = string.toInt(); 
 if ( strcmp(topic, topic_pan) == 0 ) {
 pan.write(pos); 
 }
 if ( strcmp(topic, topic_tilt) == 0 ) {
 tilt.write(pos); 
 }
 delay(15); 
}

void reconnect() {
  while (!client.connected()) {
    if (client.connect("ESP8266Client")) {
      client.subscribe(topic_pan); 
      client.subscribe(topic_tilt); 
    } else {
      delay(5000);
    }
  }
}
void loop() {   
  if (!client.connected()) {
    reconnect();
  }
  client.loop();
  delay(100);
}

Website PHP code:

This has some calibration code to get coordinates lined-up

<?Php
$foo_x=$_POST['foo_x'];
$foo_y=$_POST['foo_y'];
echo "X=$foo_x, Y=$foo_y ";
$x=160 - round($foo_x/30);
$y=38 - round($foo_y/100);

system('/usr/bin/mosquitto_pub -h 10.1.0.17 -t servo/pan -m "' . $x . '"');
system('/usr/bin/mosquitto_pub -h 10.1.0.17 -t servo/tilt -m "' . $y . '"');
?>
<form action='' method=post>
<input type="image" alt=' Finding coordinates of an image' src="worldmap.jpg"
name="foo" style=cursor:crosshair;/>
</form>

POC

Broken or slow laptop? Screen still works?

Remove the screen and check its connector.

Maybe you can buy a controller board in china for cheap.
I took apart a EEEpc with a nice little screen.

I looked for HSD100IFW1-A00 1024-600 controller.
And ordered a
Driver Board for 10.1 “HSD100IFW1-A00/HSD100IFW1-A04 / HSD100IFW1 Lcd Composite + Tv(RF) + Usb + Vga + Hdmi-Compatibel 1024 × 600 Controller Board

It was only around 20 euro’s.

Movie genre’s

We are movieholic’s. Watching everything. Sometimes we thing “why the F did we watch that” other times it’s a pretty unknown jewel.

We loved “De kijk van Koolhoven” a dutch tv serie about movies, by our dutch director Martin van Koolhoven.
He explained why he liked certain movies. Tarantino did simular but couldn’t find much about that

We started watching the top 250 IMDB movies a few years ago. Comming a long way, and has been a treat.

Below a list of top movies i could thing of in serveral genre’s.
Nowhere complete, and probably forgot better ones

Action

  • 3 days of the condor
  • Snowpiercer
  • Maze runner
  • Inferno
  • Bourne series
  • Enter the Dragon
  • Fugitive
  • John Wick

Animation

  • Akira
  • Ghost in the shell
  • 9
  • 5cm per second
  • Tintin (2011)
  • Beowulf
  • Coco
  • Song of the sea

Comedy

  • guest house paradiso
  • Life of brian
  • “100-year old man who climbed out of the window”
  • Blues brothers
  • “Dont look now we’re being shot at”
  • Groundhog day
  • The man who sues god
  • Mash attacks
  • Modern times
  • Great Dictator
  • Airplane

Crime

  • 12 Angry men
  • The sting
  • The Mule
  • Oceans series
  • “No Country for Old Men”

Drama

  • Roma
  • A beautiful mind
  • Bicycle thieves
  • Cast away
  • Cinema Paradiso
  • Green book
  • Kite runner
  • Man on the moon
  • Seven samurai
  • American Sniper
  • Wadjda

Dutch

  • Amsterdamed
  • De Lift
  • The Johnsons
  • “Schippers van de Kameleon”
  • Michiel de Ruijter

Fantasy

  • The BFG
  • Hobbit
  • Lotr
  • Labyrinth
  • “The Imaginarium of Doctor Parnassus”
  • Time bandits
  • City of lost children

Film Noir

  • Double indemnity
  • Touch of evil
  • Sin City
  • M

Horror

  • Alien
  • Saw
  • The Platform
  • Underwater
  • Them
  • The Thing
  • Troll hunter?
  • Braindead

IT-Related

  • Antitrust
  • Hackers
  • Tron
  • Matrix
  • Source code
  • Swordfish
  • Takedown
  • War games

Mindfuck

  • Looper
  • Memento
  • Oldboy
  • Vertigo
  • The Prestige
  • Primer
  • Time lapse

Pre-1940

  • The general
  • Metropolis
  • Modern times
  • Gold Rush
  • M

SciFy

  • Bladerunner
  • Metropolis (silent)
  • Attraction
  • Inception
  • Interstellar
  • Martian
  • Terminator
  • Avatar
  • Arrival (2016)
  • Incredible shrinking man
  • Them (1954)

Fun to watch

  • 4Latas

War

  • Live is beautiful
  • Great escape
  • Dunkirk
  • The pianist
  • T-34
  • Oorlogswinter
  • Schindler’s list
  • Das boot
  • Downfall
  • Inglourious basterds
  • The imitation game
  • Ballad of a Soldier (1959)
  • Escape from Sobibor (1987)
  • painted bird (2019)

Weird

  • Funky Forrest
  • Existence
  • Delicatessen
  • Meet the feebles
  • “Requiem for a dream”
  • Swiss army man
  • Tenet
  • A clockwork orange
  • “Curious case of Benjamin Button”
  • The Lobster
  • Zardoz

Western

  • Revenant
  • Brimstone
  • Hang m high
  • Good bad and the Ugly
  • Magnificent Seven (1960)

Woman Power

  • Jackie Brown
  • Hidden figures
  • Color Purple
  • Moana / Brave
  • Roma
  • Alien
  • The Piano
  • Girl with the Dragon Tattoo
  • A League of Their Own
  • 9 to 5
  • Kill bill

List for Maryse

  • Zwartboek
  • Red sea ding resort
  • The pianist
  • Schindler’s list
  • Zwartboek
  • Son of Saul
  • Boy in the striped pyjama’s
  • Waltz With Bashir
  • La vita è bella

Indian movies

  • Taare Zameen Par (2007) – Like stars on earth (is a tearjerker)
  • 3 Idiots (2009)
  • Slumdog millionaire (Techinally a british movie)
  • Dangal (2016)

Where have we been map

Generated a world map where we’ve been … biggest red part .. seen the least of it 🙂
Vacation or work
A small part of the US, and a small corner from the westcoast of Canada.

Countries/places on our todo list:

  • Mongolia
  • Japan
  • Cuba
  • Greece
  • America : Coline
  • Austria : Coline, Monique
  • Belgium : Monique, Coline
  • Bolivia : Coline, Arja
  • Cambodia : Coline, Monique
  • Canada : Monique, Coline
  • Canary islands : Coline
  • Czechia : Coline, Monique
  • Denmark : Coline
  • Egypt : Monique, Coline
  • England : Monique, Coline
  • France : Monique, Coline
  • Germany : Monique, Coline
  • Hungary : Monique, Coline
  • Iceland : Arja, Coline, Monique
  • Ireland : Coline, Monique
  • Italy : Monique, Coline
  • Laos : Monique, Coline
  • Malta : Coline
  • New Zealand: Coline
  • Peru : Arja, Coline
  • Romenia : Monique, Coline
  • Scotland : Monique, Coline (Many many times)
  • Spain : Coline
  • Sweden : Coline
  • Switzerland : Coline, Monique
  • Vietnam : Coline, Monique

Kodi movies and metadata

UPDATE: 20220307

I’m using Kodi for a long time now, but never was really satisfied with the results of automatically scraping metadata.

Movie names had to be just right, and changing some metadata was hard.

A while ago i made a NFO generator for own movies, digitized 8mm material, mobile movies etc.

So for movies/tv shows i started using Tinymediamanager for metadata management. You have more controll over your NFO files.
Don’t forget to add media sources to Kodi, selecting the ‘local NFO scraper’ option.

I’m using TVDB scraper in TMM, and trakt to mark seen.
But that way i’m missing IMDB top 250.

Fix:

  • Scrape metadata for selected movies
  • Choose IMDB as the Metadata scraper
  • Remember to DESELECT ALL metadata options with the exceptions of Rating , to keep your existing metadata.
TinyMediaManager Scraper page

UPDATE:
Problems with premiered date/release date showing up as movie date in kodi? Here is my fix.

find . -type f -name '*.nfo' -print -exec sed -i -e '/<premiered>/d' {} \;

Folk band instruments 2021

Today newest addition Concertina

Bert Visscher and Herman Finkers

Hacking a hikvision doorcam

I don’t like cloud enabled devices, except if it is my own cloud!

I bought a Hikvision doorcam, when i researched the diverse doorcams where was a hikvision which could use a existing doorchime.

When i got mine in, it did not have this feature.
Damn what to do!

Where where several solutions i could think off:

  • Use as is .. a no-go for me
  • Offload SSL on a proxy and try to reverse engineer the https communication
  • Or a hardware solution

I looked at the electronics and tried to find out how things where connected and where things where you could make use of.
I soldered some wires to a little print where the pushbutton was located.
Now i could read the button press, video was easily captured by using a RTSP port.

Does it work? … yes, but i’m not happy about it

Video playback in Zoneminder or VLC

rtsp://admin:secretpassword@hikvisionip:554/Streaming/Channels/101

A solution i used before for a generic doorbell

Just read the gpio pin with Arduino or raspberry.
A generic optocoupler will work, just check your resistor.

Uboot Game

2019-06-08 I’ve bought myself Uboot the game.

It is one of my favourite board games.

Playing with a cardboard uboot is … okay. But when you have a 3D printer .. do i need to say more?

Parts printed

3D printed version assembled and completed in Jan 2021

All assembled and put Leds inside.

Led’s are controlled by a Arduino, Mqtt or a fysical button can be used.