This file contains hidden or 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
#!/usr/bin/env python3 | |
# | |
# reads energy & power from 2 SMA Inverters and sends it to MQTT and pvoutput.org | |
# | |
from pymodbus.client import ModbusTcpClient | |
import struct | |
import time |
This file contains hidden or 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 <avr/pgmspace.h> | |
const uint8_t CHARSET[][5] PROGMEM = { | |
{ 0x00, 0x00, 0x00, 0x00, 0x00 }, // 20 space | |
{ 0x00, 0x00, 0x5f, 0x00, 0x00 }, // 21 ! | |
{ 0x00, 0x07, 0x00, 0x07, 0x00 }, // 22 " | |
{ 0x14, 0x7f, 0x14, 0x7f, 0x14 }, // 23 # | |
{ 0x24, 0x2a, 0x7f, 0x2a, 0x12 }, // 24 $ | |
{ 0x23, 0x13, 0x08, 0x64, 0x62 }, // 25 % | |
{ 0x36, 0x49, 0x55, 0x22, 0x50 }, // 26 & |
This file contains hidden or 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
#define NUMPIXELS 254 | |
#define PIN 5 //GPIO5 = D1 | |
// http://esp8266-server.de/wemos.html#Pinbelegung | |
const char* ssid = "XXXXXXXXXXXXXX"; | |
const char* password = "XXXXXXXXXXXXX"; | |
const char* mqtt_server = "192.168.1.3"; | |
const char* inTopic = "huette/clubraum/000/ws2812tonne/frame"; |