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

fixes and new site #205

Merged
merged 3 commits into from
Jul 8, 2024
Merged

fixes and new site #205

merged 3 commits into from
Jul 8, 2024

Conversation

huizebruin
Copy link
Owner

@huizebruin huizebruin commented Jul 8, 2024

What does this implement/fix? / Wat implementeert/repareert dit?

Proposed change / Voorgestelde verandering.

Types of changes / Soorten wijzigingen .

  • Bugfix (fixed change that fixes an issue) / Bugfix (vaste wijziging die een probleem verhelpt)
  • New feature (thanks!) / Nieuwe functie (bedankt!)
  • Breaking change (repair/feature that breaks existing functionality) / Breaking change (reparatie/functie waardoor bestaande functionaliteit kapot gaat)
  • Other / Ander

Test Environment / Test Omgeving

  • Water meter / Watermeter
  • S0 counter / S0 teller
  • ESPHome version / ESPHome versie ````yaml # v2024.6.6 ```
  • Home Assistant version / Home Assistant versie ````yaml # v2027.1 ```

Additional information / Aanvullende info

  • This PR fixes or closes the issue: fixes / Deze PR repareert of sluit het probleem: fixes #
  • This PR is related to an issue or discussion / Deze PR is gerelateerd aan een probleem of discussie:
  • Link to pull request for documentation / Link naar pull-aanvraag voor documentatie:

Checklist / Checklijst:

  • The code change has been tested and works locally / De codewijziging is getest en werkt lokaal.
  • The code change has not yet been tested / De codewijziging is nog niet getest.

If user-visible functionality or configuration variables are added/modified / Als door de gebruiker zichtbare functionaliteit of configuratievariabelen worden toegevoegd/gewijzigd :

  • Documentation added/updated in the readme file / Documentatie toegevoegd/bijgewerkt in de readme file.
  • Added/updated documentation for the web page / Documentatie toegevoegd/bijgewerkt voor de webpagina [https://s0tool.nl] or / of docs-flashpagina

Summary by CodeRabbit

  • New Features

    • Added a new configuration for firmware updates using HTTP requests.
    • Introduced a new HTML page for the "Contact" section on s0tool.nl.
    • Implemented dynamic loading of HTML content for the navbar, sidebar, and footer.
  • Enhancements

    • Improved installation instructions and troubleshooting content layout.
    • Updated and expanded meta tags, keywords, styling, and restructuring across multiple HTML files.
    • Enhanced visual presentation with Bootstrap, jQuery, and Popper.js integrations.
  • Bug Fixes

    • Updated links and formatting in troubleshooting and other sections.

* Fix function to flux counter ESPHome version 2024.6.x and Home assistant 2024.7.x
* New site
* Cleanup html site
* Fixed : #180 thanks for your feedback and help  @schmm and @Hurr1c4n3
* Fixed : #203 thanks for your feedback and help @wes1993
@huizebruin huizebruin added documentation Solely about the documentation of the project. bugfix Fixing a bug. labels Jul 8, 2024
@huizebruin huizebruin self-assigned this Jul 8, 2024
Copy link

coderabbitai bot commented Jul 8, 2024

Walkthrough

This update introduces enhancements across the S0tool project, including new firmware update functionality via HTTP requests, web page redesigns with Bootstrap for improved layout and styling, and the addition of a contact page. The updates enhance the user experience by restructuring installation, troubleshooting, and informational guides, as well as adding dynamic content loading through JavaScript.

Changes

File/Path Change Summary
.github/workflows/build.yml Added a new file pulscounter_flux.yaml and corresponding manifest file in the jobs section.
esphome/components/s0tool-standard-flux-update.yml Added configuration for firmware update using HTTP requests.
esphome/pulscounter_flux.yaml Added s0tool-standard-flux-update.yml to the list of packages.
static/Installation.html Updated meta tags, keywords, and added Bootstrap styling. Reorganized layout with navbar, sidebar, and main content sections. Added and expanded instructions for S0tool installation.
static/Troubleshooting.html Added Bootstrap, updated meta keywords, reorganized HTML structure, adjusted content, and included new scripting libraries.
static/contact.html Introduced a new contact page with metadata, styling links, and scripts.
static/contributing.html Added Bootstrap, modified meta keywords, and rearranged HTML structure and main content. Added new JavaScript libraries.
static/diyorbuy.html Updated meta keywords, page title, added Bootstrap, reorganized HTML elements, and updated content. Added new JavaScript libraries.
static/energydashboard.html Added Bootstrap styling, modified meta keywords, and updated header structures and main content with new links and rearranged elements.
static/footer.html Updated footer styling and structure with dark background and white text, adding links and centered layout.
static/index.html Updated page title, added Bootstrap, organized HTML structure, and updated content layout. Added new JavaScript libraries for enhanced functionality.
static/information.html Significant updates to content and layout with Bootstrap, revised information sections and instructions, enhanced visual presentation, and added new libraries for styling and functionality.
static/js/script.js New logic to handle dynamic loading of HTML content for navbar, sidebar, and footer using fetch requests.
static/licence.html Added new meta tags, updated license text formatting, added external CSS and JavaScript libraries, and restructured the HTML layout with new sections.
static/navbar.html Introduced a responsive navbar with links to various sections of the website.
static/sidebar.html Modified the layout to use a <sidebar> element, updated image classes, and adjusted the HTML structure.
static/sitemap.xml Updated the last modification date and added a new URL for the contact page.
static/styles.css Adjustments to various styles, reorganization of header and footer elements, and addition of new classes. Removed certain specific styling rules.

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

‼️ IMPORTANT
Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

Outside diff range and nitpick comments (11)
static/contact.html (3)

7-7: Consider updating Bootstrap version.

Bootstrap 4.5.2 is used. Consider updating to the latest version for improved features and security.


52-52: Consider using a mailto link for email.

Using a mailto link can make it easier for users to contact via email.

-  For information : info(at)s0tool(dot)nl
+  For information : <a href="mailto:info@s0tool.nl">info@s0tool.nl</a>

61-63: Consider updating jQuery and Bootstrap JS versions.

jQuery 3.5.1 and Bootstrap 4.5.2 are used. Consider updating to the latest versions for improved features and security.

static/navbar.html (2)

8-8: Consider updating Bootstrap version.

Bootstrap 4.5.2 is used. Consider updating to the latest version for improved features and security.


58-60: Consider updating jQuery and Bootstrap JS versions.

jQuery 3.5.1 and Bootstrap 4.5.2 are used. Consider updating to the latest versions for improved features and security.

static/index.html (2)

7-7: Consider updating Bootstrap version.

Bootstrap 4.5.2 is used. Consider updating to the latest version for improved features and security.


71-73: Consider updating jQuery and Bootstrap JS versions.

jQuery 3.5.1 and Bootstrap 4.5.2 are used. Consider updating to the latest versions for improved features and security.

static/energydashboard.html (2)

8-8: Consider updating Bootstrap version.

Bootstrap 4.5.2 is used. Consider updating to the latest version for improved features and security.


75-77: Consider updating jQuery and Bootstrap JS versions.

jQuery 3.5.1 and Bootstrap 4.5.2 are used. Consider updating to the latest versions for improved features and security.

static/information.html (1)

124-124: Image Alt Attribute

The alt attribute for the image should be more descriptive to improve accessibility.

- <img src="./assets/npn-watermeter-wemosd1.png" class="img-fluid" alt="S0tool-diy">
+ <img src="./assets/npn-watermeter-wemosd1.png" class="img-fluid" alt="Diagram of S0tool DIY setup">
static/Installation.html (1)

231-233: Descriptive Alt Text

The alt attribute for the image should be more descriptive to improve accessibility.

- <img src="./assets/icon.ico" class="img-fluid" alt="s0tool-standard-flux">
+ <img src="./assets/icon.ico" class="img-fluid" alt="Icon for S0tool Standard Flux">
Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between fb7b1aa and 742fd9b.

Files ignored due to path filters (1)
  • static/s0tool-blank-esp8266/s0tool-blank-esp8266.bin is excluded by !**/*.bin
Files selected for processing (18)
  • .github/workflows/build.yml (1 hunks)
  • esphome/components/s0tool-standard-flux-update.yml (1 hunks)
  • esphome/pulscounter_flux.yaml (1 hunks)
  • static/Installation.html (4 hunks)
  • static/Troubleshooting.html (4 hunks)
  • static/contact.html (1 hunks)
  • static/contributing.html (2 hunks)
  • static/diyorbuy.html (3 hunks)
  • static/energydashboard.html (2 hunks)
  • static/footer.html (1 hunks)
  • static/index.html (3 hunks)
  • static/information.html (4 hunks)
  • static/js/script.js (1 hunks)
  • static/licence.html (2 hunks)
  • static/navbar.html (1 hunks)
  • static/sidebar.html (1 hunks)
  • static/sitemap.xml (1 hunks)
  • static/styles.css (1 hunks)
Files skipped from review due to trivial changes (4)
  • .github/workflows/build.yml
  • static/footer.html
  • static/js/script.js
  • static/sidebar.html
Additional context used
yamllint
esphome/components/s0tool-standard-flux-update.yml

[error] 5-5: no new line character at the end of file

(new-line-at-end-of-file)

esphome/pulscounter_flux.yaml

[error] 31-31: trailing spaces

(trailing-spaces)


[error] 33-33: no new line character at the end of file

(new-line-at-end-of-file)

Additional comments not posted (42)
static/sitemap.xml (1)

1-14: LGTM!

The sitemap file appears to be correctly formatted and includes the necessary URLs and last modification dates.

static/styles.css (1)

1-44: LGTM!

The CSS file appears to be correctly formatted and includes the necessary styles for various HTML elements and classes. The styles are consistent and follow best practices.

static/contact.html (4)

35-35: Ensure navbar content is loaded correctly.

The navbar is loaded dynamically. Ensure the script correctly loads and displays the content.


40-40: Ensure sidebar content is loaded correctly.

The sidebar is loaded dynamically. Ensure the script correctly loads and displays the content.


59-59: Ensure footer content is loaded correctly.

The footer is loaded dynamically. Ensure the script correctly loads and displays the content.


5-6: Remove duplicate charset meta tag.

The charset meta tag is duplicated. Only one is necessary.

-  <meta charset="UTF-8">

Likely invalid or redundant comment.

static/navbar.html (3)

13-13: Ensure the navbar brand link is correct.

Verify that the link to index.html correctly navigates to the home page.


53-53: Ensure the GitHub version badge is up-to-date.

Verify that the GitHub version badge correctly displays the latest release version.


5-6: Remove duplicate charset meta tag.

The charset meta tag is duplicated. Only one is necessary.

-    <meta charset="UTF-8">

Likely invalid or redundant comment.

static/index.html (4)

26-26: Ensure navbar content is loaded correctly.

The navbar is loaded dynamically. Ensure the script correctly loads and displays the content.


30-30: Ensure sidebar content is loaded correctly.

The sidebar is loaded dynamically. Ensure the script correctly loads and displays the content.


69-69: Ensure footer content is loaded correctly.

The footer is loaded dynamically. Ensure the script correctly loads and displays the content.


5-6: Remove duplicate charset meta tag.

The charset meta tag is duplicated. Only one is necessary.

-  <meta charset="UTF-8">

Likely invalid or redundant comment.

static/energydashboard.html (3)

36-36: Ensure navbar content is loaded correctly.

The navbar is loaded dynamically. Ensure the script correctly loads and displays the content.


40-40: Ensure sidebar content is loaded correctly.

The sidebar is loaded dynamically. Ensure the script correctly loads and displays the content.


73-73: Ensure footer content is loaded correctly.

The footer is loaded dynamically. Ensure the script correctly loads and displays the content.

static/licence.html (4)

13-14: Meta Keywords Tag Update Approved

The meta keywords tag has been updated correctly with relevant keywords.


15-15: Meta Author Tag Update Approved

The meta author tag has been updated correctly.


16-16: Meta Copyright Tag Update Approved

The meta copyright tag has been updated correctly.


17-17: Meta Cache-Control Tag Update Approved

The meta cache-control tag has been updated correctly.

static/contributing.html (4)

13-14: Meta Keywords Tag Update Approved

The meta keywords tag has been updated correctly with relevant keywords.


15-15: Meta Author Tag Update Approved

The meta author tag has been updated correctly.


16-16: Meta Copyright Tag Update Approved

The meta copyright tag has been updated correctly.


17-17: Meta Cache-Control Tag Update Approved

The meta cache-control tag has been updated correctly.

static/diyorbuy.html (4)

13-14: Meta Keywords Tag Update Approved

The meta keywords tag has been updated correctly with relevant keywords.


15-15: Meta Author Tag Update Approved

The meta author tag has been updated correctly.


16-16: Meta Copyright Tag Update Approved

The meta copyright tag has been updated correctly.


17-17: Meta Cache-Control Tag Update Approved

The meta cache-control tag has been updated correctly.

static/Troubleshooting.html (4)

13-14: Meta Keywords Tag Update Approved

The meta keywords tag has been updated correctly with relevant keywords.


15-15: Meta Author Tag Update Approved

The meta author tag has been updated correctly.


16-16: Meta Copyright Tag Update Approved

The meta copyright tag has been updated correctly.


17-17: Meta Cache-Control Tag Update Approved

The meta cache-control tag has been updated correctly.

static/information.html (5)

13-14: Meta Keywords Updated

The meta keywords have been updated to improve SEO. Ensure the keywords accurately reflect the content of the page.


35-37: Dynamic Content Loading

The #navbar and #sidebar divs are placeholders for dynamically loaded content. Ensure the JavaScript responsible for loading this content is functioning correctly.


49-52: Compatibility Notice

The compatibility notice specifies the supported versions of ESPHome and Home Assistant. Ensure this information is accurate and up-to-date.


136-136: External Script

Ensure the external script from the provided URL is trusted and secure.


172-175: JavaScript Libraries

The inclusion of jQuery, Popper.js, and Bootstrap JavaScript libraries is noted. Ensure these libraries are necessary and do not introduce security vulnerabilities.

static/Installation.html (5)

13-14: Meta Keywords Updated

The meta keywords have been updated to improve SEO. Ensure the keywords accurately reflect the content of the page.


34-34: Script Source Added

A script source for esp-web-tools has been added. Ensure this script is necessary and does not introduce security vulnerabilities.


117-119: New Configuration Option

A new radio button option for s0tool-standard-flux has been added. Ensure this new configuration is correctly implemented and tested.


Line range hint 255-276:
Dynamic Manifest Loading

The script dynamically loads the manifest file based on the selected radio button option. Ensure this functionality works as expected and handles errors gracefully.


285-288: JavaScript Libraries

The inclusion of jQuery, Popper.js, and Bootstrap JavaScript libraries is noted. Ensure these libraries are necessary and do not introduce security vulnerabilities.

Comment on lines 1 to 5
update:
- platform: http_request
name: Firmware Update
id: update_http_request
source: https://s0tool.nl/s0tool-standard-flux-manifest.json
Copy link

Choose a reason for hiding this comment

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

Add a new line character at the end of the file.

The file is missing a new line character at the end, which is a common convention in YAML files.

- source: https://s0tool.nl/s0tool-standard-flux-manifest.json
+ source: https://s0tool.nl/s0tool-standard-flux-manifest.json
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
update:
- platform: http_request
name: Firmware Update
id: update_http_request
source: https://s0tool.nl/s0tool-standard-flux-manifest.json
update:
- platform: http_request
name: Firmware Update
id: update_http_request
source: https://s0tool.nl/s0tool-standard-flux-manifest.json
Tools
yamllint

[error] 5-5: no new line character at the end of file

(new-line-at-end-of-file)

@@ -28,4 +28,6 @@ packages:
- esphome/components/basis.yaml
- esphome/components/kwhpuls.yml
- esphome/components/watermeter_flux.yaml
- esphome/components/s0tool-standard-flux-update.yml

Copy link

Choose a reason for hiding this comment

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

Add a new line character at the end of the file.

The file is missing a new line character at the end, which is a common convention in YAML files.

-    refresh: 0d
+    refresh: 0d

Committable suggestion was skipped due to low confidence.

@@ -28,4 +28,6 @@
- esphome/components/basis.yaml
- esphome/components/kwhpuls.yml
- esphome/components/watermeter_flux.yaml
- esphome/components/s0tool-standard-flux-update.yml
Copy link

Choose a reason for hiding this comment

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

Remove trailing spaces.

Trailing spaces are present at the end of the line.

-      - esphome/components/s0tool-standard-flux-update.yml  
+      - esphome/components/s0tool-standard-flux-update.yml
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- esphome/components/s0tool-standard-flux-update.yml
- esphome/components/s0tool-standard-flux-update.yml
Tools
yamllint

[error] 31-31: trailing spaces

(trailing-spaces)

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 742fd9b and 8b6903b.

Files selected for processing (1)
  • .github/workflows/build.yml (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/build.yml

@huizebruin huizebruin merged commit c37cf44 into main Jul 8, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Fixing a bug. documentation Solely about the documentation of the project.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failed config during update Problemen with update
1 participant