by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jul 09 21:10
    davebuk commented #2296
  • Jul 09 10:00
    mcspr commented #2296
  • Jul 09 09:56
    mcspr commented #2296
  • Jul 09 09:33
    mcspr commented #2287
  • Jul 09 09:32
    mcspr commented #2287
  • Jul 08 21:52
    mcspr labeled #2287
  • Jul 08 21:52
    mcspr labeled #2287
  • Jul 08 21:52
    mcspr labeled #2287
  • Jul 08 21:52
    mcspr milestoned #2287
  • Jul 08 21:51

    mcspr on zeroconf-bump

    (compare)

  • Jul 08 21:51

    mcspr on dev

    ota.py: don't use deprecated ze… (compare)

  • Jul 08 21:51
    mcspr closed #2299
  • Jul 08 21:51
    mcspr closed #2287
  • Jul 08 21:39
    mcspr opened #2299
  • Jul 08 21:24

    mcspr on zeroconf-bump

    version bump (compare)

  • Jul 08 21:23

    mcspr on zeroconf-bump

    ota.py: don't use deprecated ze… (compare)

  • Jul 08 20:28
    davebuk commented #2296
  • Jul 08 17:22
    mcspr commented #2279
  • Jul 08 17:18
    craiggenner commented #2279
  • Jul 08 15:03
    mcspr synchronize #2274
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
if you insist on using 2.4.2, you might want to modify the code to match the recent version of it https://github.com/esp8266/Arduino/blob/f066ed2495c8d6f04841243d90f6deaef21a0119/cores/esp8266/time.cpp#L135
but you will still have an issue with ticker, see libraries/Ticker in the same tree
karmacoma92
@karmacoma92

hi again, this time I'm facing this:

[163904] [WEBSERVER] Request: GET /auth
[163939] [WEBSOCKET] #1 connected, ip: 192.168.4.2, url: /ws
[164086] [WEBSOCKET] #1 error(1002): Invalid UTF-8 in text frame"ipL�- $ ' mask","dns","stored"],"networks":[]},"max":5}
[164089] [WEBSOCKET] #1 disconnected
[165659] [WEBSERVER] Request: GET /index.html
[165789] [WEBSERVER] Request: GET /auth
[165812] [WEBSOCKET] #2 connected, ip: 192.168.4.2, url: /ws
[165962] [WEBSOCKET] #2 error(1002): Invalid UTF-8 in text frame"9f␟�� j␁
[165964] [WEBSOCKET] #2 disconnected
[166904] [WEBSERVER] Request: GET /index.html
[167031] [WEBSERVER] Request: GET /auth
[167055] [WEBSOCKET] #3 connected, ip: 192.168.4.2, url: /ws
[167205] [WEBSOCKET] #3 error(1002): Invalid UTF-8 in text frame
[167207] [WEBSOCKET] #3 disconnected

after trying with "platform = ${common.arduino_core_2_6_3}", any hints?
Thanks once more
Oscar

BTW, it doesn't allow me to change almost nothing but the password
Jeremy White
@jwhite
Trying to build under platform.io
and getting this error :

ompiling .pio\build\arilux-al-lc02\lib77b\ESP Async WebServer\WebAuthentication.cpp.o

include "sdkconfig.h"

                   ^

compilation terminated.
* [.pio\build\arilux-al-lc02\libb1a\AsyncTCP_ID1826\AsyncTCP.cpp.o] Error 1

any ideas?
Jeremy White
@jwhite
added this the the platform.io config
and it seems to fix it
Max Prokhorov
@mcspr
@karmacoma92 can you share the resulting .elf & .bin? from .pio/build/envname
karmacoma92
@karmacoma92

hi, unfortunately I have deleted old .elf & .bin, and I have replaced them with new ones, but something strange is still happening since it doesn't allow me to add any new wifi network and it still not appearing any sensors fields:

STATUS
Current configuration
Manufacturer
GENERIC
Device
ESP01S_DHT11_10
Chip ID

