62

This is the main project my Raspberry Pi is dedicated to right now, so I figure I can add my two cents. Keep in mind this project is still very much a work in progress. I chose to use the C programming language for this project exclusively on the Raspbian OS, and that may have affected some of my decisions and instructions. I'm going to only list free and ...


15

SainSmart sells Arduino relay modules (shields), they could also be used on Raspberries. There are different models (higher amperage, number of outputs, etc). For example SKU:20-018-100-FBA can be used for "equipment with a large current". And a useful article discussing Using the Raspberry Pi to Control AC Electric Power that mentions the SainSmart.


13

You could use mpd, pulseaudio and raop2 module, if necessary: mpd for managing playlists, library, etc (sudo apt-get install mpd) pulseaudio for managing audio outputs: raop for AirPlay, or any other output device such as analog jack, HDMI, http streaming service, etc (sudo apt-get install pulseaudio) raop2 module for pulseaudio if the original raop module ...


7

Finally! I found it after almost two months after trying out every minor change in configuration and peripherals/accessories every day. It turned out to be a USB extension cable issue. I was using a 3 meter USB extension cable, which was not having noise filter. When I replaced the same with 5 meter cable with Noise Filter on both sides, everything works ...


6

Relays are pretty safe to use without any special isolation like optocouplers. The reason people recommend optocouplers in DIY projects... well because its DIY and an optocoupler is safer in case of something going wrong. The input pins power a coil and push or pull a lever using some kind of snap hinge to eliminate bounce and sparks. So you are already ...


6

You'll need just two things: Make use of the GPIO pins Using the GPIO port of the Pi is possible with numerous libraries for all significant languages. Finding one that interfaces well with Python or C is no trouble at all. Just have your pick, e.g. pigpio WiringPi Libraries for interfacing with the GPIO Use a relay to control the 12V power line A ...


5

I went with pocketsphinx_continuous and a $4 sound card. To manage the fact that it needs to stop listening when using speech synth I used amixer to handle to input volume to the mic (this was recommended best practice by CMU as stop-starting engine will result in poorer recognition) echo "SETTING MIC IN TO 15 (94%)" >> ./audio.log amixer -c 1 set ...


5

Let's break this answer in two parts: scheduling a task and turning a led on and off, than wrap together. You can go to the end and just get the script if you prefer! Scheduling a task So I would suggest you use the atd for one time scheduling in Raspbian. If you need something repetitive, use cron - I will cover here only how to use the at command. More ...


4

The right device is /dev/ttyAMA0 Make sure that the openHAB process has sufficient rights and that Z-Way (if installed) is stopped (/etc/init.d/Z-Way stop). Because of the uncommon name of the Device, you have to tell openHAB at startup that this is a RXTX device - append -Dgnu.io.rxtx.SerialPorts=/dev/ttyAMA0 to start.sh (or start_debug.sh) That ...


4

My answer to a related question and some of the other discussion on the following may prove instructive. https://raspberrypi.stackexchange.com/a/9561/8697 The simple answer is NO. The reason domestic power is higher voltage (110/230v) is to reduce losses, and this is only distributed over relatively short distances (a couple of km at most). In telephone ...


4

If I remember correctly, Tk needs a window manager, so you probably need to export the DISPLAY variable. Try setting DISPLAY=:0.0 before running your script.


4

You can achieve each of those things with Python on the Raspberry Pi. The key is in the Raspberry Pi Python library support for GPIO peripherals. For help on a particular sensor search for raspberry pi Python sensor name. Most of the sensors you mention are digital (return 0 or 1) and may be directly connected to the Pi provided their voltage is 3V3 ...


3

A relay is an electro magnetic, mechanical switch. You should not power a relay directly from GPIO because relays use allot of power to pull and hold the switches, plus there is risk of feedback that can cause damage to the GPIO. You need to use Diodes to prevent this and have a reliable power source, which the Pi does not really have. It is easier to buy ...


3

Create an account at ANY Dynamic DNS server website. I used dnsdynamic.com as example for simplicity Open a terminal on your Raspberry Pi and install the update service: sudo apt-get install ddclient You can type in settings during the wizard or just press enter. We will edit the configuration file any way. Edit the configuration file /etc/ddclient.conf ...


3

Yes. use PocketSphinx for speech recognition, Festvox for text to speech (TTS) and some USB audio with line in (or an old supported webcam which also has line in). Google searches for these software packages and "Raspberry Pi" provide many examples and tutorials to set this up.


3

