Pi 4 Channel Relay

Forums:

Project:PiACC - Relay Controller

Started On:10/22/2018

Upated On:

10/27/2018: BT host is now working to control relays via GPIO. (testing on p3, not pi zero yet)
I currenlty have 4 channel toggles a,b,c,d to match the four 10amp relays via gpio.
"o" triggers outer relays,"i" triggers inner relays, "p" triggers plow lamp relay,
"a" triggers all relays on (1 sec wait), "x" triggers all off (1 sec wait) and q triggers client close with socket restart (disconnect).
I have not written the toggles, so there are also matching numerics 1=on, 2=off, 3=on, 4=f.. etc.
I will be writting an If on, toggle off... if off, toggle on.. for brevity..


10/7/2018: Updated py src.
Intent: To create a viable under-hood BT relay controller that can be leveraged by the piACC console unit.
Access:Web Server - Flask monitoring local address 0.0.0.0:[port tbd]
Console:Chrome browser in kiosk mode.
Device:
Raspberry Pi 3 - piACC Console.
The console pi will operate as the main controller with an entrance module to control standard button clicks via BT.
Raspberry Pi zero - Relay Controller
The pi zero will operate as the lamp bar relay control using blue tooth encrypted commands sent from either mobile device or the console.
pi HAT: Four 10 amp relays will control the accessories. Current config will be the two outer, two inner and plow/emergency flasher lamps.
Robogaia.com - 4x10a Raspberry Pi Plate v3

Steps taken to date: 10/24/2018

Installing blueman and python drivers
src:ElectronicHobbyists.com
1.sudo apt-get install bluetooth blueman bluez
2.sudo reboot
3. sudo apt-get install python-bluetooth (this actually said selecting python-bluez on install)
4. sudo apt-get install python-rpi.gpio

One step that I will do differently is encrypting the transmission based on the mac address of the incoming connection.
Python code: (btctl.py)... Become a Patron!This page is being written. Become a patron to get a preview.