Skip to content

prichardsondev/ioct

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Welcome to ioct 👋

Version Documentation Maintenance License: ISC

Description

Raspberry Pi IoT Server using Express an Sockeio to control and view state.

Three basic parts

app.js and index.html - Raspberry Pi/Arduino Communication via Xbee radios to toggle remote arduino pin

app1.js and index1.html - Raspberry Pi/Arduino Communication via Xbee radios to set state of Neopixel (RGB LED)

app2.js and index2.html - Raspberry Pi communication with relay switch directly connected to Pi... Add xbee radios or similar to put distance between Pi and remote modules

expressjs.com - serve html page to control/view state

socket.io - messages between server (app.js) and client (index.html). Keeps all versions of client insync with state of backend (in memory js object). Is the pin on the arduino high or low (relay, reed, anything open or closed).

serialport.io & npm xbee-api - listen for state of remote xbee radios - fires socket.io.emit to inform clients. Also sends state change request to remote radio.

nginx.com can be used as a reverse proxy listening on 80 and forwarding to port your app is running on (3000 in this example)

dataplicity.io or balena.io can be use to expose port 80 to the world - I use/like both. dataplicity is quicker to get up and running.

Video Overview

https://www.youtube.com/playlist?list=PLlnL61QfD9UYIwgd6Mcop2GcvYHXWT2rP

Xbee Radios

See this link to set up your radios in api mode. Then just add the two settings in pic to your router. https://www.youtube.com/watch?v=LgwM6YWz_Fw

Remote Arduino Xbee Setup

Install nodejs on your Raspberry Pi

https://thisdavej.com/beginners-guide-to-installing-node-js-on-a-raspberry-pi/

Install

Note: this was designed to run on Raspberry PI but could work anywhere you have node installed

cd pi
npm install

Run

npm start
browse to localhost:3000

Run tests

npm run test

Author

👤 prichardsondev

🤝 Contributing

Contributions, issues and feature requests are welcome!
Feel free to check issues page. You can also take a look at the contributing guide.

Show your support

Give a ⭐️ if this project helped you!

📝 License

Copyright © 2020 prichardsondev.
This project is ISC licensed.


This README was generated with ❤️ by readme-md-generator

About

Raspberry <=> Arduino Using Xbee Serial Communitation. Nodejs, Express and Socket.io

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published