achildrenmile.github.io

View on GitHub

Welcome to the blog

Hello there! My name is Michael and I am an IT guy from Carinthia. I like to play around with technology and learn new things. Idea behind this blog is to provide you articles about projects, ideas, etc. Inspired by Bruno Hautzenberger’s web site (Thanks Bruno!), the blog is static HTML using Jekyll provided and hosted by GitHub Pages. This makes blogging fun, because using #Markdown makes editing and updating is easy.

Contact and other profiles

Twitter Instagram LinkedIn Company WebPage Github michael(at)strali.solutions

Feel free to reach out to me!


Posts

Flauschi - the WLED powered Ghost

2021-12-17 #Blog | #IoT | #WLED | #kidstech

After assembling a WLED powered XMas lighting, my daughter Tamara asked me if we can do something with LEDs. So, after searching in the IoT surprise box, we found LED rings and then the idea come up to create Flauschi, the Ghost with the shining eyes.

Thanks to the WLED library it simple to control the light of Flauschi’s eyes and you can integrate Flauschi into your home automation, etc. More information on WLED you can find here.

What hardware do you need?

Creating Flauschi

  1. Cut 2 felt sheets in form
  2. Position the LED rings as eyes, cut holes accordingly and move the wires into the holes
  3. Print with transparent filament the diffusers for the LEDs. Here you can find a version for a 12 LED ring
  4. Print with red filament the mouth. Here you can find the mouth
  5. Solder the led rings and the ESP together according to wiring. Keep an eye on the DIN and DOUT port usage of the LED ring, otherwise it won’t light. The Standard PIN for the digital control signal of the LED is PIN 2 on the ESP. Solder the 5V to VCC and GND to GND and also the data PIN.
  6. Flash WLED => follow the instructions. Recommended method is to flash it directly via browser. This is easy going :)
  7. After Flashing, connect to the WLED-AP and configure your Wifi settings and then test the functionality
  8. If everything works, take a hot glue gun and fix the ESP and the wiring on the back of the felt sheet. Add also an usb cable and fix it with the hot glue => this you can use as power connection via USB (other options possible of course). Then glue the diffusers on the LED shields and glue both on the felt.
  9. Take the printed mouth and glue it on the felt
  10. Now it is time for sewing the two felts together and leave on side open for filling with cotton wool
  11. Fill Flauschi with cotton wool
  12. Sew the last side and ensure that the USB cable comes out of Flauschi
  13. Connect the USB cable to a power source (Powerbank, etc.) and check if the eyes are shining bright
  14. Congratulations your Flauschi is alive

In order to double up the speed and enjoying building things together, my daughter did the creative and material work and I did the soldering and flashing part. It was a great time building Flauschi together.

Here you’ll find a few impressions. Hope you like it and now it’s your turn to create your personal Flauschi!

Flauschi Off Flauschi On Sewing Flauschi Filling Flauschi

Smart Watermeter reader aka AI-on-the-edge-device (by jomjol)

2021-01-12 #Blog | #AI | #Watermeter

Every once a year our local village water department sends us a snail mail to read the measure of our water counter and send them back. And every year, I think, why the hell is this necessary, if there are technical solutions out there which can handle this, …but that’s another story, however.

Next time, we can do this a little bit easier directly in our Home Assistant.

Thanks to the great effort of @jomjol there is an open source solution in order to read out our digital and even anolog meters (even reading out old energy meters should be possible)!

What hardware do you need?

Platform

You need one running MQTT broker. You can find a guide here.

Architecture overview

Before we come to the implementation of the client and the gateway, let’s check what we would like to build.

Architecture Overview

How does it work?

The ESP32 cam in the 3d printed housing is mounted on top of the watermeter.The device is using a trained neural network in order to interpret the numbers. After setup and calibration of the firmware the cam will push the data through the MQTT channel in a defined interval. All you need in order to setup and configure can be found here.

How does it look like?

Configuration

Watermeter moutned

HomeAssistant

Protect streaming using SecureToken in Wowza Streaming Engine - .NET Sample Code

