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

Divert mode updates #76

Merged
merged 67 commits into from
Jun 8, 2020
Merged

Divert mode updates #76

merged 67 commits into from
Jun 8, 2020

Conversation

jeremypoulter
Copy link
Collaborator

…ons in th esimulator or later be updated via MQTT feed
@glynhudson
Copy link
Collaborator

Fantastic. #67 has now been merged. @jeremypoulter Is it possible to fix the merge conflicts?

@jeremypoulter
Copy link
Collaborator Author

Will do, been doing some preparations (moving some shared code to libraries) for backporting to the ESP8266. Wil fix the conflicts after this.

@glynhudson
Copy link
Collaborator

Great, let me know when you're ready. It would be good to have a catchup chat after this PR is ready to merge and I've had a chance to test. Cheers

@jeremypoulter
Copy link
Collaborator Author

Merged with Master and fixed a few other issues. This probably needs a really good test as the config sub-system has changed.

@glynhudson
Copy link
Collaborator

Nice, after a minor issue with the Tesla code I got it compiled and uploaded. On HTTP update all the old EEPROM settings were lost and the unit dropped off the WiFi. I was able to get it reconnected easily by connecting to AP and entering my wifi details, all the config is now reverted to default settings. Was the expected?

It's not the end of the world, this is a significant update. I'm sure we could persuade users to enter in their details again.

I will continue to test and will report back..

@glynhudson
Copy link
Collaborator

glynhudson commented May 18, 2020

Issue 1: the data posted to MQTT has an unwanted _ added at the beginning of the node name
Update: It's actually an empty topic because I entered emon/openevse-55ad/ as the basetopic removing the / at the end of the basetopic fixed the issue. This is not actually an issue, just user error!
Screenshot from 2020-05-18 20-08-02
Screenshot from 2020-05-18 20-13-41

The new solar PV divert UI looks good

@jeremypoulter
Copy link
Collaborator Author

User setting should be preserved on update, I added the code to do this so will check on that. (but not Tesla client options)

@glynhudson
Copy link
Collaborator

Thanks. I've just tried to compile the latest version but I'm having an issue with ConfigJson, I'm getting error UndefinedPackageVersion: Could not find a version that satisfies the requirement '0.0.3' for your linux_x86_64'.

Any ideas?

Full output:

Found: https://platformio.org/lib/show/7305/ConfigJson
LibraryManager: Installing id=7305 @ 0.0.3
UndefinedPackageVersion: Could not find a version that satisfies the requirement '0.0.3' for your system 'linux_x86_64':
  File "/home/glyn/.platformio/penv/lib/python3.8/site-packages/platformio/builder/main.py", line 156:
    env.SConscript("$BUILD_SCRIPT")
  File "/home/glyn/.platformio/packages/tool-scons/script/../engine/SCons/Script/SConscript.py", line 597:
    return _SConscript(self.fs, *files, **subst_kw)
  File "/home/glyn/.platformio/packages/tool-scons/script/../engine/SCons/Script/SConscript.py", line 286:
    exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)
  File "/home/glyn/.platformio/platforms/espressif32/builder/main.py", line 210:
    target_elf = env.BuildProgram()
  File "/home/glyn/.platformio/packages/tool-scons/script/../engine/SCons/Environment.py", line 219:
    return self.method(*nargs, **kwargs)
  File "/home/glyn/.platformio/penv/lib/python3.8/site-packages/platformio/builder/tools/platformio.py", line 62:
    env.ProcessProjectDeps()
  File "/home/glyn/.platformio/packages/tool-scons/script/../engine/SCons/Environment.py", line 219:
    return self.method(*nargs, **kwargs)
  File "/home/glyn/.platformio/penv/lib/python3.8/site-packages/platformio/builder/tools/platformio.py", line 131:
    project_lib_builder = env.ConfigureProjectLibBuilder()
  File "/home/glyn/.platformio/packages/tool-scons/script/../engine/SCons/Environment.py", line 219:
    return self.method(*nargs, **kwargs)
  File "/home/glyn/.platformio/penv/lib/python3.8/site-packages/platformio/builder/tools/piolib.py", line 1036:
    project.install_dependencies()
  File "/home/glyn/.platformio/penv/lib/python3.8/site-packages/platformio/builder/tools/piolib.py", line 868:
    lm.install(uri)
  File "/home/glyn/.platformio/penv/lib/python3.8/site-packages/platformio/managers/lib.py", line 275:
    pkg_dir = BasePkgManager.install(
  File "/home/glyn/.platformio/penv/lib/python3.8/site-packages/platformio/managers/package.py", line 700:
    pkg_dir = self._install_from_piorepo(name, requirements)
  File "/home/glyn/.platformio/penv/lib/python3.8/site-packages/platformio/managers/lib.py", line 118:
    raise exception.UndefinedPackageVersion(

@glynhudson
Copy link
Collaborator

Also I can't seem to enable solar pv divert, the eco toggle seems to be missing?!

Nice work on the setup UI, the solar pv config settings look good.

@jeremypoulter
Copy link
Collaborator Author

Re ConfigJson, Platform IO being slow. Looks to have picked up the new release now.

I changed the UI to remove the switch, just enabling and setting up has the same effect as switching to eco mode

@glynhudson
Copy link
Collaborator

Re ConfigJson, Platform IO being slow. Looks to have picked up the new release now.

Cool, it's working now I should have guessed.

I changed the UI to remove the switch, just enabling and setting up has the same effect as switching to eco mode

How will the user enable / disable EcoMode? I've setup the MQTT feed for solar PV but it's still charging at full 32A.I think we need a toggle on the main page to enable / disable the feature.

Screenshot from 2020-05-21 15-06-29
Screenshot from 2020-05-21 15-06-16

@glynhudson
Copy link
Collaborator

I've just tested the latest update by flashing the master branch then upgrading back to this PR and this time the config successfully transferred over 👍

Following on from our chat this afternoon I've tried to mock up the change to the UI I proposed. I'm keen to make it clear to the user what mode the EVSE is in and make it possible to easily disable Eco from the main page. As we mentioned before once Eco mode is enabled it should be pervasive between charging sessions.

solar-pv-waiting

- Added charge_mode to dnamically enable/disable divert mode
- events are now distributed internally using the parsed JsonDocument stops (badly) generating JSON docs as strings and (badly) parsing them to send out the various interfaces
-  extra debug info is now evented from the divert module
-  Typo fix
@jeremypoulter
Copy link
Collaborator Author

@glynhudson the last changes should be in now, think this is ready for final testing and merging

@glynhudson glynhudson merged commit c6af913 into master Jun 8, 2020
@jeremypoulter jeremypoulter deleted the divert_mode_off branch March 7, 2021 16:18
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

Successfully merging this pull request may close these issues.

2 participants