by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Sep 20 22:13
    mcspr edited #2357
  • Sep 20 22:11
    mcspr synchronize #2357
  • Sep 20 19:17
    mcspr edited #2357
  • Sep 20 19:17
    mcspr edited #2357
  • Sep 20 19:15
    mcspr edited #2357
  • Sep 20 19:15
    mcspr synchronize #2357
  • Sep 19 19:36
    mcspr commented #2358
  • Sep 19 19:33
    mcspr commented #2358
  • Sep 19 12:23
    vdj69 edited #2358
  • Sep 19 12:21
    vdj69 labeled #2358
  • Sep 19 12:21
    vdj69 opened #2358
  • Sep 19 04:02
    mcspr commented #2356
  • Sep 19 04:01
    mcspr commented #2356
  • Sep 19 04:00
    mcspr commented #2356
  • Sep 18 16:15
    wildwiz commented #2356
  • Sep 18 16:14
    wildwiz commented #2356
  • Sep 18 16:12
    wildwiz commented #2356
  • Sep 18 16:11
    wildwiz commented #2356
  • Sep 18 10:12
    alextircovnicu commented #2357
  • Sep 18 09:40
    luebbe commented #2357
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 ?
should i try flashing the original firmware before , would that work ota?
Max Prokhorov
@mcspr
Pascal Tempier
@ptempier
@mcspr i am not sure, i can use the UI ? or do i need to setup telnet ota?
ptempier @ptempier has no idea how to setup telnet ota
Max Prokhorov
@mcspr
web works too. telnet snippet in the issue was just an example
telnet -> terminal
Pascal Tempier
@ptempier
ok , that worked
soapyapi
@soapyapi
Hello everyone. Today something strange happened: my sonoff pow r2 + espurna just stopped working. No more wifi signal, not eve a boot up. I reflashed the device and reconfigured everything. Seems to work now. Only question is: for how long ? Anyone run into a similar issue ? Could it be that the device just self-corrupts ?
Nils Strelow
@nstrelow
when is it ok to bump/repost my question? :P
Max Prokhorov
@mcspr
@soapyapi depends on the version. also there were some issues regarding r2 rebooting constantly, did it have ok uptime? we do write crash log by default, but idk how that would fare when doing it a lot.
soapyapi
@soapyapi
@mcspr > alwazs using latest stable version. no idea about the uptime, will check.
Nils Strelow
@nstrelow

Following problem:
Flashed ESP Core 2.6.3 on my Sonoff S20
Now I cannot flash espurna (which uses ESP Core 2.3.0 I believe)

Any way to reset everything so I can flash stuff with ESP Core 2.3.0 again?

Nils Strelow
@nstrelow
(or SDK 1.5.3)
SilentFez
@SilentFez
Hi! I've got a couple of blitzwolf switches flashed with espurna. If/when I lose wifi connection or my router is having trouble the switch relay turns off. Is that the intended outcome when they no longer can connect to wifi? In the switches settings I have boot mode to always on, pulse mode is don't pulse. Is there a setting that can prevent it from switching on wifi loss?
Max Prokhorov
@mcspr
@SilentFez xoseperez/espurna#2104 & xoseperez/espurna#1802 if device crashes constantly, the system check wont start relay module
fragande
@fragande
Hi there! I have a problem with a couple of Sonoff Basic's (I think R2) running espurna 1.14.1. They both randomly switch off and become unavailable while making a high pitch buzzing noise. I'm thinking this is a hardware problem, but it's a bit weird that they both behave this way. Has anyone else experienced this or know what could be the cause?
SilentFez
@SilentFez
@mcspr Thanks, will have a look
60pfennig
@60pfennig
hey i flashed my teckin sb50 bulb with https://github.com/ct-Open-Source/tuya-convert and installed the included ESPurna. After that I recognized, that Tasmota is fittig better my puropses, so I tried to upload the tasmota.bin in the upgrad dialog. First nothing happend, so I tried again. Short time later I got an error saying it could not upload the file. I switched from the AP Wifi to my homenetwork to search for a solution. After I watned to come back to the bulb the AP was gone. I tried to reset the bulb with the on-off-on-off-on scheme but nothing changed. Is there a solution for this?
thanks :)
Max Prokhorov
@mcspr
@60pfennig included espurna version should probably be updated :/ 1.14.1 will print error string, but you would need to use our releases page
it may be running tasmota now though, if you rebooted. updater may have successfully uploaded fw the first time and set up things to do update sequence and overwrite the firmware.
60pfennig
@60pfennig
@mcspr but if it would run tasmota, it would send an AP which it unfortunately doesn't.. :/
I have nothing to connect right now
Max Prokhorov
@mcspr
@60pfennig depends on the version though? i am not sure which one is used in tuya repo, but we had some issues when people tried to use -minimal tasmota binaries and they failed to boot
60pfennig
@60pfennig
@mcspr ok but ist there anything in can do?
Max Prokhorov
@mcspr
not really, if there is no working firmware
60pfennig
@60pfennig
@mcspr you said that there were problems with flashing minimal tasmota binaries..but I used the full, recommended and latest tasmota release. But yes, I guess the firmware wont work anyways. :D
thank you for your help!
adbensi
@adbensi
Hello! I made one copy on the 08/02 .. and I build another today, but this last are rebooting device.. please, it is possible to trace back to know why?