2021-04-20 #Blog | #Wowza | .NET

Wowza Secure Sample

Recently, there was the need to protect streams in Wowza Streaming engine using Secure Tokens. While there is an article explaining the detailed handling, there is no useful source code sample out there. To make you the getting started easier you can find a working .NET sample code here!

Hope this helps you to get started quickly to secure your streams :)

Getting Started with PSOC6

2021-03-30 #Blog | #PSOC6

In this post you’ll get to know how to setup the development environment for #PSOC6 from Infineon and execute the “Hello world” program.

PSOC6PROTOKIT

What is PSOC6?

Before we start, let me quickly introduce you what PSOC6 is and what is used for.According to Infineon, the PSoC 6 family is built on an ultra-low-power architecture, and the MCUs feature low-power design techniques to extend battery life up to a full week for battery powered applications. The low power consumption makes the MCU interesting for gathering sensor data and many more applications. Normally in my projects I am using the Espressif MCUs. However, in the upcoming monthS, I’ll build also some use cases with PSOC6 and compare the architectures. For more information about PSOC6, you can visit this page.

What hardware do you need?

PSOC6PROTOKITOPEN

Installation of Modus Toolbox

ModusToolboxDownload

ModusInstall01

ModusInstall02

ModusInstall03

Connect the PSOC6 and start the “Hello World” programm

Check Jumper

Connect to PC

Driver installation successful

Check COM port

Connect to board

Connect to board

Hello World blink

Congratulations, you successfully finished the PSOC6 and IDE setup!

Meshtastic - Your own private mesh network

2021-03-23 #Blog | #Meshtastic

Did you ever ask yourself, how to build a reliable and secure mesh network, which works without Internet access and gives you complete freedom and privacy in order to exchange messages in a secure way?
By searching for answers and technical possiblities around the #LoRa technology, I came across the #Meshtastic project. The project is complete #opensource, comes with a great community, Android app and supports several #LoRa GPS boards like the TTGO T-Beam or the Heltec LoRa 32. The smartphone communication to the meshtastic mesh node happens via bluetooth. The sender will send the message. The mesh node will use the #LoRa band in order to communicate with the mesh nodes, in order to deliver the message to the recipient using the app and bluetooth.



This is a really cool project. I can highly recommend to have a look at it.

Meshtastic1

Meshtastic2

LoRa Wan Gateway and The Things Stack

2021-03-13 #Blog | #LoRaWan | #LoRaWanGateway

In the post “Lora MQTT Gateway” it was shown how to create a LoRa application scenario using 2 TTGO’s as gateway and sender and consume messages using #MQTT. As LoRa offers a lot of possibilities and once you dig in deeper, you’ll come to TheThingsStack network and this offers a lot of ideas and possibilities. The Things Stack project is community driven and a great way to make the #LoRaWan technology public available. So, the decision was made to place a public #LoRaWanGateway in Nötsch im Gailtal.

What is LoRaWan?

According to the LoRa Alliance: “LoRaWAN® network architecture is deployed in a star-of-stars topology in which gateways relay messages between end-devices and a central network server. The gateways are connected to the network server via standard IP connections and act as a transparent bridge, simply converting RF packets to IP packets and vice versa. The wireless communication takes advantage of the Long Range characteristics of the LoRaÒ physical layer, allowing a single-hop link between the end-device and one or many gateways. All modes are capable of bi-directional communication, and there is support for multicast addressing groups to make efficient use of spectrum during tasks such as Firmware Over-The-Air (FOTA) upgrades or other mass distribution messages.”

You can find more information here.

What hardware is used

The hardware rollout

The LoRaWan router is powered using Power-over-Ethernet (POE). The first step was to configure the network. As the LoRa gateway will be available for public use, I seperate port on the Layer-3 switch using port isolation was used to connect this router. Furthermore, a new VLAN network was created and POE passive activated. After the configuration the “hard” part started.

Lora Wan Antenna

Lora Wan Router

Gateway configuration

The configuration the gateway is described in the official documentation of TTS or if you prefer videos I can highly recommend the videos from Alex(AEQWeb)[german].

