Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 15:21
    mcspr commented #2208
  • 15:07
    mcspr commented #2192
  • Apr 04 16:53
    stale[bot] closed #2119
  • Apr 04 16:53
    stale[bot] closed #2125
  • Apr 04 16:53
    stale[bot] commented #2119
  • Apr 04 16:53
    stale[bot] commented #2125
  • Apr 04 12:12
    alekob labeled #2211
  • Apr 04 12:12
    alekob opened #2211
  • Apr 04 10:47
    Camposmansi commented #2209
  • Apr 04 08:58
    Camposmansi labeled #2210
  • Apr 04 08:58
    Camposmansi opened #2210
  • Apr 03 20:08
    Camposmansi commented #2209
  • Apr 03 19:24
    ColinShorts commented #2209
  • Apr 03 18:24
    Camposmansi commented #2209
  • Apr 03 18:23
    Camposmansi commented #2209
  • Apr 03 17:23
    ColinShorts commented #2209
  • Apr 03 17:05
    Camposmansi commented #2209
  • Apr 03 16:57
    ColinShorts commented #2209
  • Apr 03 16:41
    Camposmansi commented #2209
  • Apr 03 16:39
    Camposmansi commented #2209
adbensi
@adbensi
some times I see problens with WTD.. please, try it..
karmacoma92
@karmacoma92

hi again, i'm afraid this time i'm facing this,
In file included from .pio/libdeps/generic-esp01s-dht11-10-ota/AsyncTCP_ID1826/src/AsyncTCP.cpp:24:0:
.pio/libdeps/generic-esp01s-dht11-10-ota/AsyncTCP_ID1826/src/AsyncTCP.h:26:23: fatal error: sdkconfig.h: No such file or directory



include "sdkconfig.h"

                   ^

compilation terminated.
* [.pio/build/generic-esp01s-dht11-10-ota/lib0b6/AsyncTCP_ID1826/AsyncTCP.cpp.o] Error 1
=

any ideas?
Max Prokhorov
@mcspr
Add AsyncTCP to the lib_ignore entry in the platformio.ini
I though strict include fixes that, but that breaks rfm lib for some reason.
karmacoma92
@karmacoma92
excuse me but how, like this ? - lib_ignore = "sdkconfig.h"
Max Prokhorov
@mcspr
lib_ignore =
    AsyncTCP
karmacoma92
@karmacoma92
thanks, many thanks
adbensi
@adbensi
Hi!!
When I recorded the compiled image, it was not necessary to build the SPIFFS image .. where is fixed the pages? I see on the structure files, but how is it done? My question is about the possibility of using RJ45 Ethernet.. the frame server is centred?
Max Prokhorov
@mcspr
.js,.css,.html are all inlined into a single .html, which we then gzip and then convert that into an uint8_t array
see code/espurna/static/index*.h
Marco Martins
@mamartins
Hello 👋🏼 I’m trying to add 2 sonar sensors, for that I’ve initiated another sonar the problem is the wemos only run well at the first time. Subsequent times after 10s the wemos d1 stop responding
Max Prokhorov
@mcspr
@mamartins anything in the serial debug? does it crash or locks up completely, web and all?
Sachin Filinto
@sfilinto
@karmacoma92 i am observing the same since yesterday after i installed an update.
Max Prokhorov
@mcspr
Sachin Filinto
@sfilinto

@karmacoma92 @sfilinto see https://github.com/xoseperez/espurna/pull/2146#issuecomment-586489657

Thanks. adding lib_ignore = ESPAsynTCP in platformio.ini eliminates that error.

the below error still remains:
"Unicode decode error has occurred, please remove invalid (non-ASCII or non-UTF8) characters from /espurna/code/espurna/espurna.ino.cpp file"

anyway to rollback to a previous version on platformio ?

Max Prokhorov
@mcspr
@sfilinto does it build though? this is pio error, not ours, and it is not fatal based on the code. just something wrong with file encoding, perhaps you are using some custom .ino files with a different encoding so con-cated .ino.cpp show it?
Sachin Filinto
@sfilinto
@mcspr Nope does not build. i know its a pio error because it stated after i updated to the latest pio yesterday. nothing changed from the stock espurna code.
Max Prokhorov
@mcspr
@sfilinto care to open up platformio-core issue? full trace back and all.
as noticed somewhere else... pio hides the real error in a lot of cases, but you can try modifying platformio/fs.py func get_file_contents(...)to print the original exception (which should at least show file position)
diff --git a/platformio/fs.py b/platformio/fs.py
index ed0102cd..461ad925 100644
--- a/platformio/fs.py
+++ b/platformio/fs.py
@@ -54,6 +54,8 @@ def get_file_contents(path, encoding=None):
         with io.open(path, encoding=encoding) as fp:
             return fp.read()
     except UnicodeDecodeError:
+        import traceback
+        traceback.print_exc()
         click.secho(
             "Unicode decode error has occurred, please remove invalid "
             "(non-ASCII or non-UTF8) characters from %s file" % path,
Quickly snatching .ino.cpp also will help since it is removed after pio quits, like C-z if pio is ran from shell
Sachin Filinto
@sfilinto
@mcspr will do
Marco Martins
@mamartins
@mcspr wifi and telnet work, web interface and sonar measures don’t. Telnet crash don’t show anything. I don’t have the adaptor for the serial debug :(
Max Prokhorov
@mcspr
huh. but do any telnet commands work? if they don't, we are stuck in some infinite loop and the thread we stuck in is supposed to handle sensor readings and webui. only question is what exactly causes it, something we do or sonar library (see NewPing)
Marco Martins
@mamartins
Yes telnet commands work
I have 2 sensors, so I added to the initiate condition another sensor class
Marco Martins
@mamartins
At sonar.ino I replaced
#if SONAR_SUPPORT
{
    SonarSensor * sensor = new SonarSensor();
    sensor->setEcho(SONAR_ECHO);
    sensor->setIterations(SONAR_ITERATIONS);
    sensor->setMaxDistance(SONAR_MAX_DISTANCE);
    sensor->setTrigger(SONAR_TRIGGER);
    _sensors.push_back(sensor);
}
#endif
with
#if SONAR_SUPPORT
{
    SonarSensor * sensor = new SonarSensor();
    sensor->setEcho(SONAR_ECHO);
    sensor->setIterations(SONAR_ITERATIONS);
    sensor->setMaxDistance(SONAR_MAX_DISTANCE);
    sensor->setTrigger(SONAR_TRIGGER);
    _sensors.push_back(sensor);  
  SonarSensor * sensor2 = new SonarSensor();
    sensor2->setEcho(SONAR_ECHO_2);
    sensor2->setIterations(SONAR_ITERATIONS);
    sensor2->setMaxDistance(SONAR_MAX_DISTANCE);
    sensor2->setTrigger(SONAR_TRIGGER_2);
    _sensors.push_back(sensor2);    }
#endif
Marco Martins
@mamartins
And crates new Constants for the sensor nr 2 trigger and echo
Marco Martins
@mamartins
*created
Max Prokhorov
@mcspr
@mamartins that should work. my main question is how it does "stop responding"; does it not show sensor readings, web alert shows connection lost or readings are 0 both web and telnet?
julianwb
@julianwb
Is there somewhere I can add information about devices not mentioned in https://github.com/xoseperez/espurna/wiki/Hardware? Have a UK (Amazon) device Maxcio W-UK007S working, (also the older Teckin SP23 .. the one with power monitoring).
Max Prokhorov
@mcspr
@julianwb feel free to update the page with the name+flag entry, thanks for checking those devices out. we also do have some duplicates mentioned in the code/espurna/config/hardware.h comments when it's appropriate
julianwb
@julianwb
@mcspr I have overriden some of the hardware.h in my custom.h in order to configure these. Should I make a PR with updated hardware.h, or just describe the changes on the Wiki?
Max Prokhorov
@mcspr
hardware.h would be preferable
(however that depends on the extent of changes, can't really tell from device names)
julianwb
@julianwb
@mcspr OK, will do over the next day or two. Changes consist of redefining LED, SW and Relay pins only at present, I will check and fix HLW8012 ratios before submitting.
julianwb
@julianwb
@mcspr PR created, hopefully it'll be OK, happy to fix as required.
I have a change I have made for my personal use that could be of interest.
julianwb
@julianwb
And another thing: locally I have added the ability to switch on relay, and for it to remain on until the current consumption is less than a supplied value. This is of use to me when I trigger say a washing machine, I want the cycle to finish but different cycles take different times, so "pulse" as it is is no help. Would this be of interest to others? Currently the work is not suitable for merge, I would need to "do it properly"! E.g. I am using the "pulse" parameter as an indicator - if < 0 then the value is interpreted as a current threshold. This may or may not be deemed acceptable. Definitely bad: I have exposed getCurrent from sensor.ino .. pretty sure I should be using "broker" but I haven't found an example .. any pointers would be helpful.
Max Prokhorov
@mcspr
@julianwb thanks! will check it out later
btw broker already sends data to rpn rules module, which may be used as-is or extended with some kind of timer
i.e. don't turn off relay instantly, but set up a timer when the value matches the condition. see https://github.com/xoseperez/espurna/wiki/RPN-Rules
julianwb
@julianwb
@mcspr Thanks - I found some broker stuff, and have fixed that bit. I have modified only relay.ino and I am using relayStatus, so it is using a timer. Same functionality could almost certainly be implemented in RPN rules - but I find the "pulse" extension really easy to use. If no one else wants it that's fine - I'll keep it for me, but if it is of potential use then maybe it could be merged. If OK with you I will put up a PR (feel free to reject it as and when) .. as that is an easy way to present what I have done, comment would be welcome.
Max Prokhorov
@mcspr
@julianwb please do
julianwb
@julianwb
@mcspr I have create a "speculative" PR .. would welcome your comments. It does what I want, but that doesn't mean it is acceptbale in the code base I know :)
karmacoma92
@karmacoma92

hi again, I'm still going in circles with TZ.h, I have added "#include </home/oscar/.platformio/packages/framework-arduinoespressif8266/cores/esp8266/TZ.h>" but with no luck, now I get the following:

/home/oscar/PlatformIO/Projects/espurna-1.14.2.PA5/espurna/code/espurna/ntp.ino: In function 'String _ntpGetServer()':
/home/oscar/PlatformIO/Projects/espurna-1.14.2.PA5/espurna/code/espurna/ntp.ino:174:44: error: invalid conversion from 'const ip_addr_t {aka const ip4_addr}' to 'uint32_t {aka unsigned int}' [-fpermissive]
server = IPAddress(sntp_getserver(0)).toString();
^
In file included from /home/oscar/.platformio/packages/framework-arduinoespressif8266@2.20402.4/libraries/ESP8266WiFi/src/ESP8266WiFi.h:31:0,
from espurna/wifi.h:12,
from /home/oscar/PlatformIO/Projects/espurna-1.14.2.PA5/espurna/code/espurna/espurna.ino:38:
/home/oscar/.platformio/packages/framework-arduinoespressif8266@2.20402.4/cores/esp8266/IPAddress.h:48:9: error: initializing argument 1 of 'IPAddress::IPAddress(uint32_t)' [-fpermissive]
IPAddress(uint32_t address);
^
/home/oscar/PlatformIO/Projects/espurna-1.14.2.PA5/espurna/code/espurna/ntp.ino: In function 'void _ntpConfigure()':
/home/oscar/PlatformIO/Projects/espurna-1.14.2.PA5/espurna/code/espurna/ntp.ino:220:33: error: invalid conversion from 'const char' to 'long int' [-fpermissive]
configTime(cfg_tz.c_str(), _ntp_server.c_str());
^
/home/oscar/PlatformIO/Projects/espurna-1.14.2.PA5/espurna/code/espurna/ntp.ino:220:54: error: invalid conversion from 'const char
' to 'int' [-fpermissive]
configTime(cfg_tz.c_str(), _ntp_server.c_str());
^
/home/oscar/PlatformIO/Projects/espurna-1.14.2.PA5/espurna/code/espurna/ntp.ino:220:55: error: too few arguments to function 'void configTime(long int, int, const char, const char, const char)'
configTime(cfg_tz.c_str(), _ntp_server.c_str());
^
In file included from /tmp/tmpGCxRSF:1:0:
/home/oscar/.platformio/packages/framework-arduinoespressif8266@2.20402.4/cores/esp8266/Arduino.h:295:17: note: declared here
extern "C" void configTime(long timezone, int daylightOffset_sec,
^
/home/oscar/PlatformIO/Projects/espurna-1.14.2.PA5/espurna/code/espurna/ntp.ino: In function 'void _ntpBrokerSchedule(int)':
/home/oscar/PlatformIO/Projects/espurna-1.14.2.PA5/espurna/code/espurna/ntp.ino:264:23: error: 'class Ticker' has no member named 'once_scheduled'
_ntp_broker_timer.once_scheduled(offset ?: 1, _ntpBrokerCallback);
^
**
[.pio/build/generic-esp01s-dht11-10-ota/src/espurna.ino.cpp.o] Error 1

please help
Oscar

Max Prokhorov
@mcspr
@karmacoma92 platform = arduino_core_2_4_2 does not support tz variable through configTime https://github.com/esp8266/Arduino/blob/bb28d4a3927758b0b345579792cdeebbc9e2e6a3/cores/esp8266/time.c#L58