[000278] [TELNET] Listening on port 23
[000280] [WEBSERVER] Webserver running on port 80
[000281] [LIGHT] LIGHT_PROVIDER = 2
[000281] [LIGHT] Number of channels: 0
[000299] [RELAY] Retrieving mask: 0b0
[000300] [RELAY] Relay #0 boot mode 2
[000300] [RELAY] Relay #1 boot mode 2
[000300] [RELAY] Relay #2 boot mode 2
[000302] [RELAY] Relay #3 boot mode 2
[000305] [RELAY] Relay #4 boot mode 2
[000308] [RELAY] Relay #5 boot mode 2
[000312] [RELAY] Relay #6 boot mode 2
[000315] [RELAY] Relay #7 boot mode 2
[000318] [RELAY] Relay #8 boot mode 2
[000321] [RELAY] Relay #9 boot mode 2
[000325] [RELAY] Relay #10 boot mode 2
[000330] [RELAY] Number of relays: 11
[000332] [BUTTON] Number of buttons: 1
[000335] [LED] Number of leds: 1
[000338] [MQTT] AsyncMqttClient, SSL DISABLED, Autoconnect ENABLED
[000343] [MQTT] Client DISABLED, DISCONNECTED
[000347] [MQTT] Retry WAITING (Now 347, Last 0, Delay 5000, Step 5000)

Exception (28):
epc1=0x4000bdc8 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000

>>>stack>>>

ctx: cont
sp: 3ffffd00 end: 3fffffc0 offset: 01a0
3ffffea0:  3fffdad0 3ffffeec 3ffffee0 3fff0d60  
3ffffeb0:  3fffff10 3fffff20 00000000 4022b89f  
3ffffec0:  00000017 3fffff10 00000050 402326a0  
3ffffed0:  00000003 3fffff10 00000050 3fffff20  
3ffffee0:  3fffff10 00000017 3fff0d60 4022b90a  
3ffffef0:  3fffdad0 3fffff10 3ffe8ba8 3fff0f64  
3fffff00:  3fffdad0 3fff0d60 3ffe8ba8 402095f6  
3fffff10:  00706374 0074726f 83000000 ffffffff  
3fffff20:  6e6c6574 79007465 8620278c 70747400  
3fffff30:  4020d100 80000000 40236364 40236350  
3fffff40:  4020b5f8 00000000 40236364 40236350  
3fffff50:  4020bc54 6d754479 40236364 3fff0f64  
3fffff60:  3fffdad0 00000000 0000000e 4021aac4  
3fffff70:  74736f00 656d616e 80efef00 ffffffff  
3fffff80:  3fff3000 000e000f 80efeffe feefeffe  
3fffff90:  feefeffe feefeffe feefeffe feefeffe  
3fffffa0:  feefeffe feefeffe 3fff0f24 40233c9c  
3fffffb0:  feefeffe feefeffe 3ffe8600 4010106d  
<<<stack<<<

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

