Erfahre in meiner Fallstudie, wie ioBroker zur Hausautomation genutzt wurde. Entdecke die Implementierung, Konfiguration und Automatisierung!
WEATHERMAN-1 … die perfekte Wetterstation für die Hausautomation | STALL
Z-Wave Alliance, Der Raspberry Pi, ein preiswerter Mini-Computer, der die Welt der IT-Entwickler im Sturm eroberte, kann noch smarter wer…
Build Instructions – Part 3: Sensors & Housing Note: This is the third tutorial in a series providing detailed build instructions for a DIY data logger based on a Pro Mini style Arduino board.…
Using the SANE Software
Anleitung wie man die WLAN Module richtig benutzt und mit Arduino programmiert
Hast du dich schon einmal gefragt, wie der Aufbau von ioBroker aussieht? Was sind Hosts, Objekte, Adapter und Instanzen? Ich erklär's dir!
Rain Sensorm
Pulling the power to your Raspberry Pi can cause image corruptions & other issues that can damage your Pi! In this article, we will create a small push button that will work as a ‘Safe-Shutdown’ option. We’ll connect it to our Raspberry Pi using the GPIO pins and some jumper wires, and with a few lines of code, we will have our own power switch! First, we are going to look at a simple way to wire a button to the Pi GPIO connector. We will then write a python script that will shut down the Pi safely. The final step will be to setup the Pi so that the button will work all the time. Let’s Get started! What you will need: Raspberry Pi B+ (Any Pi will work Just make sure you check the GPIO pins) Tactile Switches Female/Male Extension Jumper Wire Packs Solderless Breadboards The Circuit To do this we will wire the button to GPIO Pin 26(Yellow wire) and to ground (Green wire). This configuration is called an Active Low button, this means that when the button is pushed it will have no voltage or be logic low. The Pi has pull-up resistors on its GPIO pins so wiring active low mean we do not need to add an external resistor. Make sure you are extremely careful with the wiring here as shorting the wrong pins together can kill your Pi. Which is why I now have a Pi-shaped coaster. The Script from gpiozero import Button #import button from the Pi GPIO library import time # import time functions import os #imports OS library for Shutdown control stopButton = Button(26) # defines the button as an object and chooses GPIO 26 while True: #infinite loop if stopButton.is_pressed: #Check to see if button is pressed time.sleep(1) # wait for the hold time we want. if stopButton.is_pressed: #check if the user let go of the button os.system("shutdown now -h") #shut down the Pi -h is or -r will reset time.sleep(1) # wait to loop again so we don’t use the processor too much. We are going to use three external libraries: The button module from the gpiozero library, this library gives easy access to programming the GPIO on the Pi. The time library, so we can wait in human time. The os library gives us the ability to shut down the Pi (You can also use this library to run any terminal commands!). We first create a button object that lets us interact with the button. We will give this function the input of GPIO number we attached the button to 26 in our case. By default, this function assumes active low buttons so we do not need to change anything else. We want this program to be running all the time so that when we press the button after a week-long retro gaming session it will still work. To do this we create while True loop that will keep running forever. Inside the loop, we have two if statements the first will detect a button press then trigger the code to wait for a second then check and see if the button is still held down. The last line tells the loop to wait 1 second before checking the button again, we are not in a hurry, so we can wait for presses. Make sure you include this wait without it python will run this script as fast as it can and that will put unnecessary load on the CPU. You can now run this program and test it because we are using the os command we need to run this script as sudo as well. sudo python /home/pi/piShutdown.py though make sure you save all your work first! Making It Work So that our button will work we need to tell the Pi to run the script on start-up. To do this we modify the rc.local file, In essence, rc.local is a to-do list the Pi follows as it starts up. In order to add more items to this list, we need to edit it. rc.local is protected by the operating system so we need to open, or do, it as a Super User (sudo). I am going to use leafpad to edit rc.local because I am not hacker enough to use nano. sudo leafpad /etc/rc.local Into rc.local we are going to add a command to run our shutdown script we will add this on the line before exit 0 as shown. sudo python /home/pi/piShutdown.py &exit 0 It is very important to remember the ‘&’ at the end this tells the Pi to run this program in the background. If you do not do this it will wait for the infinite loop to finish before moving to the next item on its to-do list. Save the file and exit if you are using leafpad you can use the menus. This last step can also be done with crontab a built-in scheduler for the Pi(and all Linux distributions! ). All done! Reboot your Pi and you should have a Safe Shutdown button that works! If something didn’t work quite as you expected or you want to investigate using alternate logic for your switch, get in touch with us and ask the questions. We’re here to help!
ESP12E bzw. ESP8266-Tutorial mit Beispielprojekt für WLAN-Temperatursensor in Solarlampe und komfortabler ESP12E-Adapter Bauanleitung für diverse Projekte
In this tutorial i am going to teach you how to control speed and direction of dc motor using nodemcu WiFi module and l293d motor driver. Nodemcu will serve a web page on your mobile, desktop, laptop or notebook web browser. Web page enlists the dc motor controls. User can control the rotation speed of…
🛑 Regeln mit ioBroker erstellen ist dank Blockly wirklich sehr einfach. Hast du Lust, dass ich dir zeige, wie das funktioniert? Ich schon!
APDS-990 gesture sensor
Was ist ioBroker? Dieser Frage gehe ich in diesem Beitrag nach. Er ist der Einstieg in eine neue smarte Themenwelt in meinem Blog.
How to Build Your Own Anemometer Using Reed Switches, Hall Effect Sensor and Some Scraps on Nodemcu. - Part 1 - Hardware: Introduction Since I started with the studies of Arduino and the Maker Culture I have liked to build useful devices using junk and scrap pieces such as bottle caps, pieces of PVC, drink cans, etc. I love to give a second life to any piece or any ma…
Introduction I've had a desire to learn to work with Raspberry Pi since, like, forever. What better way to learn it than by trying out some DIY project? One of the most popular ones I've found around is brilliant Magic Mirror by Michael Teeuw: it's a mirror that displays some useful info (in.e. time, forecast,…
Ein eigenes Energieflussdiagramm erstellen geht mit dem Adapter Energiefluss-Erweitert für ioBroker. Ich zeige dir, was dahinter steckt!
Nachdem ich mit der ersten Version meiner VIS nicht mehr zufreiden war, hab ich mich daran gemacht, alles einmal komplett neu zu machem. Die Seiten sind alle fpr mein Galaxy Tab A erstellt worden. Vielen Dank an @Annuit20 , der ebenfalls seine komplette V...
Ich erkläre dir an einem Praxisbeispiel, wie du Geräte in ioBroker einbinden und was du mit den Datenpunkten machen kannst. Los geht's!
ioBroker Blockly, ein Rätsel für sich? Nicht mit dieser umfangreichen Übersicht aller Blöcke in ioBroker, die du nutzen kannst!
Mit 3 einfach umzusetzenden Tipps zur perfekten ioBroker Visualisierung. Ich zeige dir, worauf es bei der Steuerung des Smart Home ankommt.
Warum ioBroker nicht einfach ist und welche Tipps und Tricks es zur Unterstützung gibt. Ich gebe dir professionelle Tipps für dein Smart Home.