Skip to content
This repository has been archived by the owner on Oct 4, 2021. It is now read-only.

Commit

Permalink
build: move repo from proddy
Browse files Browse the repository at this point in the history
  • Loading branch information
proddy committed Mar 14, 2021
1 parent b6f11f0 commit 730a3a3
Show file tree
Hide file tree
Showing 12 changed files with 61 additions and 94 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ data/www/
lib/framework/WWWData.h
interface/build/
interface/node_modules/
interface/.eslintcache
2 changes: 1 addition & 1 deletion CHANGELOG_LATEST.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
- renamed pio targets (esp8266-ci and esp32-ci for GitHub CI)
- telnet default settings `log info`, timeout 60 min
- `log debug` not showing telegram names, use `log trace` or `watch on` to show the telegrams
- optimized how console and web display device data ([#632](https://github.com/proddy/EMS-ESP/issues/632))
- optimized how console and web display device data (#632)

### Removed
- old shell and python build scripts
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ A Pull Request (PR) is the process where code modifications are managed in GitHu
The process is straight-forward.

- Read [How to get faster PR reviews](https://github.com/kubernetes/community/blob/master/contributors/guide/pull-requests.md#best-practices-for-faster-reviews) by Kubernetes (but skip step 0)
- Fork the EMS-ESP Repository [git repository](https://github.com/proddy/EMS-ESP).
- Fork the EMS-ESP Repository [git repository](https://github.com/emsesp/EMS-ESP).
- Write/Change the code in your Fork for a new feature, bug fix, new sensor, optimization, etc.
- Ensure tests work.
- Create a Pull Request against the [**dev**](https://github.com/proddy/EMS-ESP/tree/dev) branch of EMS-ESP.
- Create a Pull Request against the [**dev**](https://github.com/emsesp/EMS-ESP/tree/dev) branch of EMS-ESP.

1. All pull requests must be done against the dev branch.
2. Make sure code is formatting per the `.clang-format`
Expand Down
33 changes: 17 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,22 @@

**EMS-ESP** is an open-source firmware for the Espressif ESP8266 and ESP32 microcontroller that communicates with **EMS** (Energy Management System) based equipment from manufacturers like Bosch, Buderus, Nefit, Junkers, Worcester and Sieger.

[![version](https://img.shields.io/github/release/proddy/EMS-ESP.svg?label=Latest%20Release)](https://github.com/proddy/EMS-ESP/blob/main/CHANGELOG.md)
[![release-date](https://img.shields.io/github/release-date/proddy/EMS-ESP.svg?label=Released)](https://github.com/proddy/EMS-ESP/commits/master)
[![license](https://img.shields.io/github/license/proddy/EMS-ESP.svg)](LICENSE)
![Build Firmware](https://github.com/proddy/EMS-ESP/workflows/Build%20Firmware/badge.svg?branch=dev)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/a37be4d45e5f47749b6e356c8e738a80)](https://www.codacy.com/gh/proddy/EMS-ESP/dashboard?utm_source=github.com&utm_medium=referral&utm_content=proddy/EMS-ESP&utm_campaign=Badge_Grade)
[![downloads](https://img.shields.io/github/downloads/proddy/EMS-ESP/total.svg)](https://github.com/proddy/EMS-ESP/releases)
[![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/proddy/EMS-ESP.svg)](http://isitmaintained.com/project/proddy/EMS-ESP "Average time to resolve an issue")
[![Percentage of issues still open](http://isitmaintained.com/badge/open/proddy/EMS-ESP.svg)](http://isitmaintained.com/project/proddy/EMS-ESP "Percentage of issues still open")
This is the firmware for the ESP8266.

[![version](https://img.shields.io/github/release/emsesp/EMS-ESP.svg?label=Latest%20Release)](https://github.com/emsesp/EMS-ESP/blob/main/CHANGELOG.md)
[![release-date](https://img.shields.io/github/release-date/emsesp/EMS-ESP.svg?label=Released)](https://github.com/emsesp/EMS-ESP/commits/main)
[![license](https://img.shields.io/github/license/emsesp/EMS-ESP.svg)](LICENSE)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/76ce919e25494cdeab827a6525666be0)](https://www.codacy.com/gh/emsesp/EMS-ESP/dashboard?utm_source=github.com&utm_medium=referral&utm_content=emsesp/EMS-ESP&utm_campaign=Badge_Grade)
[![downloads](https://img.shields.io/github/downloads/emsesp/EMS-ESP/total.svg)](https://github.com/emsesp/EMS-ESP/releases)
[![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/emsesp/EMS-ESP.svg)](http://isitmaintained.com/project/emsesp/EMS-ESP "Average time to resolve an issue")
[![Percentage of issues still open](http://isitmaintained.com/badge/open/emsesp/EMS-ESP.svg)](http://isitmaintained.com/project/emsesp/EMS-ESP "Percentage of issues still open")
<br/>
[![gitter](https://img.shields.io/gitter/room/EMS-ESP/EMS-ESP.svg)](https://gitter.im/EMS-ESP/community)
[![chat](https://img.shields.io/discord/816637840644505620.svg?style=flat-square&color=blueviolet)](https://discord.gg/3J3GgnzpyT)

If you like **EMS-ESP**, please give it a star, or fork it and contribute!

[![GitHub stars](https://img.shields.io/github/stars/proddy/EMS-ESP.svg?style=social&label=Star)](https://github.com/proddy/EMS-ESP/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/proddy/EMS-ESP.svg?style=social&label=Fork)](https://github.com/proddy/EMS-ESP/network)
[![GitHub stars](https://img.shields.io/github/stars/emsesp/EMS-ESP.svg?style=social&label=Star)](https://github.com/emsesp/EMS-ESP/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/emsesp/EMS-ESP.svg?style=social&label=Fork)](https://github.com/emsesp/EMS-ESP/network)
[![donate](https://img.shields.io/badge/donate-PayPal-blue.svg)](https://www.paypal.com/paypalme/prderbyshire/2)

Note, EMS-ESP requires a small hardware circuit that can convert the EMS bus data to be read by the microcontroller. These can be ordered at https://bbqkees-electronics.nl.
Expand Down Expand Up @@ -70,14 +71,14 @@ If you're looking for support on **EMS-ESP** there are some options available:

### Support Community

* [EMS-ESP Support Chat](https://gitter.im/EMS-ESP/community#): For support, troubleshooting and general questions. You have better chances to get fast answers from members of the community
* [Search in Issues](https://github.com/proddy/EMS-ESP/issues): You might find an answer to your question by searching current or closed issues
* [Discord Server](https://discord.gg/3J3GgnzpyT): For support, troubleshooting and general questions. You have better chances to get fast answers from members of the community
* [Search in Issues](https://github.com/emsesp/EMS-ESP/issues): You might find an answer to your question by searching current or closed issues

### Developer's Community

* [Bug Report](https://github.com/proddy/EMS-ESP/issues/new?template=bug_report.md): For reporting Bugs
* [Feature Request](https://github.com/proddy/EMS-ESP/issues/new?template=feature_request.md): For requesting features/functions
* [Troubleshooting](https://github.com/proddy/EMS-ESP/issues/new?template=questions---troubleshooting.md): As a last resort, you can open new *Troubleshooting & Question* issue on GitHub if the solution could not be found using the other channels. Just remember: the more info you provide the more chances you'll have to get an accurate answer
* [Bug Report](https://github.com/emsesp/EMS-ESP/issues/new?template=bug_report.md): For reporting Bugs
* [Feature Request](https://github.com/emsesp/EMS-ESP/issues/new?template=feature_request.md): For requesting features/functions
* [Troubleshooting](https://github.com/emsesp/EMS-ESP/issues/new?template=questions---troubleshooting.md): As a last resort, you can open new *Troubleshooting & Question* issue on GitHub if the solution could not be found using the other channels. Just remember: the more info you provide the more chances you'll have to get an accurate answer

## **Contributing**

Expand Down
2 changes: 1 addition & 1 deletion RELEASENOTES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ![logo](https://github.com/proddy/EMS-ESP/blob/main/media/EMS-ESP_logo_dark.png)
# ![logo](https://github.com/emsesp/EMS-ESP/blob/main/media/EMS-ESP_logo_dark.png)

# Firmware Installation

Expand Down
2 changes: 1 addition & 1 deletion RELEASENOTES_DEV.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ![logo](https://github.com/proddy/EMS-ESP/blob/main/media/EMS-ESP_logo_dark.png)
# ![logo](https://github.com/emsesp/EMS-ESP/blob/main/media/EMS-ESP_logo_dark.png)

This is a snapshot of the current "beta" development code and firmware binaries using the `dev` branch. It has all the latest features and fixes but please be aware that this is still experimental firmware used for testing and thus may contain the odd bug. Use at your own risk and remember to report an issue if you find something unusual.

Expand Down
28 changes: 0 additions & 28 deletions debug_esp32_pio_local.ini

This file was deleted.

4 changes: 2 additions & 2 deletions interface/src/project/EMSESPHelp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class EMSESPHelp extends Component {
<GitHubIcon />
</ListItemAvatar>
<ListItemText>
To report an issue or feature request go to <Link href="https://github.com/proddy/EMS-ESP/issues/new/choose" color="primary">{'click here'}</Link>
To report an issue or feature request go to <Link href="https://github.com/emsesp/EMS-ESP/issues/new/choose" color="primary">{'click here'}</Link>
</ListItemText>
</ListItem>

Expand Down Expand Up @@ -71,7 +71,7 @@ class EMSESPHelp extends Component {
<Box bgcolor="info.main" border={1} p={3} mt={1} mb={0}>
<Typography variant="h6">
EMS-ESP is free and open-source.
<br></br>Please consider supporting this project by giving it a <StarIcon style={{ color: '#fdff3a' }} /> on our <Link href="https://github.com/proddy/EMS-ESP" color="primary">{'GitHub page'}</Link>.
<br></br>Please consider supporting this project by giving it a <StarIcon style={{ color: '#fdff3a' }} /> on our <Link href="https://github.com/emsesp/EMS-ESP" color="primary">{'GitHub page'}</Link>.
</Typography>
</Box>
<br></br>
Expand Down
File renamed without changes.
22 changes: 1 addition & 21 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

[platformio]
default_envs = esp8266
; default_envs = esp32

# override any settings with your own local ones in pio_local.ini
extra_configs =
Expand Down Expand Up @@ -46,7 +45,7 @@ check_flags =
clangtidy: --checks=-*,clang-analyzer-*,performance-*

; build for GitHub Actions CI
[env:esp8266-ci]
[env:ci]
extra_scripts =
scripts/main_script.py
scripts/rename_fw.py
Expand All @@ -56,15 +55,6 @@ board_build.filesystem = littlefs
board_build.f_cpu = 160000000L
build_flags = ${common.build_flags}

; build for GitHub Actions CI
[env:esp32-ci]
extra_scripts =
scripts/rename_fw.py
board = esp32dev
platform = espressif32
board_build.partitions = min_spiffs.csv
build_flags = ${common.build_flags}

[env:esp8266]
extra_scripts =
pre:scripts/build_interface.py
Expand All @@ -80,13 +70,3 @@ board_build.f_cpu = 160000000L ; 160MHz
build_flags = ${common.build_flags} ${common.debug_flags}
lib_ignore =
AsyncTCP

[env:esp32]
extra_scripts =
pre:scripts/build_interface.py
scripts/rename_fw.py
board = esp32dev
platform = espressif32
; platform = https://github.com/platformio/platform-espressif32.git
board_build.partitions = min_spiffs.csv ; https://github.com/espressif/arduino-esp32/blob/master/tools/partitions/
build_flags = ${common.build_flags} ${common.debug_flags}
56 changes: 34 additions & 22 deletions scripts/rename_fw.py
Original file line number Diff line number Diff line change
@@ -1,50 +1,62 @@
Import('env', "projenv")
Import("env")
import os
import re
import shutil
import gzip

OUTPUT_DIR = "build{}".format(os.path.sep)

def bin_copy(source, target, env):

# get the EMS-ESP version
# get the build info
bag = {}
exprs = [(re.compile(r'^#define EMSESP_APP_VERSION\s+"(\S+)"'), 'app_version')]
exprs = [
(re.compile(r'^#define EMSESP_APP_VERSION\s+"(\S+)"'), 'app_version'),
(re.compile(r'^#define EMSESP_PLATFORM\s+"(\S+)"'), 'platform'),
]
with open('./src/version.h', 'r') as f:
for l in f.readlines():
for expr, var in exprs:
m = expr.match(l)
if m and len(m.groups()) > 0:
bag[var] = m.group(1)

# esp8266 or esp32
platform = "esp" + env['PIOPLATFORM'].strip("espressif")
app_version = bag.get('app_version')
platform = bag.get("platform")

# if using the pio build directory, use str(target[0]).split(os.path.sep)[2]
variant = "EMS-ESP-" + bag.get('app_version').replace(".", "_") + "-" + platform

# create string with location and file names based on variant
bin_file = "{}firmware{}{}.bin".format(OUTPUT_DIR, os.path.sep, variant)
gzip_file = "{}firmware{}{}.bin.gz".format(OUTPUT_DIR, os.path.sep, variant)
# print(env.Dump())
# my_flags = env.ParseFlags(env['BUILD_FLAGS'])
# defines = {k: v for (k, v) in my_flags.get("CPPDEFINES")}
# print(my_flags)
# print((my_flags.get("CPPDEFINES"))

# check if firmware directory and target subdirectories (esp8266/esp32) exist and create if necessary
# alternatively take platfrom from the pio target
# platform = str(target[0]).split(os.path.sep)[2]

print("app version: "+app_version)
print("platform: "+platform)

# convert . to _ so Windows doesn't complain
variant = "EMS-ESP-" + app_version.replace(".", "_") + "-" + platform

# check if output directories exist and create if necessary
if not os.path.isdir(OUTPUT_DIR):
os.mkdir(OUTPUT_DIR)

for d in ['firmware']:
if not os.path.isdir("{}{}".format(OUTPUT_DIR, d)):
os.mkdir("{}{}".format(OUTPUT_DIR, d))

# copy firmware.bin to new name and in the build/firmware folder, delete if already exists
if os.path.isfile(bin_file): os.remove(bin_file)
shutil.copy(str(target[0]), bin_file)
# create string with location and file names based on variant
bin_file = "{}firmware{}{}.bin".format(OUTPUT_DIR, os.path.sep, variant)

# check if new target files exist and remove if necessary
for f in [bin_file]:
if os.path.isfile(f):
os.remove(f)

# create the gzip'd version
if os.path.isfile(gzip_file): os.remove(gzip_file)
with open(bin_file, "rb") as fp:
with gzip.open(gzip_file, "wb", compresslevel = 9) as f:
shutil.copyfileobj(fp, f)
print("renaming file to "+bin_file)

print("Built firmwares: "+ bin_file + ", " + gzip_file)
# copy firmware.bin to firmware/<variant>.bin
shutil.copy(str(target[0]), bin_file)

env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", [bin_copy])
1 change: 1 addition & 0 deletions src/version.h
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
#define EMSESP_APP_VERSION "2.2.0"
#define EMSESP_PLATFORM "ESP8266"

0 comments on commit 730a3a3

Please sign in to comment.