-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please greyout SSDP option until bug is solved #1998
Comments
That's a good feature I guess. |
@TD-er |
@TD-er @Grovkillen maybe it is a good idea to compare some timings from old ESPEasy to actual development version ?? :) |
@uzi18 What timings do you mean? |
something that will give us (new users) clue about performance of new and old firmware |
|
Should be disabled with PR #2069 |
A shame the SSDP option is not working anymore. Any idea of the cause? I really liked it. |
I never used it myself, so I don't know what is the real problem here. Edit: |
No the bug itself is not fixed. The webpage has the checkbox disabled, the code is still there. |
I know about the grey checkbox (added the disabled flag myself), but I was wondering if you maybe did test to see if the functionality may have been fixed by manually enabling the option again. |
I tested the function by setting DEFAULT_USE_SSDP true. |
That old code does not run with newer core libraries, so it must then be tested with a different core library. |
With trail-and-error I build a working 'preliminary' version. As I'm not a programmer and have very very limited knowledge of C, I used the library/code from esp8266/Arduino#2283 (comment) by Pawel Dino. I made some modifications in webserver.ino / espeasy.ino. #if defined(ESP8266)
if (Settings.UseSSDP)
{
WebServer.on(F("/ssdp.xml"), HTTP_GET, []() {
WiFiClient client(WebServer.client());
SSDPDevice.schema(client);
});
SSDPDevice.setName("SSDP Test"); // change this later to resemble the unit name
SSDPDevice.setDeviceType("urn:schemas-upnp-org:device:BinaryLight:1");
SSDPDevice.setSchemaURL("ssdp.xml");
SSDPDevice.setSerialNumber(ESP.getChipId());
SSDPDevice.setURL("/");
SSDPDevice.setModelName("ESP8266 Home Control");
SSDPDevice.setModelNumber("ESP8266");
SSDPDevice.setManufacturer("Home Control");
} In espeasy.ino add #include <SSDPDevice.h> and in the function runeach30second remove the sspd_update() call with a call to SSDPDevice.handleClient(); in loop(). I will test later if this function can be place in run50TimesPerSecond. If the handleClient call isn't made frequently then the icon dissapears from the network neigborhood. I had to add some defines to SSDPDevice.cpp: #define pip41(ipaddr) ((u16_t)(((u8_t*)(ipaddr))[0]))
#define pip42(ipaddr) ((u16_t)(((u8_t*)(ipaddr))[1]))
#define pip43(ipaddr) ((u16_t)(((u8_t*)(ipaddr))[2]))
#define pip44(ipaddr) ((u16_t)(((u8_t*)(ipaddr))[3]))
#define LIP2STR(ipaddr) pip41(ipaddr), \
pip42(ipaddr), \
pip43(ipaddr), \
pip44(ipaddr) Maybe it's possible to look at the code/modifications and see at what point it differs from the original - this causes no reset so I'm happy with it. |
If you put it in the 50/sec function (or anywhere else), please also do a compare to see how much time it needs. |
In runOncePerSecond() it still functions but it seems this the max and avg duration is long compared to the 10p/s and 50p/s calls (in runEach30Seconds it 'fails';when you hit F5 in explorer it only appears after a while). For comparison: handleClient in main loop:
handleClient in run50TimesPerSecond()
handleClient in run10TimesPerSecond() still works with
handleClient in runOncePerSecond() also still works.
|
It looks like it only adds some sub-msec time to the loops, so that's fine. |
Version mega-20181101 normal 4096
Ref #1573 (14 Juli)
Ref #1330 (April 29!!!)
When enabling SSDP the unit goes into a bootloop.
This happens to the 2# units I tried.
Serial port Reset is the only way to stop it.
After Reset there is a strange mix of fixed IP (in GUI) and dynamic IP (connection behavior)
So secondary, I think the Reset function is not up-to-date.
A blank file is the only real solution (I guess)
Don't know if this is related to the current WiFi problems.
If not, I can imagine that this bug has no priority.
But ... please greyout the SSDP option for the time being.
Catch from the serial:
=============Exception (28) =========================
`INIT : Booting version: mega-20181101 (ESP82xx Core 00000000, NONOS SDK 2.2.1(cfd48f3), LWIP: 2.0.3)
96 : INIT : Warm boot #216 - Restart Reason: Exception
98 : FS : Mounting...
123 : FS : Mount successful, used 78563 bytes of 957314
474 : CRC : program checksum ...OK
511 : CRC : SecuritySettings CRC ...OK
589 : INIT : Free RAM:29000
590 : INIT : I2C
590 : INIT : SPI not enabled
594 : INIT : Pulse 12
3345 : INFO : Plugins: 46 [Normal] (ESP82xx Core 00000000, NONOS SDK 2.2.1(cfd48f3), LWIP: 2.0.3)
3347 : EVENT: System#Wake
3433 : WIFI : Set WiFi to STA
3465 : WIFI : Connecting POWLAN_R2 attempt #0
3466 : IP : Static IP : 192.168.1.91 GW: 192.168.1.1 SN: 255.255.255.0 DNS: 192.168.1.1
3479 : EVENT: System#Boot
3540 : EVENT: Flow#Count=0.00
3593 : EVENT: Flow#Total=0.00
3646 : EVENT: Flow#Time=0.00
3696 : Domoticz: Sensortype: 1 idx: 109 values: 0.0
3878 : SYS : 100.00
3880 : EVENT: Load#MUC21_Load=100.00
3944 : Domoticz: Sensortype: 1 idx: 110 values: 100
3976 : DS : Temperature: 20.37 (28-da-30-1-0-0-80-92)
3982 : EVENT: TempH#TemperatureH=20.37
4103 : ACT : TaskValueSet 12,1,1
4156 : Domoticz: Sensortype: 1 idx: 106 values: 20.4
4162 : Command: taskvalueset
4213 : DS : Temperature: 20.25 (28-ff-7c-68-a2-16-3-95)
4216 : EVENT: TempL#TemperatureL=20.25
4349 : ACT : TaskValueSet 7,1, 20.4-20.3
4365 : ACT : TaskValueSet 12,1,0
4417 : Domoticz: Sensortype: 1 idx: 107 values: 20.3
4589 : Dummy: value 1: 0.00
4589 : Dummy: value 2: 0.00
4589 : Dummy: value 3: 0.00
4590 : Dummy: value 4: 0.00
4595 : EVENT: DeltaT#Delta_T=0.00
4663 : ACT : TaskvalueSet 7,2, 0.0*-102+1122
4701 : EVENT: DeltaT#Delta_T_PWM=0.00
4817 : ACT : TaskvalueSet 7,3, 3
4945 : EVENT: DeltaT#Pin_PWM=0.00
5004 : ACT : PWM,13, 300
Exception (28):
epc1=0x4020c3f9 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000004 depc=0x00000000
ctx: cont
sp: 3ffffcd0 end: 3fffffd0 offset: 01a0
ets Jan 8 2013,rst cause:2, boot mode:(3,7)
load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
v00000000
~ld
ªU96 :
`
The text was updated successfully, but these errors were encountered: