Browse Source

Merge branch 'development02' into asyncWeb02

pull/283/head
lumapu 2 years ago
parent
commit
015c0132b9
  1. 5
      README.md
  2. 283
      tools/cases/DollaTek_NRF24L01_Case/case.scad
  3. BIN
      tools/cases/DollaTek_NRF24L01_Case/case.stl
  4. BIN
      tools/cases/DollaTek_NRF24L01_Case/case_photo.jpeg
  5. BIN
      tools/cases/DollaTek_NRF24L01_Case/case_render.png
  6. 0
      tools/cases/WemosD1_NRF24_Case/ESP_NRF24_Case.stl
  7. 0
      tools/cases/WemosD1_NRF24_Case/ESP_NRF24_Case_F360.png
  8. 0
      tools/cases/WemosD1_NRF24_Case/ESP_NRF24_Case_cover.stl
  9. 0
      tools/cases/WemosD1_NRF24_Case/IMG_2135.png
  10. 0
      tools/cases/WemosD1_NRF24_Case/IMG_2136.png
  11. 0
      tools/cases/WemosD1_NRF24_Case/IMG_2137.png
  12. 0
      tools/cases/WemosD1_NRF24_Case/IMG_2140.png
  13. 70
      tools/esp8266/README.md
  14. 2
      tools/esp8266/User_Manual.md
  15. 1
      tools/esp8266/html/visualization.html

5
README.md

