Posts

how to IR remote control via wemos d1 (esp8266) & mqtt & sonoff tasmota

Image
I used wemos d1 and connected like this: (source: https://github.com/witnessmenow/ESP8266-IR-Remote-Example) Receiver module is tsop38238 Transistor :  2N3904 (without it , LED is not bright enough to send IR signal) Led diode is Infrared diode. I used this library with arduiono :  https://github.com/markszabo/IRremoteESP8266 From examples  with this one:  IRrecvDumpV2.ino you can capture IR codes from the remote by pressing the remote button and it will be captured  and it generates codes like this:

Bose speaker hack (companion 5) to turn on/off automatically

Image
I have on of these Bose companion 5 speakers. The problem with it is when you don't use it actively it turns off to save energy, next time when you want to use it you should press the button on the control pod to activate it. This is a problem when you use the aux cable as input as a standalone speaker. Solution was not the easiest but it's a quick hack.  I designed a system where when an audio detected from the aux input , it Bose speakers turn on automatically to green. Here is how it goes: Tested the pins of the control pod, looks like there are different voltages supplied to the control pod. It all ends up here because I couldn't find how the audio transmitted to the main device.I had to find a way to open this: There were 2 screws at the back. It turns out it uses the same screws apple uses T5 When I opened it the top came off You need to unscrew these as well, and you have to cut the wheel, (you can glue it ba

how to connect xiomi temperature and humidity sensor to openhab without a gateway

I've a xiomi temperature and humidity sensor with bluetooth. I'm Using openhab and MQTT so it's easy to connect: 1) Create this script (xiomi.sh) : Replace BT with your sensor's mac address. You can find it with:   sudo hcitool lescan (look for  MJ_HT_V1) Change the IP address (192.168.1.100) to your MQQT server address. #!/bin/bash for pid in $( pidof -x xiomi.sh ); do     if [ $pid != $$ ]; then         echo "[$(date)] : xiomi.sh : Process is already running with PID $pid"         exit 1     fi done bt = "4C:65:A8:DC:AD:CF" sensor = "sensor" RET = 1 until [ ${RET} -eq 0 ]; do     data =$( /usr/bin/timeout 20 /usr/bin/gatttool -b $bt --char-write-req --handle = 0x10 -n 0100 --listen | grep "Notification handle" -m 2 )     RET = $?     sleep 5 done RET = 1 until [ ${RET} -eq 0 ]; do     battery =$( /usr/bin/gatttool -b $bt --char- rea
waveshare 1.44" tft lcd HAT (st7735s)  raspberry pi setup: Enable ‘SPI’ inside ‘Advanced Options’ and then ‘SPI’. You will simply get a yes/no option for the ‘SPI’ setting. Advanced Options’ section is ‘Overscan’. When asked ‘Would you like to enable compensation for displays with overscan?’ you can select No sudo nano /etc/modules add the following into the file (if the lines are not already there) spi-bcm2835 fbtft_device sudo nano /etc/modprobe.d/fbtft.conf add: options fbtft_device name=adafruit18_green gpios=reset:27,dc:25,cs:8,led:24 speed=40000000 bgr=1 fps=60 custom=1 height=128 width=128 rotate=180 sudo apt-get install cmake git and now we have the tools, we can grab the code from github, and build it cd ~ git clone https://github.com/tasanakorn/rpi-fbcp cd rpi-fbcp/ mkdir build cd build/ cmake .. make sudo install fbcp /usr/local/bin/fbcp cd ~ git clone https://github.com/adafruit/Adafruit-Retrogame cd Adafruit-Retrogame/ make sudo

Can't update macOS High Sierra

Image
You can't update macOS High Sierra? You are on 10.13.x, but the 10.13.x +1  won't install? It goes through the download and reboot, but when it is done you are still on  same 10.13 ? You can't install kext extensions anymore ? Tried downloading combo updates ? Tried installing direct downloads ? You get in the logs:  Could not create a Preboot Volume for APFS install Or you get:  Could not update Preboot Volume  well... not anymore.. You don't need to reinstall or anything. Check your /Volumes/ folder you probably will see countless preboot volumes there.. This has to be a weird mac os bug. I had 99 folders, probably can't create anymore and hence no more updates for Mac os or no more low level kernel drivers installations... What you need to do is to delete all the folders except the Preboot one. So you should end up with only 1 preboot directory in volumes directory.. Reboot, reinstall and everything s

how to install google play services to asus tinker board

Asus recently released a new version of android operating system for it's Asus tinker board.You can download the latest version from here: https://www.asus.com/Single-Board-Computer/Tinker-Board/HelpDesk_Download/ However, it comes without google play store. If you want to install google play store, there are lots of versions of it around the web, but which one will work? The correct google play version to select for Asus tinker board is this one: http://www.apkmirror.com/apk/google-inc/google-play-services/google-play-services-10-5-62-release/google-play-services-10-5-62-438-153733333-android-apk-download/ google services: http://www.apkmirror.com/apk/google-inc/google-services-framework/google-services-framework-6-0-1-release/google-services-framework-6-0-1-android-apk-download/download/ this time download the google play store from: http://www.apkmirror.com/apk/google-inc/google-play-store/google-play-store-7-7-31-release/google-play-store-7-7-31-o-all-0-pr-15

asus tinker board boot problems

Image
Recently got an Asus tinker board , flashed images but no matter it won't boot. Neither android image or debian one. Turns out the problem was with the power supply. This beast requires really a lot power. If you run into issues , try to connect a more powerful usb charger. Apple's iphone charges won't do it.