Proxy requests using Webpack dev server to avoid cors in development mode.
In your webpack.config file add:
"devServer":{
"proxy": {
"/api": {
"target": 'https://my-target.com',
"pathRewrite": { '^/api': '' },
const uint8_t blue = 2; | |
const uint8_t vbatPin = 35; | |
#include <Wire.h> // Only needed for Arduino 1.6.5 and earlier | |
#include "SSD1306.h" // alias for `#include "SSD1306Wire.h"` | |
float VBAT; // battery voltage from ESP32 ADC read | |
SSD1306 display(0x3c, 4, 15); | |
void setup() | |
{ | |
Serial.begin(115200); | |
pinMode(blue, OUTPUT); |
version: '3.2' | |
services: | |
homieMonitor: | |
container_name: homieMonitor | |
environment: | |
- HM_MQTT_HOST=192.168.1.1 | |
- HM_MQTT_PORT=1883 | |
- HM_MQTT_SSL_ENABLE_FLAG=true | |
- HM_MQTT_USER=mqtt | |
- HM_MQTT_PASS=superSecret |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<title>Ionic App</title> | |
<base href="/" /> | |
<meta | |
name="viewport" |
Proxy requests using Webpack dev server to avoid cors in development mode.
In your webpack.config file add:
"devServer":{
"proxy": {
"/api": {
"target": 'https://my-target.com',
"pathRewrite": { '^/api': '' },
/* Replace "standalone" with "fullscreen" depending on your manifest.json display mode */ | |
@media (display-mode: standalone) { | |
/* All installed PWAs */ | |
} | |
@media (max-width: 576px) and (display-mode: standalone) { | |
/* Installed PWAs on mobile devices */ | |
@supports (-webkit-overflow-scrolling: touch) { |
#!/bin/bash | |
# | |
# Remove Homie Device from MQTT | |
# | |
# Simple Script to remove all reatined messages for a homie device, effectively removing the device from MQTT. | |
# The script get all topics "below" a device e.g homie/a020a615f72c/$mac and | |
# send a NULL message with mosquitto_pub to the topic. This removes the retained | |
# message and the topic will not show up anymore. | |
# | |
# How? |
postgres: | |
image: postgres:9.4 | |
volumes: | |
- ./init.sql:/docker-entrypoint-initdb.d/init.sql |
<?php | |
/** | |
* On-the-fly CSS Compression | |
* Copyright (c) 2009 and onwards, Manas Tungare. | |
* Creative Commons Attribution, Share-Alike. | |
* | |
* In order to minimize the number and size of HTTP requests for CSS content, | |
* this script combines multiple CSS files into a single file and compresses | |
* it on-the-fly. | |
* |
OpenHAB Heating Example | |
======================== | |
This heating example shows three rooms in my house with 1 radiator valve, 1 temperature sensor per room and a single boiler. It could be adapted for different situations. | |
The rules allow for simple addition of items in rooms as long as they follow the naming convention and have at least a valve, a thermometer, setpoint and a demand switch. | |
The demand switch is purely internal and is used to indicate if the room requires heat or not. All rooms are OR'd together to define the boiler status and each room demand (On/Off) is applied to the radiator valves. | |
It could be more generic for multiple thermometers/valves per room - but it suits my needs for now. If I make it more generic I will update it accordingly. |