- Make forwarder as a service that only forwards messages from mqtt to backend
- Make raspberry pi mqtt client
- Make client component, that uses raspberry client code listening on mqtt protocol
- Add update raspberry pi client to flask app
sudo apt-get -y install build-essential libssl-dev libffi-dev \
libreadline-dev libbz2-dev libsqlite3-dev libncurses5-dev
sudo apt-get install python3-dev
or
sudo apt-get install python-dev
pip3 install -r requirements.txt
sudo apt-get install postgresql postgresql-contrib
CREATE TABLE devices_id (
id serial primary key,
device_name character varying(30) DEFAULT NULL::character varying,
ip character varying(30) DEFAULT NULL::character varying,
mac_addr character varying(30) DEFAULT NULL::character varying,
location character varying(30),
active boolean,
sensor_id character varying(30),
client_id character varying(30),
details jsonb
);
CREATE TABLE measurements (
"timestamp" timestamp with time zone,
event character varying(30),
measurement jsonb,
device_id integer
);
domain:8080 (ws, http)
domain:8181 (wss, https) (in future)
domain:1883 (mqtt)
curl -H "Content-Type: application/json" -d '{"procedure": "PROCEDURE_NAME", "args": ["args", "args"]}' domain:8080/caller
curl -H "Content-Type: application/json" -d '{"procedure": "PROCEDURE_NAME"}' domain:8080/caller
curl -H "Content-Type: text/plain" -d 'fresh webhooks!' http://domain:8080/webhook
curl -H "Content-Type: application/json" -d '{"topic": "logs", "args": ["Hello, world"]}' http://domain:8080/publish
http://domain:8080/code/main.py
http://domain:8080/git_webhook