@ -20,4 +20,9 @@ There you will find further explanations on how to proceed. (*Note: It is still
If errors occur or you have suggestions for ideas, please feel free to contact us [here](https://github.com/grindylow/ahoy/issues).
## Contact
We run a Discord Server that can be used to get in touch with the Developers and Users.
https://discord.gg/WzhxEY62mB
**Contributors are always welcome!**

283
tools/cases/DollaTek_NRF24L01_Case/case.scad

@ -0,0 +1,283 @@
$fn=100;
translate([-w/2-10,0,d+bpt+tpt])
rotate(a=180, v=[0,1,0])
box_top();
translate([w/2+10,0,0])
box_bottom();
//*************************************************//
//PARAMETERS
//*************************************************//
//BOX
//--------------------------------------------------
//inner box width + tolerances
w=90;
//inner box length + tolerances
h=30;
//inner box depth
d=35;
//wall tickness
wt=3;
//bottom plate tickness
bpt=3;
//top plate tickness
tpt=3;
//top cutout depth
cd=5;
//top cutout tickness
cwt=1.5;
//--------------------------------------------------
//BOARD MOUNTING HOLES
//--------------------------------------------------
//position
cx=0;
cy=0;
//holes size (radius)
chs_i=1.5;
chs_o=4;
//distancer height
dsth=3;
//holes distance h
chd_h=90;
//holes distance v
chd_v=90;
//--------------------------------------------------
//TOP PART MOUNTING HOLES
//--------------------------------------------------
//position
cx1=0;
cy1=0;
//holes size (radius)
chs_i1=1.6;
chs_o1=3;
//holes distance h
chd_h1=h-2*chs_i1-2;
//holes distance v
chd_v1=w-2*chs_i1-2;
//*************************************************//
//*************************************************//
//MODULES
//*************************************************//
//top box part
module box_top()
{
difference()
{
union()
{
difference()
{
translate([ 0, 0, d+bpt-cd-0.2])
rounded_cube( w+2*wt, h+2*wt, tpt+cd+0.2, 6);
translate([ 0, 0, d+bpt-cd-1])
rounded_cube( w+2*cwt+0.3, h+2*cwt+0.3, cd+1, 4);
}
/*************************/
//add here...
/*************************/
}
//TOP PART HOLES
//tph_t_cut();
/*************************/
//subtract here...
/*************************/
}
}
//bottom box
module box_bottom()
{
difference()
{
union()
{
difference()
{
rounded_cube( w+2*wt, h+2*wt, d+bpt, 6);
translate([ 0, 0, -cd])
difference()
{
translate([ 0, 0, d+bpt])
rounded_cube( w+2*wt+1, h+2*wt+1, cd+1, 4);
translate([ 0, 0, d+bpt-1])
rounded_cube( w+2*cwt, h+2*cwt, cd+3, 4);
}
translate([ 0, 0, bpt])
rounded_cube( w, h, d+bpt, 4);
}
//BOARD DISTANCER
//board_distancer();
//TOP PLATE DISTANCER
//top_distancer();
/*************************/
/*************************/
}
//BOARD HOLES
//bh_cut();
//TOP PART HOLES
//tph_b_cut();
/*************************/
//subtract here...
translate([25, 0, 14])
rotate([0,90,0])
cylinder(r=3.5,h=40);
translate([-48, 0, 7])
cube( [10, 10, 5], true);
/*************************/
}
}
/****************************************************/
module board_distancer()
{
translate([cx,cy,0])
{
translate([+chd_h/2,chd_v/2,0])
cylinder(r=chs_o,h=bpt+dsth);
translate([-chd_h/2,chd_v/2,0])
cylinder(r=chs_o,h=bpt+dsth);
translate([+chd_h/2,-chd_v/2,0])
cylinder(r=chs_o,h=bpt+dsth);
translate([-chd_h/2,-chd_v/2,0])
cylinder(r=chs_o,h=bpt+dsth);
}
}
module top_distancer()
{
translate([cx1,cy1,0])
{
translate([-chd_v1/2, chd_h1/2, 0])
cylinder(r=chs_o1,h=d+bpt);
translate([-chd_v1/2, -chd_h1/2, 0])
cylinder(r=chs_o1,h=d+bpt);
translate([chd_v1/2, chd_h1/2, 0])
cylinder(r=chs_o1,h=d+bpt);
translate([chd_v1/2, -chd_h1/2, 0])
cylinder(r=chs_o1,h=d+bpt);
}
}
module bh_cut()
{
translate([cx,cy,0])
{
translate([-chd_h/2,-chd_v/2,-1])
cylinder(r=chs_i,h=bpt+dsth+2);
translate([+chd_h/2,-chd_v/2,-1])
cylinder(r=chs_i,h=bpt+dsth+2);
translate([-chd_h/2,chd_v/2,-1])
cylinder(r=chs_i,h=bpt+dsth+2);
translate([+chd_h/2,chd_v/2,-1])
cylinder(r=chs_i,h=bpt+dsth+2);
translate([-chd_h/2,-chd_v/2,1.3])
fhex(5.5,3);
translate([+chd_h/2,-chd_v/2,1.3])
fhex(5.5,3);
translate([-chd_h/2,chd_v/2,1.3])
fhex(5.5,3);
translate([+chd_h/2,chd_v/2,1.3])
fhex(5.5,3);
}
}
module tph_t_cut()
{
translate([cx1,cy1,0])
{
translate([-chd_v1/2, chd_h1/2, -2])
cylinder(r=chs_i1,h=d+bpt+tpt+3);
translate([chd_v1/2, chd_h1/2, -2])
cylinder(r=chs_i1,h=d+bpt+tpt+3);
translate([-chd_v1/2, -chd_h1/2, -2])
cylinder(r=chs_i1,h=d+bpt+tpt+3);
translate([chd_v1/2, -chd_h1/2, -2])
cylinder(r=chs_i1,h=d+bpt+tpt+3);
translate([-chd_v1/2, chd_h1/2, d+bpt+tpt-1.3])
fhex(5.5,3);
translate([chd_v1/2, chd_h1/2, d+bpt+tpt-1.3])
fhex(5.5,3);
translate([-chd_v1/2, -chd_h1/2, d+bpt+tpt-1.3])
fhex(5.5,3);
translate([chd_v1/2, -chd_h1/2, d+bpt+tpt-1.3])
fhex(5.5,3);
}
}
module tph_b_cut()
{
translate([cx1,cy1,0])
{
translate([-chd_v1/2, chd_h1/2, -2])
cylinder(r=chs_i1,h=d+bpt+3);
translate([chd_v1/2, chd_h1/2, -2])
cylinder(r=chs_i1,h=d+bpt+3);
translate([-chd_v1/2, -chd_h1/2, -2])
cylinder(r=chs_i1,h=d+bpt+3);
translate([chd_v1/2, -chd_h1/2, -2])
cylinder(r=chs_i1,h=d+bpt+3);
translate([-chd_v1/2, chd_h1/2, -1])
cylinder(r=3,h=4);
translate([chd_v1/2, chd_h1/2, -1])
cylinder(r=3,h=4);
translate([-chd_v1/2, -chd_h1/2, -1])
cylinder(r=3,h=4);
translate([chd_v1/2, -chd_h1/2, -1])
cylinder(r=3,h=4);
}
}
module rounded_cube( x, y, z, r)
{
translate([-x/2+r,-y/2+r,0])
linear_extrude(height=z)
minkowski()
{
square([x-2*r,y-2*r],true);
translate([x/2-r,y/2-r,0])
circle(r);
}
}
module fhex(wid,height)
{
hull()
{
cube([wid/1.7,wid,height],center = true);
rotate([0,0,120])cube([wid/1.7,wid,height],center = true);
rotate([0,0,240])cube([wid/1.7,wid,height],center = true);
}
}

BIN
tools/cases/DollaTek_NRF24L01_Case/case.stl

Binary file not shown.

BIN
tools/cases/DollaTek_NRF24L01_Case/case_photo.jpeg

Binary file not shown.

After

Width:  |  Height:  |  Size: 213 KiB

BIN
tools/cases/DollaTek_NRF24L01_Case/case_render.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

0
tools/esp8266/WemosD1_NRF24_Case/ESP_NRF24_Case.stl → tools/cases/WemosD1_NRF24_Case/ESP_NRF24_Case.stl

0
tools/esp8266/WemosD1_NRF24_Case/ESP_NRF24_Case_F360.png → tools/cases/WemosD1_NRF24_Case/ESP_NRF24_Case_F360.png

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 1.1 MiB

0
tools/esp8266/WemosD1_NRF24_Case/ESP_NRF24_Case_cover.stl → tools/cases/WemosD1_NRF24_Case/ESP_NRF24_Case_cover.stl

0
tools/esp8266/WemosD1_NRF24_Case/IMG_2135.png → tools/cases/WemosD1_NRF24_Case/IMG_2135.png

Before

Width:  |  Height:  |  Size: 432 KiB

After

Width:  |  Height:  |  Size: 432 KiB

0
tools/esp8266/WemosD1_NRF24_Case/IMG_2136.png → tools/cases/WemosD1_NRF24_Case/IMG_2136.png

Before

Width:  |  Height:  |  Size: 475 KiB

After

Width:  |  Height:  |  Size: 475 KiB

0
tools/esp8266/WemosD1_NRF24_Case/IMG_2137.png → tools/cases/WemosD1_NRF24_Case/IMG_2137.png

Before

Width:  |  Height:  |  Size: 477 KiB

After

Width:  |  Height:  |  Size: 477 KiB

0
tools/esp8266/WemosD1_NRF24_Case/IMG_2140.png → tools/cases/WemosD1_NRF24_Case/IMG_2140.png

Before

Width:  |  Height:  |  Size: 448 KiB

After

Width:  |  Height:  |  Size: 448 KiB

70
tools/esp8266/README.md

@ -1,9 +1,36 @@
## OVERVIEW
## Table of Contents
- [Overview](#overview)
- [Compile](#compile)
* [Optional Configuration before compilation](#optional-configuration-before-compilation)
- [Flash ESP with Firmware](#flash-esp-with-firmware)
- [Usage](#usage)
- [Compatiblity](#compatiblity)
- [Used Libraries](#used-libraries)
- [Contact](#contact)
***
## Overview
This page describes how the module of a Wemos D1 mini and ESP8266 is wired to the radio module, flashed and how the further steps are to communicate with the WR HM series.
The NRF24L01+ radio module is connected to the
standard SPI pins:
- SCLK (Signal Clock),
- MISO (Master In Slave Out) and
- MOSI (Master Out Slave In)
Additional there are 3 pins, which can be set individual:
- CS (Chip Select),
- CE (Chip Enable) and
- IRQ (Interrupt)
These pins can be changed from the /setup URL
#### Compatiblity
For now the following inverters should work out of the box:
- HM300
- HM350
- HM400
- HM600
@ -24,12 +51,23 @@ These pins can be changed in the http://<ip-adress>/setup URL or with a click on
This code can be compiled using Visual Studio Code and **PlatformIO** Addon. The settings were:
- Board: Generic ESP8266 Module
- Flash-Size: 1MB (FS: none, OTA: 502kB)
- Flash-Size: 4MB
- Install libraries (not included in the Arduino IDE 1.8.19):
- `Time` 1.6.1
- `RF24` 1.4.5
- `PubSubClient` 2.8
- `ArduinoJson` 6.19.4
## Used Libraries
- `ESP8266WiFi` 1.0
- `DNSServer` 1.1.0
- `Ticker` 1.0
- `ESP8266HTTPUpdateServer` 1.0
- `Time` 1.6.1
- `RF24` 1.4.5
- `PubSubClient` 2.8
- `ArduinoJson` 6.19.4
### Optional Configuration before compilation
@ -40,7 +78,7 @@ This code can be compiled using Visual Studio Code and **PlatformIO** Addon. The
Alternativly, instead of modifying `config.h`, `config_override_example.h` can be copied to `config_override.h` and customized.
config_override.h is excluded from version control and stays local.
## Flash ESP with firmware
## Flash ESP with Firmware
#### nodemcu-pyflasher (easy way)
1. download the flash-tool [nodemcu-pyflasher](https://github.com/marcelstoer/nodemcu-pyflasher)
@ -89,21 +127,23 @@ The serial console will print the converted values which were read out of the in
## Todo's [See this post](https://github.com/grindylow/ahoy/issues/142)
- [ ] Wechsel zu AsyncWebServer und ElegantOTA für Stabilität
- [ ] Wechsel zu AsyncWebServer und ElegantOTA für Stabilität
- [x] klarer Scheduler / Task manager, der ggf. den Receive Task priorisieren kann
- [x] Device Info Kommandos (Firmware Version, etc.) über das Dashboard anzeigen [Device Information ( `0x15` `REQ_ARW_DAT_ALL` ) SubCmd Kommandos #145](https://github.com/grindylow/ahoy/issues/145)
- [x] Device Info Kommandos (Firmware Version, etc.) über das Dashboard anzeigen [Device Information ( `0x15` `REQ_ARW_DAT_ALL` ) SubCmd Kommandos #145](https://github.com/grindylow/ahoy/issues/145)
- [ ] AlarmData & AlarmUpdate Parsen und auf eigener Seite darstellen
------------------ SWIM LANE ---------------------------
- HM300
- [ ] Device Control Kommandos aus dem Setup ermöglichen (TurnOn, TurnOff, Restart, ActivePower Limit, ReactivePower Limit, SetPowerFactor, etc.)
- [ ] Device Control Kommandos aus dem Setup ermöglichen (TurnOn, TurnOff, Restart, ActivePower Limit, ReactivePower Limit, SetPowerFactor, etc.)
- [ ] Settings exportieren / importieren (API/UI)
- [ ] Settings in settings.ini speichern (LittleFS statt EEPROM) [Settings in settings.ini speichern (LittleFS statt EEPROM) #164](https://github.com/grindylow/ahoy/issues/164)
- [ ] Homepage aufräumen nur ein Status (aktuell drei AJAX Calls /uptime, /time, /cmdstat)
- [ ] app.cpp aufräumen und in hmRadio / hmProtokollGen3 auslagern
- [ ] MI Wechselrichter unterstützen (miSystem, miInverter, miDefines, miProtokollGen2 etc.)
- [ ] nRF24 Interrupt Handling sinnvoll oder warum macht die nRF24 Bibliothek ständig `0x07` Statusabfragen [NRF24 polling trotz aktiviertem IRQ #83](https://github.com/grindylow/ahoy/issues/83)
- [ ] Debug Level im Setup änderbar -auch Livedata Visualisierung abschalten ?
- [ ] Homepage aufräumen nur ein Status (aktuell drei AJAX Calls /uptime, /time, /cmdstat)
- [ ] app.cpp aufräumen und in hmRadio / hmProtokollGen3 auslagern
- [ ] MI Wechselrichter unterstützen (miSystem, miInverter, miDefines, miProtokollGen2 etc.)
- [ ] nRF24 Interrupt Handling sinnvoll oder warum macht die nRF24 Bibliothek ständig `0x07` Statusabfragen [NRF24 polling trotz aktiviertem IRQ #83](https://github.com/grindylow/ahoy/issues/83)
- [ ] Debug Level im Setup änderbar -auch Livedata Visualisierung abschalten ?
- [ ] MQTT Discovery (HomeAssistant) im Setup optional machen
- [x] MQTT Subscribe nur beim Reconnect [Das subscribe in der Reconnect Procedure sollte doch nur nach einem conect ausgeführt werden und nicht bei jedem Duchlauf #139](https://github.com/grindylow/ahoy/issues/139)
- [x] MQTT Subscribe nur beim Reconnect [Das subscribe in der Reconnect Procedure sollte doch nur nach einem conect ausgeführt werden und nicht bei jedem Duchlauf #139](https://github.com/grindylow/ahoy/issues/139)
## Contact
We run a Discord Server that can be used to get in touch with the Developers and Users.
https://discord.gg/WzhxEY62mB

2
tools/esp8266/User_Manual.md

@ -1,5 +1,5 @@
# User Manual Ahoy DTU (on ESP8266)
16.08.2022
Version #{VERSION}#
## Introduction
See the repository [here](https://github.com/grindylow/ahoy/blob/main/tools/esp8266/README.md)

1
tools/esp8266/html/visualization.html

@ -4,6 +4,7 @@
<title>Index - {DEVICE}</title>
<link rel="stylesheet" type="text/css" href="style.css"/>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="apple-mobile-web-app-capable" content="yes">
<script type="text/javascript">
getAjax('/livedata', 'livedata');
window.setInterval("getAjax('/livedata', 'livedata')", {JS_TS});

Loading…
Cancel
Save