Code Monkey home page Code Monkey logo

pool-controller's People

Contributors

d3wy avatar mrtroble avatar stritti avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

pool-controller's Issues

Config.json file is ignored if additional settings are not defined

To bypass the GUI config mode, one must define loglevel, logserial, and flushlog in the settings section of the config.json for it to be valid. See log output below for loglevel

12:42:52.553 > 68 [DEBUG]: void setup(): Before Homie setup())
12:42:52.608 > ✖ Config file is not valid, reason: loglevel setting is missing
12:42:52.614 > Configuration invalid. Using CONFIG MODE
12:42:52.692 > 💡 Firmware pool-controller (2.0.0)
12:42:52.692 > 🔌 Booting into config mode 🔌

Implement invert signal in RelayModuleNode.cpp

Simple enhancement to accommodate a greater number of relays and configuration options.

relay = new RelayModule(_pin, true); // The second parameter is whether to invert the signal. The default value is false if omitted.

Wemos D1 mini Pro crashes in debug mode because of watchdog reset

Hi,

I wanted to run the pool controller on a "Wemos D1 mini Pro".

Unfortunately the ESP always crashed (WDT reset), see in the log.

The code is only executable when I change "build_type = debug" to "build_type = release" in the platformio.ini.

Is it possible that the code is too slow in debug mode or that the serial interface is too slow and the watchdog is triggered as a result?

Many greetings

log:

11:29:27.817 > ✖ /homie/config.json doesn't exist

11:29:27.817 > Configuration invalid. Using CONFIG MODE

11:29:27.817 > 💡 Firmware pool-controller (2.0.0)

11:29:27.817 > 🔌 Booting into config mode 🔌

11:29:27.817 > Device ID is f4cfa2d0904a

11:29:27.817 > AP started as smart-swimmingpool-f4cfa2d0904a with IP 192.168.123.1

11:29:27.817 > 1227 [DEBUG]: void setup(): ngpool-f4cfa2d0904a
11:29:27.817 > Free heap: 31080

11:29:27.817 > Triggering Wi-Fi scan...

11:29:35.377 > 

11:29:35.378 >  ets Jan  8 2013,rst cause:4, boot mode:(3,7)

11:29:35.378 > 

11:29:35.378 > wdt reset

11:29:35.378 > load 0x4010f000, len 3656, room 16 

11:29:35.384 > tail 8

11:29:35.385 > chksum 0x0c

11:29:35.385 > csum 0x0c

11:29:35.385 > v9c56ed1f

11:29:35.385 > ~ld
11:29:35.456 > 72 [DEBUG]: void setup(): Before Homie setup())
11:29:36.547 > ✖ /homie/config.json doesn't exist

11:29:36.548 > Configuration invalid. Using CONFIG MODE

11:29:36.625 > 💡 Firmware pool-controller (2.0.0)

11:29:36.626 > 🔌 Booting into config mode 🔌

11:29:36.626 > Device ID is f4cfa2d0904a

11:29:36.626 > AP started as smart-swimmingpool-f4cfa2d0904a with IP 192.168.123.1

11:29:36.626 > 1228 [DEBUG]: void setup(): ngpool-f4cfa2d0904a
11:29:36.626 > Free heap: 31080

11:29:36.626 > Triggering Wi-Fi scan...

11:29:44.999 > 

11:29:44.999 >  ets Jan  8 2013,rst cause:4, boot mode:(3,7)

11:29:44.999 > 

11:29:44.999 > wdt reset

11:29:44.999 > load 0x4010f000, len 3656, room 16 

11:29:45.006 > tail 8

11:29:45.006 > chksum 0x0c

11:29:45.006 > csum 0x0c

11:29:45.006 > v9c56ed1f

11:29:45.006 > ~ld

platformio.ini:

; PlatformIO Project Configuration File
;
;   Build options: build flags, source filter
;   Upload options: custom upload port, speed and extra flags
;   Library options: dependencies, extra library storages
;   Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html