load 0x4010f000, len 1384, room 16 
tail 8
chksum 0x2d
csum 0x2d
vb3acf27f
~ld
⸮bl`r⸮nl[000088] 

---8<-------
adbensi
@adbensi
Decoder say:
Exception 28: LoadProhibited: A load referenced a page mapped with an attribute that does not permit loads
PC: 0x4000bdc8
EXCVADDR: 0x00000000

Decoding stack results
0x4022b89f: esp8266::MDNSImplementation::MDNSResponder::addService(char const*, char const*, char const*, unsigned short) at C:\Users\Alexandre\Documents\Arduino\1.8.12\hardware\esp8266com\esp8266\libraries\ESP8266mDNS\src\LEAmDNS.cpp line 308
0x402326a0: String::~String() at C:\Users\Alexandre\Documents\Arduino\1.8.12\hardware\esp8266com\esp8266\cores\esp8266\WString.cpp line 125
0x4022b90a: esp8266::MDNSImplementation::MDNSResponder::addService(String const&, String const&, unsigned short) at C:\Users\Alexandre\Documents\Arduino\1.8.12\hardware\esp8266com\esp8266\libraries\ESP8266mDNS\src\LEAmDNS.cpp line 378
0x402095f6: mdnsServerSetup() at C:\Users\Alexandre\Documents\Arduino\build\teste_espurna\espurna\code\espurna/mdns.ino line 47
0x4020d100: _apiWebSocketOnConnected(ArduinoJson::JsonObject&) at C:\Users\Alexandre\Documents\Arduino\build\libraries\ArduinoJson\src/ArduinoJson/JsonObjectSubscript.hpp line 41
0x40236364: std::_Function_base::_Base_manager ::_M_manager(std::_Any_data&, std::_Any_data const&, std::_Manager_operation) at c:\users\alexandre\documents\arduino\1.8.12\hardware\esp8266com\esp8266\tools\xtensa-lx106-elf\xtensa-lx106-elf\include\c++\4.8.2/functional line 1934
0x40236350: std::_Function_handler ::_M_invoke(std::_Any_data const&, ArduinoJson::JsonObject&) at c:\users\alexandre\documents\arduino\1.8.12\hardware\esp8266com\esp8266\tools\xtensa-lx106-elf\xtensa-lx106-elf\include\c++\4.8.2/functional line 2069
0x4020b5f8: _mqttWebSocketOnData(ArduinoJson::JsonObject&) at C:\Users\Alexandre\Documents\Arduino\build\teste_espurna\espurna\code\espurna/mqtt.ino line 457
0x40236364: std::_Function_base::_Base_manager ::_M_manager(std::_Any_data&, std::_Any_data const&, std::_Manager_operation) at c:\users\alexandre\documents\arduino\1.8.12\hardware\esp8266com\esp8266\tools\xtensa-lx106-elf\xtensa-lx106-elf\include\c++\4.8.2/functional line 1934
0x40236350: std::_Function_handler ::_M_invoke(std::_Any_data const&, ArduinoJson::JsonObject&) at c:\users\alexandre\documents\arduino\1.8.12\hardware\esp8266com\esp8266\tools\xtensa-lx106-elf\xtensa-lx106-elf\include\c++\4.8.2/functional line 2069
0x4020bc54: _mqttWebSocketOnVisible(ArduinoJson::JsonObject&) at C:\Users\Alexandre\Documents\Arduino\build\teste_espurna\espurna\code\espurna/mqtt.ino line 450
0x40236364: std::_Function_base::_Base_manager ::_M_manager(std::_Any_data&, std::_Any_data const&, std::_Manager_operation) at c:\users\alexandre\documents\arduino\1.8.12\hardware\esp8266com\esp8266\tools\xtensa-lx106-elf\xtensa-lx106-elf\include\c++\4.8.2/functional line 1934
0x4021aac4: setup() at C:\Users\Alexandre\Documents\Arduino\build\teste_espurna\espurna\code\espurna/espurna.ino line 226
0x40233c9c: loop_wrapper() at C:\Users\Alexandre\Documents\Arduino\1.8.12\hardware\esp8266com\esp8266\cores\esp8266\core_esp8266_main.cpp line 177
adbensi
@adbensi
image.png
My config is
adbensi
@adbensi
Excuse me, I made a mistake in general.h
Problem solved.. :)
adbensi
@adbensi
Guys, please, I can auth login on the Chrome, but not on the Edge. It is normal on dev yet?