Max Prokhorov
@mcspr
do you have WIFI<NUM>_... flags set?
Max Prokhorov
@mcspr
also see https://github.com/xoseperez/espurna/issues/2104#issuecomment-573847037 if you had no issues with 2.4.2 connectivity
selecting sdk 2.2.1 might help, erase.config command too. so far I am not seeing any issues with communication, but what you are describing may be explained by missing ws packets. like when you can't create network and it says "Max number of networks reached", for some reason that message was lost (part of which you have seen in the ws log as error(1002): Invalid UTF-8 in text frame"ipL�- $ ' mask","dns","stored"],"networks":[]},"max":5})
karmacoma92
@karmacoma92
do you have WIFI<NUM>_... flags set? - not that I know
karmacoma92
@karmacoma92
erase.config does not help at least not with the format I used it "ERASE.CONFIG"
karmacoma92
@karmacoma92
I don't know how to select "sdk 2.2.1"
karmacoma92
@karmacoma92
sorry i just noticed -DPIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK221
karmacoma92
@karmacoma92
hi, no luck with sdk 2.2.1
[094930] [MAIN] CPU chip ID: 0x8E1600
[094933] [MAIN] CPU frequency: 80 MHz
[094936] [MAIN] SDK version: 2.2.1(cfd48f3)
[094940] [MAIN] Core version: 2.6.3
[094943] [MAIN] Core revision: 3d128e5c
[094947] [MAIN] Build time: 1582319254
karmacoma92
@karmacoma92

I just noticed it keeps on rebooting
ets Jan 8 2013,rst cause:4, boot mode:(3,6)

wdt reset
load 0x4010f000, len 1392, room 16
tail 0
chksum 0xd0
csum 0xd0
v3d128e5c
~ld

ets Jan 8 2013,rst cause:4, boot mode:(3,6)

wdt reset
load 0x4010f000, len 1392, room 16
tail 0
chksum 0xd0
csum 0xd0
v3d128e5c
~ld
[000184]

karmacoma92
@karmacoma92

After erasing the flash and flashing the latest build back it does still happen

[WEBSERVER] Request: GET /auth
[051035] [WEBSOCKET] #1 connected, ip: 192.168.4.2, url: /ws
[051178] [WEBSOCKET] #1 error(1002): Invalid UTF-8 in text frame
[051181] [WEBSOCKET] #1 disconnected
[054080] [SENSOR] Error reading data from DHT11 @ GPIO2 (error: 3)
[060005] [MAIN] System OK

I could only change the password, no wifi, nothing

thanks
Oscar
Max Prokhorov
@mcspr
@karmacoma92 i'll try to check sensor config some time later, but I don't remember having any issues a week ago with it loading webui. keeping on with the debug - can you send the resulting .elf? only one device has this issue or all of 2.6.3 Core builds? any way you can capture http session with wireshark / tcpdump so we can see exactly the way frames are sent?
karmacoma92
@karmacoma92

can you send the resulting .elf?
sure, where shall I sent it to?

only one device has this issue or all of 2.6.3 Core builds?
as far as I know relays doesn't have any issue but I haven't tested any more

any way you can capture http session with wireshark / tcpdump so we can see exactly the way frames are sent?
good idea, please let me know where shall I upload it

thanks once more
Oscar

(via attach file)
Muhammad Rabieh
@Muhammad-Rabieh

I'm developing an Android app that supposed to send PUT request to espurna and when I try the same request using curl, I get success response, but from the Android app I get 404 error with PUT request, here is the request for both from mobile app and curl, I listened to both requests on my PC using netcat

user@Laptop:~$ nc -l 192.168.1.104 55555
PUT /api/relay/0 HTTP/1.1
Host: 192.168.1.104:55555
User-Agent: curl/7.58.0
Accept: application/json
Content-Length: 31
Content-Type: application/x-www-form-urlencoded

apikey=2E5DE48567FB10F2&value=1


user@Laptop:~$ nc -l 192.168.1.104 55555
PUT /api/relay/0 HTTP/1.1
Accept: application/json
Content-Type: application/json; charset=utf-8
User-Agent: Dalvik/2.1.0 (Linux; U; Android 9; HRY-LX1MEB Build/HONORHRY-LX1MEB)
Host: 192.168.1.104:55555
Connection: Keep-Alive
Accept-Encoding: gzip
Content-Length: 31

apikey=2E5DE48567FB10F2&value=1

here is my android java request