[platformio]
;default_envs = esp32dev
;default_envs = nodemcuv2
default_envs = d1_mini_pro

[common]
; build_flags = -g -DDEBUG_PORT=Serial
;Add the PIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY build flag to ensure reliable OTA updates.
build_flags = -D PIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY

; serial_speed = 74880
serial_speed = 115200

; You MUST inject these options into [env:] section
; using ${common_env_data.***} (see below)
[common_env_data]
lib_deps =
	DallasTemperature
	Wire
	paulstoffregen/OneWire
	Adafruit Unified Sensor
	DHT sensor library
	RelayModule
	NTPClient @ 3.1.0
	TimeZone @ 1.2.4
	ArduinoJson @ 6.18.0
	me-no-dev/ESP Async WebServer
  	thomasfredericks/Bounce2
  	marvinroger/AsyncMqttClient
	Homie
	; git+https://github.com/xoseperez/Time.git
	; git+https://github.com/homieiot/homie-esp8266.git#develop
	;../homie-esp8266

[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino
build_flags = -D SERIAL_SPEED=${common.serial_speed}
build_unflags = -Werror=reorder
lib_deps = ${common_env_data.lib_deps}
monitor_speed = ${common.serial_speed}

; Monitor filters: https://docs.platformio.org/en/latest/core/userguide/device/cmd_monitor.html#filters
monitor_filters = esp32_exception_decoder, log2file, time, default

upload_speed = 230400
;upload_protocol = esptool
;upload_port = 192.168.178.23
;upload_flags =
;  --timeout=20
;  --port=3232
;   --auth=st25277472

; Unit Testing options
test_ignore = test_desktop

[env:nodemcuv2]
platform = espressif8266 @ 2.5.0
board = nodemcuv2
framework = arduino
build_type = debug
build_flags = -D SERIAL_SPEED=${common.serial_speed}
lib_deps = ${common_env_data.lib_deps}
monitor_speed = ${common.serial_speed}

; Monitor filters: https://docs.platformio.org/en/latest/core/userguide/device/cmd_monitor.html#filters
monitor_filters = esp8266_exception_decoder, log2file, time, default

upload_speed = 230400
test_ignore = test_desktop

[env:d1_mini_pro]
platform = espressif8266 @ 2.5.0
board = d1_mini_pro
board_build.filesystem = SPIFFS
board_build.ldscript = eagle.flash.8m7m.ld
framework = arduino
build_type = debug
build_flags = -D SERIAL_SPEED=${common.serial_speed}
lib_deps = ${common_env_data.lib_deps}
monitor_speed = ${common.serial_speed}

; Monitor filters: https://docs.platformio.org/en/latest/core/userguide/device/cmd_monitor.html#filters
monitor_filters = esp8266_exception_decoder, log2file, time, default

upload_speed = 115200

Memory leaks

oneWire = new OneWire(_pin);
sensor = new DallasTemperature(oneWire);

Sie zerstören die Memory nie, da sie keinen Dekonstruktor haben. Daher entsteht hier ein Memory leak, weil die Ressourcen nicht mehr freigegeben werden.

"An object created by 'new' lives until destroyed by delete" - Bjarne Stroustrup, A Tour of C++

Ich schlage vor einfach das new weg zu lassen und die (de)allocation RAII zu überlassen.

oneWire = OneWire(_pin); 
sensor  = DallasTemperature(oneWire);

Ich würde auch raten das überall zu ändern.

Automatic adjustable filtration runs

The pool user wants automatic calculation of filtration runs depending on water temperature to have optimal water quality.

Verify, that

  • the water of the pool is completely filtered at 20°C on time.
  • the water of the pool is completely filtered at 28°C twice.
  • the volume of the pool (m³) is configurable.
  • the pump capacity (m³/h) is configurable.

See also:
https://poolinfos.de/poolfilter/pumpe/dimensionierung-poolpumpe-berechnen/
https://poolinfos.de/poolfilter/sandfilter/richtige-laufzeit-der-sandfilteranlage/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.