Skip to content

Instantly share code, notes, and snippets.

@shiyazt
shiyazt / Client_Side_RPC.py
Last active May 9, 2024 09:15
This Section illustrates the Client Side and Server side RPC (Remote Procedure Call) in ThingsBoard IoT Platform. Client_Side_RPC.py : This program will illustrates the Client side, RPC Server_Side_RPC.py : This Program will illustrates the Server side RPC and Temperature_Controller_Server_Side_RPC.py : This program illustrates Server side RPC u…
# This Program illustrates the Client Side RPC on ThingsBoard IoT Platform
# Paste your ThingsBoard IoT Platform IP and Device access token
# Client_Side_RPC.py : This program will illustrates the Client side
import os
import time
import sys
import json
import random
import paho.mqtt.client as mqtt
@shiyazt
shiyazt / GPS_API.py
Created August 27, 2018 14:25
Real Time GPS Tracking on Google maps using Raspberry Pi and Thinkspeak Cloud :: Raspberry Pi send GPS value to the Thinkspeak cloud for every 60 seconds and a javascript will fetch data from cloud and post it on Google Maps
# This File consists of API calls for the GPS Parsing Functionality.This section parse the GPS values from the GPS Module.
# pynmea2 is Python library for parsing the NMEA 0183 protocol (GPS). To get that thing : pip install pynmea2
import threading
import pynmea2
import os
class Message:
def __init__(self):
self.msg =''
@shiyazt
shiyazt / ThingsBoard_Telemetry_Test.py
Last active August 7, 2019 11:32
This Program is the sample program to Test data with ThingsBoard IoT Platform
# Replace ThingsBoard IoT Platform Server IP and Access Token
# This Program will send dummy data (Temperature and Humidity datas) to ThingsBoard IoT Platform at the interval of 5 Seconds.
import os
import time
import sys
import json
import random
import paho.mqtt.client as mqtt
@shiyazt
shiyazt / node_nginx_ssl.md
Created July 9, 2020 16:42 — forked from bradtraversy/node_nginx_ssl.md
Node app deploy with nginx & SSL

Node.js Deployment

Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt

1. Sign up for Digital Ocean

If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a

2. Create a droplet and log in via ssh

I will be using the root user, but would suggest creating a new user

@shiyazt
shiyazt / nginx-thingsboard
Created April 26, 2021 09:39 — forked from mfalkvidd/nginx-thingsboard
Thingsboard nginx reverse proxy with websocket and HTTPS support (Let's Encrypt)
server {
listen 80;
server_name EXTERNAL_THINGSBOARD_DOMAIN.com;
if ($scheme != "https") {
return 301 https://$host$request_uri;
} # managed by Certbot
}
server {