<a rel="me" href="https://mastodon.nl/@wijzeggen">Mastodon</a>
sheepfilms
Claire Keane
Aqua Utopia|海の底で記憶を紡ぐ
almost home

blake kathryn

Discoholic 🪩
Cosmic Funnies
Cosimo Galluzzi

ellievsbear
$LAYYYTER
No title available

Product Placement
Alisa U Zemlji Chuda

roma★
Mike Driver

@theartofmadeline
Game of Thrones Daily
Keni
Lint Roller? I Barely Know Her

祝日 / Permanent Vacation

seen from France
seen from United States
seen from Canada
seen from Hungary

seen from United States

seen from United States

seen from Malaysia
seen from United States
seen from Sweden
seen from United Kingdom

seen from United Kingdom
seen from United States

seen from United States

seen from Malaysia
seen from United States

seen from Türkiye

seen from Germany
seen from India

seen from Denmark
seen from Australia
@hoefnix
<a rel="me" href="https://mastodon.nl/@wijzeggen">Mastodon</a>
It is the small things that make 3D printing great. After a few years of faithful service my built-in soap dispenser stopped dispensing soap and needed a replacement.
Checking the web for a new one i was somewhat baffled over the pricing and made me wonder if I really needed a build-in soap dispenser until i noticed an Ikea SVARTSJÖN soap dispenser we used in the bathroom.
The only thing needed was a ring that fitted in the hole in my kitchen sink and the dispenser. Some work with OpenSCAD and bit of PLA was enough to create a full functioning (and cheap) replacement.
scad source
Mouse escape hatch
My cats have the nasty habbit to bring live mice inside the house and let them go (to hunt them later I suppose). Anyway my cat flap cam registered their latest victim trying to get out and I felt a bit sorry for the little animal.
According to the numerous fotos my cam sent, the mouse kept around the cat flap, maybe trying to get out the way it came in? It gave me the idea to install a mouse escape hatch (or less dramatic; a mouse flap).
It only has to be a simple flap, just a one-way opening to provide an exit for the trapped prey. Spent a little time with OpenSCAD (http://www.openscad.org) to design this.
You can find the STL on http://www.thingiverse.com/thing:1733478
Printed it with (semi)transparent PLA so that the daylight can shine through and the mouse can run ”to the light” to escape.
Now we wait....
Switching on the ventilator... part two
Now that my ventilation system has an ip-address and can be switched on through my iPhone it is not truly automated yet. I mean a remote is handy but not really automation.
What I need is that the ventilator goes in overdrive as soon as the humidity in the shower is above a certain threshold and is switched down when not needed anymore.
So what did I use: - an esp8266 (using an esp01) - humidity sensor, using a DHT11 - a power supply (only had a 5V so I used an additional step down converter 3.3V to bring the voltage down to acceptable levels)
What does the device do: 1. every two minutes it checks the DHT11 and gets the humidity and temperature. If compares the humidity value with the threshold and if above it calls the ventilator with the “on” command. If below… well unsurprisingly it send the off command.
2. Since it is always fun to have graphs, every five minutes it sends the temperature and humidity to thingspeak for future use.
The hardware is straighforward, just connecting the components. The scripts are not really rocket science too but héy its the sum of the total that counts.
The init-script
The measuring-script
Thats it, it worked in real life yesterday...
Adding WiFi to my home ventilation system
My home is equipped with an mechanical ventilation system intent to circulate fresh air using ducts and fans. not connected to heating or anything, the single purpose is to provide a constant airflow to optimise the inside air quality. A ventilator always runs in the background but can also run at a higher speed to provide some extra capacity while showering for instance.
The problem is that the control switch for the ventilation is in my kitchen, two floors down from the bathroom. Despite the fogs at long showering sessions I have never seen any family member (including myself) run down the stairs to turn up the ventilation before and after showering. The nice result is that I have to repaint to walls every year with fungus killing wallpaint to prevent growth like this.
So it would be nice to have the control also upstairs but the wiring is in de walls and the easiest solution is a remote control of sorts.
esp2866 to the rescue
…or how to add WiFi to a ventilator
Although I do have a raspberry pi based solution for switching the lights with my phone, based on a 433MHz transmitter I wanted to have something more reliable and above all, a way to check the status of the switch. I read some positive blogs about some cheap tiny WiFi modules (esp8266) with GPIOs that can run scripts and thought that might do the trick. Since they are cheaper than the parking fees for parking 5 minutes in my city I ordered a few because well… always nice to have some spares in case i kill some.
ESP8266 offers a complete and self-contained Wi-Fi networking solution, allowing it to either host the application or to offload all Wi-Fi networking functions from another application processor.
After some experimentation I settled on NodeMCU as my firmware of choice. Thanks to the excellent Quickstart Guide I got my first esp up and running in no time. That settled, what do I want my esp to do?
Basically I wanted to replace this switch with something I could control with my iPhone, add it to the remote I made for my lights.
The ingredients:
an old 5V phone charger
esp8266 esp01
DCDC stepdown 3.3V module
a high level trigger 1-channel relay module
A bit of soldering gave me this
Just the esp01 with the 3.3V step-down and some leads to relay and power supply.
The trick is in the programming. The NodeMCU firmware launches the script init.lua at boot-time and and mine contains the basic network stuff.
init.lua
The last line calls the script that does the actual “smarts”. What does it do?
listen for a http get command: http://youripadress/?aan (“aan” is Dutch for “on”) should switch the ventilator on, http://ipadress/?uit should switch it off.
auto-shutdown: knowing my family members… they will not switch the ventilation off after showering so I decided that it should turn itself of after a while to prevent it being on for the next 24hrs
So, I decided not to give it a gui of its own but let it respond to http calls. This makes it easier for me to add the device to my php-based remote I already had written to control the lights in my home.
ventilator.lua
Na mijn verwarming heeft mijn mechanische ventilatie nu ook een IP-adres. #esp-01 #esp8266 #diy #iot (bij Capelle aan den IJssel)
Wat zal ik nu eens gaan maken met m'n nieuwe zending #esp8266
Retro media centre - part 2
After some fitting the case now contains a small amplifier, a 5V power supply and a HDD to store some media.
Because the Pi doesn't have enough power on the USB ports to power a decent harddisk I decided to power the HDD directly from from the power supply by cutting the USB cable, leading the power leads to the supply and only connect the datalines with the Pi.
I reused the original (more than 50 years old) speaker with the amplifier which gives suprisingly good sound. The speaker will be used when the connected TV is off and the radio plays some web streams or when a source is connected to the line-in i made on the back.
The software:
OSMC open source media centre software based on debian and kodi (https://osmc.tv)
BTSync. The Pi is outside my network (outside the country as matter of fact) and to sync media files like movies and series episodes with my NAS Bittorrent Sync (https://www.getsync.com) is used.
Some scripting in Python to recreate the fuctionality of the old station dial (will be covered in part 3)
Retro media centre - part 1
I found this cute tube radio with a lot of wear and tear, dust, grime and paint spots but most importantly a really beautiful design. I was looking for something like this to create modern day mediacentre that plays web radio and HD movies but… the original looks should remain the same.
Main ingredients: - Raspberry Pi B - 500GB USB harddisk - Small Class-D amplifier
Since I am not interested in a power hungry AM radio I had no need for the original electronics and the first order of business is to clear the radio from unwanted components.
And yes, i understand that some people want to crucify me now for lobtimizing a 1950’s radio but to my defense, it was dead a long time allready.
The basis will be a Raspberry Pi to handle the smarts but should be sorta standalone so it will need to have an amplifier. The amp should be able to handle the sounds coming from the Pi, line-in and bluetooth. To switch between the sources I plan to use the original (AM, LW, MW) band-switch.
The original switch was rather ingenious made but not reusable so I needed to tweak the remaining components to fit on an oftheshelf 3S4P switch. Same with the pot. I has a nice clicking on/off switch that i wanted to preserve but also able to controll the new amp volume.
Monitoring the doorbell
I thought it would be fun if I would get a text message with picture every time someone presses the doorbell. It woud be nice if the currrent doorbell was not affected and no obvious cameras would be visible.
First of all I needed to get the Pi noticing a keypress. There are numerous walk throughs to help you on your way like this one. Problem is that although i do have a momentary switch at my door, it is connected to a 8V AC circuit with the bell and a certain way to fry your Pi is to put 8VAC on a GPIO pin.
So to separate the circuits I needed a relay or something that switches when someone uses the bell. I happened to have some left over solid-state relays (G3MB-202P) from other projects so that shouldn’t be a problem except for the fact that need an DC current. Ah well, who hasn’t have some bridge rectifiers in their drawers.
All in all the schematic of my interface looks like this:
which translates in this
so, when someone presses the doorbell the relay will activate the switch and connects pin 18 and 20 (GPIO24, GND) and than we are at where the earlier mentioned example talked about and can we do some of the programming…
When i came across a so called endoscopic camera I thought that would make the perfect camera for this purpose. Ordered from hong kong these things are very cheap (< 10 euro’s) and are waterproof, small and acts like just a standard USB webcam so it works great with fswebcam (sudo apt-get install fswebcam).
I used a python script that waits for the doorbell and takes a foto using fswebcam when needed. I used python interrupts but you can use of course a polling mechanism to achieve this.
fswebcam uses a confuguration file, this is mine
The last step is how to get the image on your phone. This can be done on many ways but the most easy and failsafe way to do that is to use one of these services.
Pushover
pushbullet
Telegram
I like to use Telegram for all communication between my phone and the Pi’s. If Telegram-cli is running in the background all you need to do after taking the picture is send it on its way with the command:
echo send_photo Someone_Ontelegram /var/tmp/deurbel.jpg | nc 127.0.0.1 1208
And enjoy pictures like this
Needed an extra line-out
my TV’s internal speakers don’t give the best sound and for ages I have connected my TV to a simple 2.1 amplifier. When i got a new cable-box i had a little problem; with old one i could change the volume on the cable-box itself with its remote, the new one just gives a signal over hdmi and he only volume that can be remotely changed is the sound over the internal TV speakers. So if I really wanted to change the volume remotely I was left with two options, either train my kids to change the volume on the amp or somehow rewire the TV so that the signal to the speakers is sent to the line-out. I choose the second solution because well…
The signal level on the leads to the speakers is to high to send to the line-in of the amplifier so I needed a way to bring down this level. After some googling i discovered that you only need a few resistors. In it’s most simplest form it looks like this.
Should be easy, but it is a fixed circuit and in case the needs change I would have to redo it. Better do it right from the start and use a variable resistor; potmeter. It saves me from calculating the right values of the resistors and can tune the level ‘by ear’.
checked my drawers and found that i had two 5K pots (left and right) and some connectors and switches so that i would be able to toggle between line-out mode and speaker mode (one never knows)
OK, let’s heat up the soldering iron and open up the TV to see what we have.
fortunately there was room for a side-panel for extra options for the more luxurious model I obviously don't have. The pots, fitted fine and there was room enough for the RCA jacks and switch.
with some careful drilling holes in the right places i came to this configuration. preparations done i could cut the wires to the speakers and connect them with the pots and RCA jacks.
final step is of course test-driving the whole setup.. and it worked like a charm
the only thing left is to tap down the wiring, check of everything isolated and put back the casing of the TV.
when looking at it back on the wall one might think it always has been there and more importantly, no need for extra remotes or standing up.
Raspberry Pi interface for 433MHz outlets
A lot of tutorials deal with connecting a 433MHz transmitter to your Pi. However, opening a terminal on your phone to use the command line to switch on a lamp is no fun. What I wanted was to have an app or something on my iPhone to make my phone behave as a remote.
In order to be as generic as possible i decided to use php to create an interface.
What do you need; a working raspberry pi with WiringPi, 433Utils and Apache installed. Other webservers undoubtebly will work too but i didn’t test this on those servers.
The basics for a remote are simple, you need a way to run ‘codesend’ (433Utils) from a webpage. I use PHP to do this using the PHP shell_exec command like this:
shell_exec(‘sudo /home/pi/433Utils/RPi_utils/codesend 123456‘);
a working example:
<?php if ( isset($_POST['remote']) ) { shell_exec('sudo /opt/433Utils/RPi_utils/codesend '.$_POST["remote"].'> /var/tmp/remote.log'); } ?> <!DOCTYPE HTML> <html> <body> <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post"> <button type="submit" name="remote" value="4128960" />on</button> <button type="submit" name="remote" value="4128768" />off</button> </form> </body>
What this does is draw the buttons on the screen. If one of the buttons is pressed the form calls itself but with the parameters. If $_POST has the value “remote” it will execute the codesend program with the value as defined in the pressed button.
note:
due to the fact that access to the gpio pins requires root privileges you have either to grant apache root privileges or you will have to add codesend to the /etc/sudoers file (more).
Deze onmogelijke combinatie van stijlen veroorzaakt een kortsluiting in mijn hoofd
The only way to keep him from my keyboard is to put a box on my desk
Fijne kerstdagen en een gelukkig 2014
Nou is Sinterklaas weer in het land maar had niet verwacht dat Rik en Leanne hun schoen nog zouden zetten