This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
image: node:latest | |
stages: | |
- release | |
deploy_production: | |
stage: release | |
only: | |
refs: | |
- master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
branches: ['master'] | |
ci: true | |
debug: true | |
dryRun: false | |
tagFormat: '${version}' | |
# Global plugin options (will be passed to all plugins) | |
preset: 'conventionalcommits' | |
gitlabUrl: 'https://gitlab.com/' # your gitlab url | |
# slackWebhook: 'https://slack.xxx.com/hooks/q3dabbqc6yjyg9x6616o3atgkkr' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const main = (app, client) => { | |
/* GET home page. */ | |
app.get('/', function (req, res) { | |
res.render('index', { | |
title: 'nodejs-tasmota' | |
}); | |
}); | |
app.get('/control/on', function (req, res) { | |
const fullTopic = `tasmota/cmnd/tasmota-1/POWER` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title><%= title %></title> | |
<link rel="stylesheet" href="/stylesheets/style.css" /> | |
</head> | |
<body> | |
<h1><%= title %></h1> | |
<p>Welcome nodejs-tasmota</p> | |
<button id="butt_on">เปิด</button> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const createError = require('http-errors'); | |
const express = require('express'); | |
const path = require('path'); | |
const cookieParser = require('cookie-parser'); | |
const logger = require('morgan'); | |
//------------MQTT section------------// | |
const mqtt = require('mqtt') // import mqtt connect | |
// mqtt configuration | |
const mqttConfig = { |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- phpMyAdmin SQL Dump | |
-- version 4.2.12deb2 | |
-- http://www.phpmyadmin.net | |
-- | |
-- Host: localhost | |
-- Generation Time: Dec 16, 2019 at 06:38 PM | |
-- Server version: 5.5.42-1 | |
-- PHP Version: 5.6.5-2 | |
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- phpMyAdmin SQL Dump | |
-- version 4.2.12deb2 | |
-- http://www.phpmyadmin.net | |
-- | |
-- Host: localhost | |
-- Generation Time: Dec 16, 2019 at 06:38 PM | |
-- Server version: 5.5.42-1 | |
-- PHP Version: 5.6.5-2 | |
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var mqtt = require('mqtt'); | |
const MQTT_SERVER = "Your Server Address"; | |
const MQTT_PORT = "1883"; | |
//if your server don't have username and password let blank. | |
const MQTT_USER = ""; | |
const MQTT_PASSWORD = ""; | |
// Connect MQTT | |
var client = mqtt.connect({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <lmic.h> | |
#include <hal/hal.h> | |
#include <SPI.h> | |
// LoRaWAN NwkSKey, network session key | |
// This is the default Semtech key, which is used by the early prototype TTN | |
// network. | |
static const u4_t DEVADDR = 0x018796ad; | |
//Set network session key | |
static const PROGMEM u1_t NWKSKEY[16] = { 0x5f, 0xe9, 0x61, 0x37, 0x4b, 0xe8, 0xaf, 0xb2, 0x1a, 0x7a, 0x44, 0xeb, 0x8d, 0xb5, 0xff, 0x07 }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[general] | |
# Log level | |
# | |
# debug=5, info=4, warning=3, error=2, fatal=1, panic=0 | |
log_level=4 | |
# The number of times passwords must be hashed. A higher number is safer as | |
# an attack takes more time to perform. | |
password_hash_iterations=100000 |
NewerOlder