MikroTIK

Once the router is powered on, you can connect to the network interface and configure this accordingly.

The Thing Stack (TTS)

The configuration can be done using TTS Console. Here you have to add the gateway information and do the neccessary configuration.

Test the communication with a #LoRaWAN client

The client code can be found here.

Side note: This will give you a rough overview about the software steps. In case you have not yet programmed in Arduino Studio and no experience there are several tutorials out there like e.g. randomnerdtutorial.

After uploading the client will connect to LoRa and start sending messages. The status should look somewhat like this:

Information how the device casing was created can be found at Instagram.

Lora Wan Client

And you should retrieve the information in your router and in the TTS console:

Lora Wan Router Log

Lora Wan TTS console

Gateway is public available

The gateway is now up-running and available for public use. Subesequently, range tests will follow. Wish you a lot of fun and learning using #LoRaWan!

Lora MQTT Gateway

2021-03-06 #Blog | #LoRa | #LoRaGateway

LoRa (Long Range) is a proprietary low-power wide-area network modulation technique based on spread spectrum modulation techniques derived from chirp spread spectrum (CSS) technology. More information on that can be found in Wikipedia. This protocol can be utilized to create small private LoRa networks or one can use the TTS (=The Think Stack) to utilize LoRaWan. In this post, I would like to show you how one can made a LoRa Client (=Sender) and a LoRa Gateway which will publish the incoming messages into a defined #MQTT channel using a local WiFi connection. The solution is using AES-128 encryption on top LoRa and uses a defined message format.

What hardware do you need?

Platform

You need one running MQTT broker. You can find a guide here.

Architecture overview

Before we come to the implementation of the client and the gateway, let’s check what we would like to build.

Architecture Overview


As you can see in the drawing, the LoRa client can be used to gather sensor data and send them via LoRa to the gateway in a secure way. The gateway will then forward the message to the local MQTT broker via WiFi. The consumers will then be able to get the information from the defined MQTT channel. Awesome, right? We are going to create a firmware for the LoRa client and the LoRa gateway in order to communicate to each other via LoRa. As LoRa is a public channel, everyone can send messages and of course, receive messages within the defined frequency band. So, if you do not secure your information, this can be read easily be everyone in (best case) around 15 km! With this in mind, both parties are using AES-128 encryption with a shared secret key.

Message format

Based on the idea from Alex (see his post) the message is in the following format

LORACLIENTNAME<DELIMITER>DATAATTRIBUT1<DELIMITER><DATAATTRIUB2><DELIMITER><...><DELIMITER>

The provided client sample will send a message with following format:

LORACLIENT01#Hello World!#

Lora Client

The client code can be found here.

Side note: This will give you a rough overview about the software steps. In case you have not yet programmed in Arduino Studio and no experience there are several tutorials out there like e.g. randomnerdtutorial.

After uploading the client will connect to LoRa and start sending messages. The status should look somewhat like this:

Lora Client

Lora Gateway

The client code can be found here.

After uploading the client will connect to the defined WiFi, to MQTT borker and LoRa and will start to publish messages if there are any to forward.

Lora Client

Result

The client will send in a defined interval “Hello World!” and increase the message counter. You can see this on the display on the client. The gateway will receive the message, decrypt it and forward the message to the MQTT broker and display the message a receive counter and the sender on the display.

Result

In order to check if you also receive MQTT messages you can use MQTT.fx, connect to the broker and subscribe to your defined LoRa gateway channel.

MQTTFX

Using Power Automate & Home Assistant to trigger a mailbox indicator

2021-03-05 #Blog | #PowerAutomate | #MailboxIndicator

A while back I created a Mailbox indicator. This blog post will describe you the necessary steps to trigger the mailbox indicator whenever a mail arrives in your M365 Outlook using #HomeAssistant and #PowerAutomate to talk to your mail indicator device.

What hardware do you need?

Hardware - Put the stuff together

Platform - Home Assistant