public void jsonRequestVolley(int method, String url, String requestBody) {         
        RequestQueue queue = Volley.newRequestQueue(context); 

        JsonObjectRequest jsonRequest = new JsonObjectRequest(   
                method,                           
                url,                                            
                requestBody,
                successResponse(),  
                errorResponse()   
        )  
        {

            /**
             * Passing some request headers
             * */
            @Override
            public Map<String, String> getHeaders() {
                HashMap<String, String> headers = new HashMap<String, String>();
                headers.put("Accept", "application/json");
                return headers;
            }

        };

        queue.add(jsonRequest);
    }

the working curl command is

curl -X PUT -H "Accept: application/json" http://192.168.1.105:55555/api/relay/0 --data "apikey=2E5DE48567FB10F2&value=1"

```

Max Prokhorov
@mcspr
Content-Type: application/json? You are sending form data request, not json
see curl: Content-Type: application/x-www-form-urlencoded
Muhammad Rabieh
@Muhammad-Rabieh
when I tried to put headers.put("Content-Type", "application/x-www-form-urlencoded");
it did not work also
I tried also another server "Basket" with my app and it respond normally why espruna is behave different please I need help for that.
Max Prokhorov
@mcspr
no idea. try not using json object request? adding Accept for json response is enough
Muhammad Rabieh
@Muhammad-Rabieh
thank you for your response.
Muhammad Rabieh
@Muhammad-Rabieh
@mcspr thank you very much I fixed the issue by your guidance.

I fixed the header because of local server requirements so, it worked now it look like
```nc -l 192.168.1.104 55555
PUT /api/relay/0 HTTP/1.1
Accept: application/json
Content-Type: application/x-www-form-urlencoded
User-Agent: Dalvik/2.1.0 (Linux; U; Android 9; HRY-LX1MEB Build/HONORHRY-LX1MEB)
Host: 192.168.1.104:55555
Connection: Keep-Alive
Accept-Encoding: gzip
Content-Length: 31

I added the following to Android code

@Override
public Map<String, String> getHeaders() {
HashMap<String, String> headers = new HashMap<String, String>();

            headers.put("Accept", "application/json");
            return headers;
        }

@Override
public String getBodyContentType() {
return "application/x-www-form-urlencoded";
}
```
all in request code.

Max Prokhorov
@mcspr
@sfilinto "Unicode decode error has occurred, please remove invalid (non-ASCII or non-UTF8) characters from /espurna/code/espurna/espurna.ino.cpp file" see xoseperez/espurna#2163, python 2 is the issue
John O'Hare
@JohnOH
Elektor have published a LoRa node based on STM32 and RFM95W:
elfun
@copilador

Hi, I have done the integration of the MUVIT_IO MIOBULB008, it seems to work, someone can confirm if it is correct ....

// ------------------------------------------------ -----------------------------
// MUVIT_IO_MIOBULB008
// ------------------------------------------------ -----------------------------

elif defined (MUVIT_IO_MIOBULB008)

// Info
#define MANUFACTURER "MUVIT_IO"
#define DEVICE "MIOBULB008"
#define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
#define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
#define DUMMY_RELAY_COUNT 1

// Light
#define LIGHT_CHANNELS 5
#define LIGHT_CH1_PIN 4 // RED
#define LIGHT_CH2_PIN 12 // GREEN
#define LIGHT_CH3_PIN 14 // BLUE
#define LIGHT_CH4_PIN 13 // WARM WHITE
#define LIGHT_CH5_PIN 5 // COLD WHITE
#define LIGHT_CH1_INVERSE 0
#define LIGHT_CH2_INVERSE 0
#define LIGHT_CH3_INVERSE 0
#define LIGHT_CH4_INVERSE 0
#define LIGHT_CH5_INVERSE 0
Hello again.
has espurna support for SONOFF D1 Smart Wifi Dimmer?
Nils Strelow
@nstrelow

Hello folks,
I have a following problem, would be super happy for some pointers:
Sonoff S20->flashed espurna -> SoftAP is not firing up, no leds are blinking

  • tried both itead-sonoff-s20 and espurna-core
  • only garbage on Serial Monitor (tried all baud rates)
  • Uploading an arduino sketch works 100% fine: Can print to serial and turn on LED (GPIO13)
  • also plugged it into wall socket

Any ideas? Something seems broken

Pascal Tempier
@ptempier
Hello
i made a mistake while using tuya convert and flashed espurna on one device, is it dangerous to try to upgrade or restore to tasmota ?