SiriProxy - Only use this if you have a device that uses Siri - you don't need to jailbreak anything. It basically intercepts Siri on the network you install it on. Speech2Text - You can use Googles API to decode speech to text but the example contains some other methods too. Julius - A speech recognition decoder. As pointed out by Lenik, you will need ...


3

There may be radio frequency bands in your country where very low power unlicensed radio emissions might be permitted (FCC Part 15 rules in the U.S.). However an unfiltered GPIO output won't broadcast in only one RF band. The GPIO transmitter trick uses a periodic digital output to produce a radio signal. This is due to one of Fourier's theorems which ...


3

It sounds like you are wanting to wire the wall switch and the relay as a three-way switch arrangement. This way, if the relay has the light turned on, flipping the wall switch will turn it off, and vice versa. You could wire a single-pole double-throw relay to work as a 3-way switch, and install a 3-way switch in the wall (if it isn't already a 3-way switch)...


3

As a stage light technician, I would recommand to search about DMX512. DMX512 is the light control standard protocol, working on XLR cables (3 pins or 5 pins). The point is, it is really easy to find DMX controlled dimmers.


3

Thanks to Roberto's answer I began searching for information about DISPLAY and that particular part of my error. Where I found this page: https://stackoverflow.com/questions/2801882/generating-a-png-with-matplotlib-when-display-is-undefined For those interested the issue was in dblogger.py with matplotlib's default display back end. Before: #!/usr/bin/...


3

You can use my piscope to check reception and transmission. It is best to run piscope on a Linux machine networked to the Pi but it'll probably give acceptable performance when run directly on a Pi2 or Pi3. piscope requires the pigpio library to be installed and to have the daemon running on the Pi (sudo pigpiod). If your transmission uses Manchester ...


3

I suggest you try with my example DHTXX code. Extract the zip to a directory and then compile/link with gcc -Wall -pthread -o DHTXXD test_DHTXXD.c DHTXXD.c -lpigpiod_if2 The start the daemon sudo pigpiod and run the code /DHTXXD -g4 # assuming you are using Broadcom GPIO 4 pigpio is pre-installed on recent Raspbians, otherwise try sudo apt-get install ...


3

If I turn the software into a daemon will that work? Yes. The problem is possibly two-fold: First, if you exit a remote shell with a process running in the foreground, that process will die right away. MobaXterm looks like it's more of a complete remote desktop, so analogously, if this is a GUI application, that will die when you close the remote desktop....


3

To me it seems a lot easier to connect the pi outside your existing relay - essentially making the pi work as just another switch in parallel with the other ones on the circuit you want to control. This way you can use your existing bi-polar relay board. simulate this circuit – Schematic created using CircuitLab This will save you the trouble of ...


3

Why not add a reservation to your phone/s ip address and simply do a ping via a cron job every few minutes. #!/bin/bash HOSTS="x.x.x.1 x.x.x.2" COUNT=10 for myHost in $HOSTS do count=$(ping -c $COUNT $myHost | grep 'received' | awk -F',' '{ print $2 }' | awk '{ print $1 }') if [ $count -eq 10 ]; then # 100% response ...


3

PhoneHome My phone acts differently, as all phones has some difference. A ping response only happens if the phone is awake. If the Pi is rebooted and the phone is in sleep mode, multiple pings will place its ip and mac addresses in the arp table, with 100% packet loss. I just learned that the arp command is obsolete, ip neighbor is used now. pi@RPi0:~ $ ip ...


3

You are going to need an internet connection, an OS, (I suggest Raspbian) and a microphone. The first step is to get the microphone set-up. Start by opening a terminal window and running lusb. This lists all of the USB devices connected to the Pi and the microphone should show up. Next the volume for the mic needs to be set to high, so run alsamixer. You ...


3

The resistance of the cable is irrelevant in this case. Telephone cable would be suitable. The configuration of switch in http://elinux.org/RPi_GPIO_Interface_Circuits is the most appropriate. You could use internal pullup, but I would recommend using resistors. Either NO or NC is suitable, just adjust your logic to suit. I recommend you select a pin ...


3

I think I found what you are looking for : In this exemple, we see that two switches are controlling one lamp, so toggling one of these switch will toggle the lamp. In your case, you need to consider your relay as the first switch, and your pre-existing switch as the second one. Image taken from : https://diy.stackexchange.com/questions/31632/wiring-a-...


3

The double switch method (also called a staircase switch) would be preferable, as it's easier to integrate with existing wiring, but it leaves your Pi without knowledge about the state of the load. As I see it you have two options: Make the switch pull an input high or low on the Raspi, which you then use in your code to control the lamp or other load ...


Only top voted, non community-wiki answers of a minimum length are eligible