In order to run the whole thing, you need to have a running Home Assistant instance including MQTT broker. You can find several guides and howto’s like this one in the net.

Software - flash the controller

Side note: This will give you a rough overview about the software steps. In case you have not yet programmed in Arduino Studio and no experience there are several tutorials out there like e.g. randomnerdtutorial.

Home Assistant configuration

If all works well and you receive messages in the defined channel, you can do the last steps in order to add the sensor to your smart home platform.

Open the scripts.yaml of your Home Assistant instance and add following sensor to the sensor configuration:

  maibox_indicator_1_trigger:
  alias: Mailbox Indicator 1 Trigger
  sequence:
  - service: mqtt.publish
    data:
      topic: homeassistant/mailbox1/set
      payload: ha_toogle
  mode: single

Then add the sensor to your Dashboard and you’ll see something like this:

MaibloxtriggerHassio

You can then test the trigger manually and the Mailbox indicator flag should move up and down after each execution.

Power Automate configuration



MailboxTriggerFired



Congratulations, you have successfully created and configured your mailbox indicator :)

Door/Window Sensor

2021-03-04 #Blog | #Windowsensor

Do you want to create your own door/window sensor and add to #HomeAssistant.
Great! So, here we go!

Window/door sensor

What hardware do you need?

Hardware - Put the stuff together

Platform - Home Assistant

In order to run the whole thing, you need to have a running Home Assistant instance including MQTT broker. You can find several guides and howto’s like this one in the net.

Software - flash the controller

Side note: This will give you a rough overview about the software steps. In case you have not yet programmed in Arduino Studio and no experience there are several tutorials out there like e.g. randomnerdtutorial.

Mount the hardware and test

Now mount the hardware near the window in order that the switch has contact when window is closed and no contact when the window is open. Try if the defined mqtt channel receives signal, when there is no contact and when there is contact. To do this, you just need to run a MQTT software like MQTT.fx, connect to the broker and subscribe to the corresponding channel. If everything is configured properly then you’ll receive the JSON messages. In case you don’t receive messages, you have to check the wiring as well as the configuration parameters in your secrets.h. Furthermore, you can connect to the controller via putty and check the serial print for more information, add debug information to the software, etc.

Home Assistant configuration

If all works well and you receive messages in the defined channel, you can do the last steps in order to add the sensor to your smart home platform.

Open the configuration.yaml of your Home Assistant instance and add following sensor to the sensor configuration:

  - platform: mqtt
    name: "YOUR WINDOW/DOOR SENSOR NAME"
    state_topic: "homeassistant/doorzone1/alarm"
    value_template: 'Window '

After that restart your Home Assistant. Then add the sensor to your Dashboard and you’ll see something like this:

HassDashboardWindowSensor

Congratulations, you created your own window/door sensor!

Spycam

2021-02-28 #Blog | #Spycam

Today I found the time to investigate a Chinese manufactured spycam pruchased months ago on AliExpress (for around 15€). The cam is hidden in a digital alarm clock and barely recognizable.

Spycam

After powering the device with the mini USB cable, the clock shows no time. So, in order to wake the whole system up, one has to grab the smartphone and install the V380 pro app for configuring the spy. After installing the app, one has to connect to the camera directly via WIFI and add the local WIFI credentials. Once this was done, the alarm clock display shows the current time and also you can connect to the camera. Next, I installed BlueStacks, WireShark and V380 pro in BlueStacks to prepare all the tools to find how the app connects to camera. To investigate WireShark and V380 pro were started in parallel to check the network traffic. Bam, surprise (or not)!

Spycam

Although, I did not create a cloud user and gave no consensus to explicitly use cloud services the app is using a direct connection to Tencent to play show the video and play the sound. In order to break the connection, I completely blocked the discovered Tencent IP from out and inbound. Guess what, this thing is using a fallback then :-) However, I did not find a way to use a direct WIFI connection to this camera. With this configuration and the direct streaming from picture and voice from home to China and back, I cannot recommend to anyone to use this. However, will further discover, maybe there is a native way, or one can flash the cam with other firmware. The update might follow.