Skip to content
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

Issue when toggling from Web Interface #266

Closed
jampola opened this issue Jan 23, 2017 · 3 comments
Closed

Issue when toggling from Web Interface #266

jampola opened this issue Jan 23, 2017 · 3 comments

Comments

@jampola
Copy link

jampola commented Jan 23, 2017

Replicated the issue running Debian Jessie 64bit in the following browsers:

Firefox (45.6.0 ESR)
Chromium (53.0.2785.143)
Chrome (55.0.2883.87)

Firefox console upon POST:

A form was submitted in the windows-1252 encoding which cannot encode all Unicode characters, so user input may get corrupted. To avoid this problem, the page should be changed so that the form is submitted in the UTF-8 encoding either by changing the encoding of the page itself to UTF-8 or by specifying accept-charset=utf-8 on the form element.

The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol.

However I have no issue with curl http://sonoffip/?={1,0} or calling that URL directly in the address bar.

I have recompiled with:

"<meta http-equiv=\"Content-type\" content=\"text/html;charset=UTF-8\">"

This removes the browser complaining about char encoding but the issue still persists.

@arendst
Copy link
Owner

arendst commented Jan 23, 2017

I can only test on windows and there I see no problems regarding toggling from the webpage with either firefox 50.1.0, IE 11, Edge or Chrome 55.0.2883.87

What does fail is firmware uploading using Firefox while the others work just fine.

I did add your utf-8 suggestion in future versions.

@jampola
Copy link
Author

jampola commented Jan 23, 2017

Okay, so I just tried it on Chome on Android and IE10 on Windows 7, same issue. I'll try do a fresh reflash tomorrow on another Sonoff Basic. And sorry, neglected to mention I was flashing 3.2.7, which appears to be the latest.

I did add your utf-8 suggestion in future versions.

Great! Not that I see it making a huge difference apart from some pesky console logs complaining about UTF-8 :)

arendst added a commit that referenced this issue Jan 24, 2017
3.2.8 20170124
* Change PowerOnState function to only trigger when Power On (and not on
restart) (#238)
* Add command LedPower On|Off to control main led (#247)
* Add charset=utf-8 to webpages (#266)
* Update Hue emulation (#268)
* Rewrite WS2812 code and prep for 4.0
* Add support for domoticz Dimmer on WS2812
* Add commands SwitchTopic and SwitchRetain On|Off to be used with
external switch instead of ButtonTopic and ButtonRetain
* Enforce at least IDE 1.6.10 and ESP8266 2.3.0
arendst added a commit that referenced this issue Jan 24, 2017
3.9.1 20170124
* Change PowerOnState function to only trigger when Power On (and not
just restart) (#238)
* Move HLW interrupts back to RAM and make WS2812_DMA optional as it
generates Exception on Pow (#264)
* Add charset=utf-8 to webpages (#266)
* Update Hue emulation (#268)
* Fix status module number
* Add support for domoticz Dimmer on Sonoff_Led and WS2812
* Fix possible ESP8285 flash problem by updating Flash Chip Mode to DOUT
during web upload
arendst added a commit that referenced this issue Jan 24, 2017
3.2.9 20170124
* Fix compile error when MQTT is disabled (#269)
* Change PowerOnState function to only trigger when Power On (and not on
restart) (#238)
* Add command LedPower On|Off to control main led (#247)
* Add charset=utf-8 to webpages (#266)
* Update Hue emulation (#268)
* Rewrite WS2812 code and prep for 4.0
* Add support for domoticz Dimmer on WS2812
* Add commands SwitchTopic and SwitchRetain On|Off to be used with
external switch instead of ButtonTopic and ButtonRetain
* Enforce at least IDE 1.6.10 and ESP8266 2.3.0
arendst added a commit that referenced this issue Jan 24, 2017
3.2.10 20170124
* Add confirmation before Reset Configuration via webpage (#244)
* Add WS2812 features (see Wiki commands)
* Fix compile error when MQTT is disabled (#269)
* Change PowerOnState function to only trigger when Power On (and not on
restart) (#238)
* Add command LedPower On|Off to control main led (#247)
* Add charset=utf-8 to webpages (#266)
* Update Hue emulation (#268)
* Rewrite WS2812 code and prep for 4.0
* Add support for domoticz Dimmer on WS2812
* Add commands SwitchTopic and SwitchRetain On|Off to be used with
external switch instead of ButtonTopic and ButtonRetain
* Enforce at least IDE 1.6.10 and ESP8266 2.3.0
arendst added a commit that referenced this issue Jan 24, 2017
3.9.2 20170124
* Add confirmation before Reset Configuration via webpage (#244)
* Add WS2812 features (see Wiki commands)
* Change PowerOnState function to only trigger when Power On (and not
just restart) (#238)
* Move HLW interrupts back to RAM and make WS2812_DMA optional as it
generates Exception on Pow (#264)
* Add charset=utf-8 to webpages (#266)
* Update Hue emulation (#268)
* Fix status module number
* Add support for domoticz Dimmer on Sonoff_Led and WS2812
* Fix possible ESP8285 flash problem by updating Flash Chip Mode to DOUT
during web upload
@arendst
Copy link
Owner

arendst commented Jan 24, 2017

See #232

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants