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

Add WebUI example sketch #880

Merged
merged 9 commits into from
Sep 4, 2019
Merged

Conversation

mariusmotea
Copy link
Contributor

  • I did not had time to enable also the remote reception, but one it will be done i will create new PR.

@crankyoldgit
Copy link
Owner

crankyoldgit commented Aug 31, 2019

@mariusmotea Hey thanks for this. I'll take a deep look at it soon, but some basic things that need to be addressed.

  1. Can you please change the directory name and .ino file name to match? And perhaps a simpler consistent name would be best as people will see this as an example they can choose from a menu in the Arduino IDE. e.g. "Web-AC-control/Web-AC-control.ino"

  2. There are a large number of trivial code "style" lint issues that need to be addressed before it passes the automatic tests.
    e.g. https://travis-ci.org/crankyoldgit/IRremoteESP8266/jobs/578805537#L900

examples/WebInterface/esp8266-AC-control.ino:0:  No copyright message found.  You should have a line: "Copyright [year] <Copyright Owner>"  [legal/copyright] [5]
examples/WebInterface/esp8266-AC-control.ino:14:  At least two spaces is best between code and comments  [whitespace/comments] [2]
examples/WebInterface/esp8266-AC-control.ino:28:  Lines should be <= 80 characters long  [whitespace/line_length] [2]
examples/WebInterface/esp8266-AC-control.ino:41:  Should have a space between // and comment  [whitespace/comments] [4]
examples/WebInterface/esp8266-AC-control.ino:45:  Should have a space between // and comment  [whitespace/comments] [4]
examples/WebInterface/esp8266-AC-control.ino:52:  Lines should be <= 80 characters long  [whitespace/line_length] [2]
examples/WebInterface/esp8266-AC-control.ino:52:  At least two spaces is best between code and comments  [whitespace/comments] [2]
examples/WebInterface/esp8266-AC-control.ino:53:  Should have a space between // and comment  [whitespace/comments] [4]
examples/WebInterface/esp8266-AC-control.ino:54:  Lines should be <= 80 characters long  [whitespace/line_length] [2]
examples/WebInterface/esp8266-AC-control.ino:57:  Lines should be <= 80 characters long  [whitespace/line_length] [2]
examples/WebInterface/esp8266-AC-control.ino:57:  At least two spaces is best between code and comments  [whitespace/comments] [2]
examples/WebInterface/esp8266-AC-control.ino:58:  Lines should be <= 80 characters long  [whitespace/line_length] [2]
examples/WebInterface/esp8266-AC-control.ino:59:  Lines should be <= 80 characters long  [whitespace/line_length] [2]
examples/WebInterface/esp8266-AC-control.ino:61:  Lines should be <= 80 characters long  [whitespace/line_length] [2]
examples/WebInterface/esp8266-AC-control.ino:62:  Lines should be <= 80 characters long  [whitespace/line_length] [2]
examples/WebInterface/esp8266-AC-control.ino:63:  Should have a space between // and comment  [whitespace/comments] [4]
examples/WebInterface/esp8266-AC-control.ino:66:  Lines should be <= 80 characters long  [whitespace/line_length] [2]
examples/WebInterface/esp8266-AC-control.ino:66:  Should have a space between // and comment  [whitespace/comments] [4]
examples/WebInterface/esp8266-AC-control.ino:70:  Lines should be <= 80 characters long  [whitespace/line_length] [2]
examples/WebInterface/esp8266-AC-control.ino:70:  At least two spaces is best between code and comments  [whitespace/comments] [2]
examples/WebInterface/esp8266-AC-control.ino:79:  At least two spaces is best between code and comments  [whitespace/comments] [2]
examples/WebInterface/esp8266-AC-control.ino:84:  Should have a space between // and comment  [whitespace/comments] [4]
examples/WebInterface/esp8266-AC-control.ino:85:  Lines should be <= 80 characters long  [whitespace/line_length] [2]
examples/WebInterface/esp8266-AC-control.ino:89:  Lines should be <= 80 characters long  [whitespace/line_length] [2]
examples/WebInterface/esp8266-AC-control.ino:89:  At least two spaces is best between code and comments  [whitespace/comments] [2]
examples/WebInterface/esp8266-AC-control.ino:91:  Lines should be <= 80 characters long  [whitespace/line_length] [2]
examples/WebInterface/esp8266-AC-control.ino:92:  Lines should be <= 80 characters long  [whitespace/line_length] [2]
examples/WebInterface/esp8266-AC-control.ino:93:  Lines should be <= 80 characters long  [whitespace/line_length] [2]
examples/WebInterface/esp8266-AC-control.ino:93:  Should have a space between // and comment  [whitespace/comments] [4]
examples/WebInterface/esp8266-AC-control.ino:94:  Lines should be <= 80 characters long  [whitespace/line_length] [2]
examples/WebInterface/esp8266-AC-control.ino:119:  Should have a space between // and comment  [whitespace/comments] [4]
examples/WebInterface/esp8266-AC-control.ino:120:  Should have a space between // and comment  [whitespace/comments] [4]
examples/WebInterface/esp8266-AC-control.ino:126:  Should have a space between // and comment  [whitespace/comments] [4]
examples/WebInterface/esp8266-AC-control.ino:129:  Should have a space between // and comment  [whitespace/comments] [4]
examples/WebInterface/esp8266-AC-control.ino:210:  Lines should be <= 80 characters long  [whitespace/line_length] [2]
examples/WebInterface/esp8266-AC-control.ino:213:  Lines should be <= 80 characters long  [whitespace/line_length] [2]
examples/WebInterface/esp8266-AC-control.ino:214:  Lines should be <= 80 characters long  [whitespace/line_length] [2]
examples/WebInterface/esp8266-AC-control.ino:215:  Closing ) should be moved to the previous line  [whitespace/parens] [2]
examples/WebInterface/esp8266-AC-control.ino:217:  Lines should be <= 80 characters long  [whitespace/line_length] [2]
examples/WebInterface/esp8266-AC-control.ino:218:  Redundant blank line at the start of a code block should be deleted.  [whitespace/blank_line] [2]
examples/WebInterface/esp8266-AC-control.ino:228:  Extra space after ( in function call  [whitespace/parens] [4]
examples/WebInterface/esp8266-AC-control.ino:228:  Extra space before ( in function call  [whitespace/parens] [4]
Done processing examples/WebInterface/esp8266-AC-control.ino
Total errors found: 42
The command "python cpplint.py --extensions=c,cc,cpp,ino --headers=h,hpp {src,test,tools}/*.{h,c,cc,cpp,hpp,ino} examples/*/*.{h,c,cc,cpp,hpp,ino}" exited with 1.
  1. Please [consider] adding yourself to Contributors.md and adding your name to the copyright at the start of the file(s) (as suggested by the linter). It's your code, you should get (and retain) the credit! :)

@mariusmotea
Copy link
Contributor Author

Ok, i will fix these but this weekend i'm not home. Probably Monday i will do it.

@crankyoldgit
Copy link
Owner

Cool. No rush. Take your time.

Copy link
Owner

@crankyoldgit crankyoldgit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me once all the suggested changes etc have been done.
I'll approve once they are done.

examples/WebInterface/esp8266-AC-control.ino Outdated Show resolved Hide resolved
examples/WebInterface/esp8266-AC-control.ino Outdated Show resolved Hide resolved
examples/WebInterface/esp8266-AC-control.ino Outdated Show resolved Hide resolved
examples/WebInterface/README.md Outdated Show resolved Hide resolved
examples/WebInterface/README.md Outdated Show resolved Hide resolved
@mariusmotea
Copy link
Contributor Author

sorry for all these mistakes, i fix them now.

@crankyoldgit
Copy link
Owner

Thanks for the changes thus far. Looking good.

FYI, It still has a number of linter issues to be fixed before it can be merged.

See: https://travis-ci.org/crankyoldgit/IRremoteESP8266/jobs/579729437#L894

@mariusmotea
Copy link
Contributor Author

Hope now everything is ok.

@crankyoldgit
Copy link
Owner

Hope now everything is ok.

You are getting there:
Per https://travis-ci.org/crankyoldgit/IRremoteESP8266/jobs/580676554#L894

examples/Web-AC-control/Web-AC-control.ino:22:  At least two spaces is best between code and comments  [whitespace/comments] [2]
examples/Web-AC-control/Web-AC-control.ino:62:  Lines should be <= 80 characters long  [whitespace/line_length] [2]
examples/Web-AC-control/Web-AC-control.ino:62:  At least two spaces is best between code and comments  [whitespace/comments] [2]
examples/Web-AC-control/Web-AC-control.ino:71:  At least two spaces is best between code and comments  [whitespace/comments] [2]
examples/Web-AC-control/Web-AC-control.ino:72:  At least two spaces is best between code and comments  [whitespace/comments] [2]
examples/Web-AC-control/Web-AC-control.ino:97:  At least two spaces is best between code and comments  [whitespace/comments] [2]
examples/Web-AC-control/Web-AC-control.ino:116:  Should have a space between // and comment  [whitespace/comments] [4]
examples/Web-AC-control/Web-AC-control.ino:241:  Closing ) should be moved to the previous line  [whitespace/parens] [2]
examples/Web-AC-control/Web-AC-control.ino:255:  Extra space after ( in function call  [whitespace/parens] [4]
examples/Web-AC-control/Web-AC-control.ino:255:  Extra space before ( in function call  [whitespace/parens] [4]
Done processing examples/Web-AC-control/Web-AC-control.ino
Total errors found: 10
The command "python cpplint.py --extensions=c,cc,cpp,ino --headers=h,hpp {src,test,tools}/*.{h,c,cc,cpp,hpp,ino} examples/*/*.{h,c,cc,cpp,hpp,ino}" exited with 1.

@crankyoldgit
Copy link
Owner

Nearly: https://travis-ci.org/crankyoldgit/IRremoteESP8266/jobs/580706520#L894

examples/Web-AC-control/Web-AC-control.ino:72:  At least two spaces is best between code and comments  [whitespace/comments] [2]
examples/Web-AC-control/Web-AC-control.ino:73:  At least two spaces is best between code and comments  [whitespace/comments] [2]
examples/Web-AC-control/Web-AC-control.ino:98:  At least two spaces is best between code and comments  [whitespace/comments] [2]
examples/Web-AC-control/Web-AC-control.ino:255:  Extra space before ( in function call  [whitespace/parens] [4]
Done processing examples/Web-AC-control/Web-AC-control.ino
Total errors found: 4
The command "python cpplint.py --extensions=c,cc,cpp,ino --headers=h,hpp {src,test,tools}/*.{h,c,cc,cpp,hpp,ino} examples/*/*.{h,c,cc,cpp,hpp,ino}" exited with 1.

@crankyoldgit crankyoldgit merged commit b609928 into crankyoldgit:master Sep 4, 2019
crankyoldgit added a commit that referenced this pull request Sep 23, 2019
_v2.6.6 (20190923)_

**[Bug Fixes]**
- Ensure `begin()` is called for every supported common a/c. (#905, #899)
- IRMQTTServer: Fix JSON state parsing. (#896)
- IRMQTTServer: Fix compilation error when `MQTT_CLIMATE_JSON` is `true`. (#893)

**[Features]**
- Mitsubishi136: Full A/C support. (#898, #890)
- Fujitsu: Add support for ARRY4 remote. (#895)
- Web-AC-control: Add new WebUI example sketch. (#880, #886)
- Improve Common A/C API (#913)
- IRMQTTServer: Support for multiple climates. (#903)
- IRMQTTServer: Add TX channel support for HTTP interface. (#929)
- IRMQTTServer: Add option to clear retained settings. (#917)
- auto_analyse_raw_data.py: Add decode code generation. (#909)
- auto_analyse_raw_data.py: General improvements (#906)

**[Misc]**
- IRMQTTServer: Use latest API for common A/C. (#928)
- IRMQTTServer: Add flag & documentation for Home Assistant mode. (#919)
- IRMQTTServer: Move from ArduinoJson v5 to v6. (#878)
- IRMQTTServer: Use retain for discovery message. (#881)
- Goodweather: Adjust timings & minor fixes. (#924)
- PanasonicAc: Add better SwingV support for common a/c framework. (#923)
- Daikin2: Corrections for common A/C interface. (#910)
- MitsubishiAC: Improve decoding. (#914)
- Fujitsu: Disable horiz swing for ARRY4. (#907)
- SamsungAc: Only send power on/off code if it's needed. (#884)
- Teco: Add timer support. (#883)
- More consistent A/C `::toString()` output. (#920)
@crankyoldgit crankyoldgit mentioned this pull request Sep 23, 2019
crankyoldgit added a commit that referenced this pull request Sep 23, 2019
_v2.6.6 (20190923)_

**[Bug Fixes]**
- Ensure `begin()` is called for every supported common a/c. (#905, #899)
- IRMQTTServer: Fix JSON state parsing. (#896)
- IRMQTTServer: Fix compilation error when `MQTT_CLIMATE_JSON` is `true`. (#893)

**[Features]**
- Mitsubishi136: Full A/C support. (#898, #890)
- Fujitsu: Add support for ARRY4 remote. (#895)
- Web-AC-control: Add new WebUI example sketch. (#880, #886)
- Improve Common A/C API (#913)
- IRMQTTServer: Support for multiple climates. (#903)
- IRMQTTServer: Add TX channel support for HTTP interface. (#929)
- IRMQTTServer: Add option to clear retained settings. (#917)
- auto_analyse_raw_data.py: Add decode code generation. (#909)
- auto_analyse_raw_data.py: General improvements (#906)

**[Misc]**
- IRMQTTServer: Use latest API for common A/C. (#928)
- IRMQTTServer: Add flag & documentation for Home Assistant mode. (#919)
- IRMQTTServer: Move from ArduinoJson v5 to v6. (#878)
- IRMQTTServer: Use retain for discovery message. (#881)
- Goodweather: Adjust timings & minor fixes. (#924)
- PanasonicAc: Add better SwingV support for common a/c framework. (#923)
- Daikin2: Corrections for common A/C interface. (#910)
- MitsubishiAC: Improve decoding. (#914)
- Fujitsu: Disable horiz swing for ARRY4. (#907)
- SamsungAc: Only send power on/off code if it's needed. (#884)
- Teco: Add timer support. (#883)
- More consistent A/C `::toString()` output. (#920)
@crankyoldgit
Copy link
Owner

FYI, the changes mentioned above are included in the newly released version of the library (v2.6.6).

@mariusmotea
Copy link
Contributor Author

Nice!

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

Successfully merging this pull request may close these issues.

2 participants