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

Install notes for readme #87

Closed
FozzieUK opened this issue Mar 26, 2023 · 8 comments
Closed

Install notes for readme #87

FozzieUK opened this issue Mar 26, 2023 · 8 comments

Comments

@FozzieUK
Copy link
Contributor

It may be helpful to add a few notes to the Readme for people moving to this integration from the StealthChestnut version as there are a number of similar problems occurring. Hopefully adding some notes to do things in a certain order, and remove certain sensors that can be duplicated would help to avoid this.
I suspect this might be a moving target for a while but starting with the most common ones.

NOTE: When transferring away from the StealthChestnut HA-FoxESS-Modbus version, before installing this integration please remove the modbus: include from the configuration.yaml, it will look similar to this (depending on the path you chose)
modbus: !include custom_components/foxmodbuslan/modbusUSB.yaml

AND if you have added the sensors listed below, remove them from your configuration.yaml as they are now provided from within the integration

  - name: "Battery Discharge"
    device_class: "power"
    unit_of_measurement: "kW"
    state: >
       {% if (states('sensor.battery_discharge_power') | float(default=0) ) > 0 %}
       {{ states('sensor.battery_discharge_power') | float(default=0) * 1 }}
       {% else %}
       0 
       {% endif %}
  - name: "Battery Charge"
    device_class: "power"
    unit_of_measurement: "kW"
    state: >
       {% if (states('sensor.battery_discharge_power') | float(default=0) ) < 0 %}
       {{ states('sensor.battery_discharge_power') | float(default=0) * -1 }}
       {% else %}
       0 
       {% endif %}
  - name: "Grid Consumption"
    device_class: "power"
    unit_of_measurement: "kW"
     state: >
       {% if (states('sensor.grid_ct') | float(default=0) ) < 0 %}
       {{ states('sensor.grid_ct') | float(default=0) * -1 }}
       {% else %}
       0 
       {% endif %}

Save the configuration.yaml, Check Configuration is OK and Restart Home Assistant

Now install the FoxESS modbus integration via HACS

@canton7
Copy link
Collaborator

canton7 commented Mar 26, 2023

To be honest, it might be worth adding a step to the config flow. "Migrating from....? Read these docs first" with a link.

@FozzieUK
Copy link
Contributor Author

Yep seems a shame to divert attention from the actual core install process, these are ‘before you install steps’ - so maybe a wiki or something similar

@canton7
Copy link
Collaborator

canton7 commented Mar 26, 2023

Yeah, but it's our last chance to stop someone before they create duplicate sensors by accident (if they haven't read the readme yet).

Alternatively, we can rename ours so the don't conflict, but that does make migrating a bit harder...

@nathanmarlor
Copy link
Owner

We could add a background step to check a cross section of existing sensors to ensure they don't still exist and alert if they do? Therefore if the migration steps have been followed the user sees nothing, if not we can end the config flow and redirect to the wiki/readme?

I'll have some time mid-week so will look at re-jigging the config flow as per our discussions @canton7 (TCP/UDP/LAN etc) and see if I can squeeze something like this in.

@canton7
Copy link
Collaborator

canton7 commented Mar 26, 2023

Yep, that sounds like a better plan!

@StealthChesnut
Copy link

After switching over from HA-FoxESS-Modbus, I found it reasonably straightforward. I do have a few extra sensors, but for the most part this worked as a high-level approach:

  • Disable the yaml config line for modbus include
  • Disable any related sensors
  • Install this integration and run through setup
  • re-enable missing sensors as needed

@FozzieUK 's advice works well, I second having that as a line / collapsed section in the Readme would be useful.

@nathanmarlor
Copy link
Owner

@FozzieUK done, does that look OK?

@FozzieUK
Copy link
Contributor Author

@nathanmarlor looks good to me thanks 👍☺️

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

No branches or pull requests

4 participants