Coder Social home page Coder Social logo

myevse-webinterface's Introduction

MyEVSE Webinterface

Downloads Release MicroPython License: MIT

MicroPython based Webinterface of MyEVSE


General

This is the webinterface of the MyEVSE

I sell on Tindie

The current implementation does only run on a board with external SPI RAM. As of now up to 300kB of RAM are required. This is more than an ESP32-D4 Pico provides by default.

๐Ÿ“š The latest documentation is available at MyEVSE Webinterface ReadTheDocs ๐Ÿ“š

Quickstart

This is a quickstart to install the myevse-webinterface library on a MicroPython board.

A more detailed guide of the development environment can be found in SETUP, further details about the usage can be found in USAGE, descriptions for testing can be found in TESTING and several examples in EXAMPLES

python3 -m venv .venv
source .venv/bin/activate

pip install -r requirements.txt

Install package on board with mip or upip

rshell -p /dev/tty.SLAB_USBtoUART --editor nano

Inside the rshell open a REPL and execute these commands inside the REPL

import machine
import network
import time
import mip
station = network.WLAN(network.STA_IF)
station.active(True)
station.connect('SSID', 'PASSWORD')
time.sleep(1)
print('Device connected to network: {}'.format(station.isconnected()))
mip.install('myevse-webinterface', index='https://pypi.org/pypi')
print('Installation completed')
machine.soft_reset()

For MicroPython versions below 1.19.1 use the upip package instead of mip

import machine
import network
import time
import upip
station = network.WLAN(network.STA_IF)
station.active(True)
station.connect('SSID', 'PASSWORD')
time.sleep(1)
print('Device connected to network: {}'.format(station.isconnected()))
upip.install('myevse-webinterface')
print('Installation completed')
machine.soft_reset()

Upload additional files to board

Copy the boot.py and main.py files to the MicroPython board as shown below using Remote MicroPython shell

Open the remote shell with the following command. Additionally use -b 115200 in case no CP210x is used but a CH34x.

rshell -p /dev/tty.SLAB_USBtoUART --editor nano

Perform the following command to copy all files to the device

cp main.py /pyboard
cp boot.py /pyboard

Usage

See USAGE and DOCUMENTATION

myevse-webinterface's People

Contributors

brainelectronics avatar

Stargazers

 avatar

Watchers

 avatar

myevse-webinterface's Issues

Add simulation

Add simulator for the MyEVSE Webinterface, similar to WiFi Manager. Data shall be either provided by a real MyEVSE or by a static JSON data file

Add missing favicon

@app.route("/favicon.ico")
def favicon(req, resp):
  yield from app.sendfile(resp, "favicon.ico")

Perform webinterface update calls in background

/setup and /reboot pages open the URL in foreground.

This leads in case of /reboot to a "broken" page as the page /perform_reboot_system is not available as the device reboots directly after the call. Whereas /setup returns to the / index page. Users might have to open the /setup page again to perform other changes.

Solution: Use background calls as in /update

EOF on request start

An EOF on request start is triggered after 5 successfull calls to modbus_data_table

Network analysis shows a wait time of around 400ms, connection establish time of 0 to 200ms and a receive time of 1 to 1.2sec.

At some point in time (after 5 successfull requests and receives) either the receive time increases up to 4 sec or the connection establish time increases to up to 2 sec, leading to a total time of 2 or more seconds.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.