openvehicles / Open-Vehicle-Monitoring-System-3

Open Vehicle Monitoring System - Version 3
http:///www.openvehicles.com/
Other
587 stars 225 forks source link

40kWh 2018+ Nissan LEAF support? #323

Open glynhudson opened 4 years ago

glynhudson commented 4 years ago

I was under the impresssion that the 2018 40kWh Leaf is currently not suported by OVMS since the OBD port in the 2018 LEAF is now behind a gateway, so it no longer hears any passive CAN traffic requires active polling to obtain metrics, see: http://lists.openvehicles.com/pipermail/ovmsdev/2019-September/006340.html

e.g here is a test modification to enable active polling to test obtaining data from the 40kWh LEAF: https://github.com/caederus-ovms/Open-Vehicle-Monitoring-System-3/commit/66906c0eee858208e729608ed6adcc7a03343f0e).

I tested OVMS myself with a 40kWh leaf in October 2019 running edge build and confirmed support was not available. Since then I've not seen any commits to suggest that support for active polling has been added.

However, issues and PR's by @dalathegreat suggest the 40kWh Nissan LEAF is working with ovms .eg #312 , https://github.com/openvehicles/Open-Vehicle-Android/pull/97

What is the current status of the 40kWh leaf? It would be really great if support has been added. If so, what metrics are currently supported?

aidehuazi commented 2 years ago

Apologies for lack of reply and updates. I haven’t been able to get back to this since I lost my development environment several months ago, would appreciate if someone has details on how to build the expresif dev environment on macOS 12.5 or 13, I’m getting some make issues. I haven’t found a way to enable poling while charging and as others have pointed out, there’s no advantage to obtaining data after the car is turned off as it doesn’t change. Also, there were several issues with the ZE0 leaf caused by my firmware build that I hadn’t resolved, so I didn’t think it wise to merge this version. In the meantime performing the hardware mods on ZE1s to get ovms working is probably a better solution. If I find time and I manage to get my development environment up and running again I’ll have another crack at this, but it would be handy if there are others with development skills that can help to take the current Leaf firmware forward.

dexterbg commented 2 years ago

Maybe @markwj can help you on the macOS 12.5/13 issue, he also uses a Mac. As a general hint: you can always set up a virtual machine running Linux.

markwj commented 2 years ago

Apologies for lack of reply and updates. I haven’t been able to get back to this since I lost my development environment several months ago, would appreciate if someone has details on how to build the expresif dev environment on macOS 12.5 or 13, I’m getting some make issues.

I just follow the developer's guide instructions for installation on OSX. Sometimes there are issues with python and dependencies. What are the error messages shown during the build?

aidehuazi commented 2 years ago

Hi Mark,

I’ve tried to see if my development environment install process is flawed, following the developer guide I have my suspicions I’m missing something as it jumps around a bit. But after a reinstall, my library issues go away I just have a build issue, where it looks like a header file may be missing some declarations?

From make output:

$ make -j9 all

Toolchain path: /Users/danedwcisco.com/esp/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc

Toolchain version: crosstool-ng-1.22.0-97-gc752ad5

Compiler version: 5.2.0

AR build/aws_iot/libaws_iot.a

CC build/bt/bt.o … … CXX build/main/ovms_console.o /Users/danedwcisco.com/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/ovms_boot.cpp: In constructor 'Boot::Boot()': /Users/danedwcisco.com/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/ovms_boot.cpp:313:46: error: 'xt_set_error_handler_callback' was not declared in this scope xt_set_error_handler_callback(ErrorCallback); ^ CC build/mbedtls/mbedtls/library/ecdh.o /Users/danedwcisco.com/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/ovms_boot.cpp: In static member function 'static void Boot::ErrorCallback(XtExcFrame*, int, bool)': /Users/danedwcisco.com/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/ovms_boot.cpp:499:94: error: 'esp_task_wdt_get_trigger_tasknames' was not declared in this scope esp_task_wdt_get_trigger_tasknames(boot_data.wdt_tasknames, sizeof(boot_data.wdt_tasknames)); ^ CC build/lwip/lwip/src/apps/sntp/sntp.o make[1]: [ovms_boot.o] Error 1 make[1]: Waiting for unfinished jobs.... CC build/libsodium/libsodium/src/libsodium/crypto_core/hsalsa20/core_hsalsa20.o

Here is my developer environment setup process:

Setup the tool chain

sudo easy_install pip

mkdir -p ~/esp

cd ~/esp

tar -xzf ~/Downloads/xtensa-esp32-elf-macos-1.22.0-97-gc752ad5-5.2.0.tar.gz

Path is set to $HOME/esp/xtensa-esp32-elf/bin

Download esp-idf v3.3 from github

$ cd ~/esp

$ git clone -b release/v3.3 --recursive https://github.com/espressif/esp-idf.git

$ cd esp-idf

$ git submodule update --init --recursive

The next command fails with a local issue so I do the following prior:

$ export LANG="en_US.UTF-8"

$ python -m pip install --user -r $IDF_PATH/requirements.txt

Requirement already satisfied: pyserial>=3.0 in /Users/danedwcisco.com/Library/Python/3.8/lib/python/site-packages (from -r /Users/danedwcisco.com/esp/esp-idf/requirements.txt (line 8)) (3.5) Requirement already satisfied: future>=0.15.2 in /Users/danedwcisco.com/Library/Python/3.8/lib/python/site-packages (from -r /Users/danedwcisco.com/esp/esp-idf/requirements.txt (line 9)) (0.18.2) Requirement already satisfied: cryptography<35,>=2.1.4 in /Users/danedwcisco.com/Library/Python/3.8/lib/python/site-packages (from -r /Users/danedwcisco.com/esp/esp-idf/requirements.txt (line 10)) (3.4.8) Requirement already satisfied: pyparsing<2.4.0,>=2.0.3 in /Users/danedwcisco.com/Library/Python/3.8/lib/python/site-packages (from -r /Users/danedwcisco.com/esp/esp-idf/requirements.txt (line 13)) (2.3.1) Requirement already satisfied: cffi>=1.12 in /Users/danedwcisco.com/Library/Python/3.8/lib/python/site-packages (from cryptography<35,>=2.1.4->-r /Users/danedwcisco.com/esp/esp-idf/requirements.txt (line 10)) (1.15.1) Requirement already satisfied: pycparser in /Users/danedwcisco.com/Library/Python/3.8/lib/python/site-packages (from cffi>=1.12->cryptography<35,>=2.1.4->-r /Users/danedwcisco.com/esp/esp-idf/requirements.txt (line 10)) (2.21)

But it suggest I need to check python version so need to install requirements for python 3

python --version Python 3.8.9

$ python3 -m pip install --user -r $IDF_PATH/requirements.txt Ignoring cffi: markers 'python_version < "3.6"' don't match your environment Requirement already satisfied: setuptools in /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages (from -r /Users/danedwcisco.com/esp/esp-idf/requirements.txt (line 4)) (49.2.1) Requirement already satisfied: pyserial>=3.0 in /Users/danedwcisco.com/Library/Python/3.8/lib/python/site-packages (from -r /Users/danedwcisco.com/esp/esp-idf/requirements.txt (line 8)) (3.5) Requirement already satisfied: future>=0.15.2 in /Users/danedwcisco.com/Library/Python/3.8/lib/python/site-packages (from -r /Users/danedwcisco.com/esp/esp-idf/requirements.txt (line 9)) (0.18.2) Requirement already satisfied: cryptography<35,>=2.1.4 in /Users/danedwcisco.com/Library/Python/3.8/lib/python/site-packages (from -r /Users/danedwcisco.com/esp/esp-idf/requirements.txt (line 10)) (3.4.8) Requirement already satisfied: pyparsing<2.4.0,>=2.0.3 in /Users/danedwcisco.com/Library/Python/3.8/lib/python/site-packages (from -r /Users/danedwcisco.com/esp/esp-idf/requirements.txt (line 13)) (2.3.1) Requirement already satisfied: cffi>=1.12 in /Users/danedwcisco.com/Library/Python/3.8/lib/python/site-packages (from cryptography<35,>=2.1.4->-r /Users/danedwcisco.com/esp/esp-idf/requirements.txt (line 10)) (1.15.1) Requirement already satisfied: pycparser in /Users/danedwcisco.com/Library/Python/3.8/lib/python/site-packages (from cffi>=1.12->cryptography<35,>=2.1.4->-r /Users/danedwcisco.com/esp/esp-idf/requirements.txt (line 10)) (2.21)

Then when I try to execute the make menuconfig I get a bunch of errors where macOS doesn’t trust xtensa libs and bins, so I have to go find and execute all of them manually, don’t know if there’s an easier way to allow all

$ make menuconfig

@.***

There is this comment after the make menuconfig If you are Arch Linux user, navigate to SDK tool configuration and change the name of Python 2 interpreter from python to python2.

I am not sure if I should be changing this to python3 or leaving as default python on macOS? Tried both and no difference in the error output.

Then the OVMS clone all goes smoothly

$ git clone https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3.githttps://www.google.com/url?q=https://www.google.com/url?q%3Dhttps://github.com/openvehicles/Open-Vehicle-Monitoring-System-3.git%26amp;sa%3DD%26amp;source%3Deditors%26amp;ust%3D1662706031482808%26amp;usg%3DAOvVaw3FE6fxvLUDaQhDgm2xR4iO&sa=D&source=docs&ust=1662706031703463&usg=AOvVaw1uUqqGKb44xiY89H4yhnVy

$ cd Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3

$ git submodule update --init --recursive

$ cd vehicle/OVMS.V3 < not required , already there.

$ cp support/sdkconfig.default.hw31 sdkconfig

$ make menuconfig

Not using usb so at this point I just attempt to make the bin and get the following errors:

$ make -j9 all

See attached full output or the errors above.

No build/ovms3.bin file is created so I figure the errors are causing this.

I figured it may be the bison issue , even though I hadn’t installed the toolchain via the from scratch method …..should ? (tried, no success)

$ brew upgrade bison Running brew update --auto-update... ==> Auto-updated Homebrew! Updated 1 tap (homebrew/cask).

You have 11 outdated formulae and 1 outdated cask installed. You can upgrade them with brew upgrade or list them with brew outdated.

Error: bison not installed

Regards Dan Edwards

From: Mark Webb-Johnson @.> Date: Thursday, 8 September 2022 at 3:18 pm To: openvehicles/Open-Vehicle-Monitoring-System-3 @.> Cc: aidehuazi @.>, Mention @.> Subject: Re: [openvehicles/Open-Vehicle-Monitoring-System-3] 40kWh 2018+ Nissan LEAF support? (#323)

Apologies for lack of reply and updates. I haven’t been able to get back to this since I lost my development environment several months ago, would appreciate if someone has details on how to build the expresif dev environment on macOS 12.5 or 13, I’m getting some make issues.

I just follow the developer's guide instructions for installation on OSX. Sometimes there are issues with python and dependencies. What are the error messages shown during the build?

— Reply to this email directly, view it on GitHubhttps://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/issues/323#issuecomment-1240232072, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASUEJ56DIVICVR6YU24EUFLV5FZKJANCNFSM4KHXO7BA. You are receiving this because you were mentioned.Message ID: @.***>

aidehuazi commented 2 years ago

Hi Mark,

I just found your response to Heiko in mid August.

check if you've copied the sdkconfig template (support/sdkconfig.default.hw31), it seems your config lacks CONFIG_ESP32_PANIC_CALLBACK=y, possibly more.

I copy the default file and execute make menuconfig and that config item is no longer in the sdkconfig file.

% cp support/sdkconfig.default.hw31 sdkconfig $ grep CONFIG_ESP32_PANIC_CALLBACK sdkconfig CONFIG_ESP32_PANIC_CALLBACK=y $ make menuconfig Toolchain path: /Users/danedwcisco.com/esp/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc Toolchain version: crosstool-ng-1.22.0-97-gc752ad5 Compiler version: 5.2.0 MENUCONFIG /Users/danedwcisco.com/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/sdkconfig - Espressif IoT Development Framework Configuration

configuration written to /Users/danedwcisco.com/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/sdkconfig

End of the configuration. Execute 'make' to start the build or try 'make help'.

GENCONFIG App "ovms3" version: 3.3.003-2-gd00de6c0 @.*** OVMS.V3 % grep CONFIG_ESP32_PANIC_CALLBACK sdkconfig

Just adding that back to the config file resolved it. Not sure why the make menuconfig removes it?

Regards Dan Edwards

From: Dan Edwards @.> Date: Friday, 9 September 2022 at 4:33 pm To: openvehicles/Open-Vehicle-Monitoring-System-3 @.>, openvehicles/Open-Vehicle-Monitoring-System-3 @.> Cc: Mention @.> Subject: Re: [openvehicles/Open-Vehicle-Monitoring-System-3] 40kWh 2018+ Nissan LEAF support? (#323) Hi Mark,

I’ve tried to see if my development environment install process is flawed, following the developer guide I have my suspicions I’m missing something as it jumps around a bit. But after a reinstall, my library issues go away I just have a build issue, where it looks like a header file may be missing some declarations?

From make output:

$ make -j9 all

Toolchain path: /Users/danedwcisco.com/esp/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc

Toolchain version: crosstool-ng-1.22.0-97-gc752ad5

Compiler version: 5.2.0

AR build/aws_iot/libaws_iot.a

CC build/bt/bt.o … … CXX build/main/ovms_console.o /Users/danedwcisco.com/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/ovms_boot.cpp: In constructor 'Boot::Boot()': /Users/danedwcisco.com/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/ovms_boot.cpp:313:46: error: 'xt_set_error_handler_callback' was not declared in this scope xt_set_error_handler_callback(ErrorCallback); ^ CC build/mbedtls/mbedtls/library/ecdh.o /Users/danedwcisco.com/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/ovms_boot.cpp: In static member function 'static void Boot::ErrorCallback(XtExcFrame*, int, bool)': /Users/danedwcisco.com/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/ovms_boot.cpp:499:94: error: 'esp_task_wdt_get_trigger_tasknames' was not declared in this scope esp_task_wdt_get_trigger_tasknames(boot_data.wdt_tasknames, sizeof(boot_data.wdt_tasknames)); ^ CC build/lwip/lwip/src/apps/sntp/sntp.o make[1]: [ovms_boot.o] Error 1 make[1]: Waiting for unfinished jobs.... CC build/libsodium/libsodium/src/libsodium/crypto_core/hsalsa20/core_hsalsa20.o

Here is my developer environment setup process:

Setup the tool chain

sudo easy_install pip

mkdir -p ~/esp

cd ~/esp

tar -xzf ~/Downloads/xtensa-esp32-elf-macos-1.22.0-97-gc752ad5-5.2.0.tar.gz

Path is set to $HOME/esp/xtensa-esp32-elf/bin

Download esp-idf v3.3 from github

$ cd ~/esp

$ git clone -b release/v3.3 --recursive https://github.com/espressif/esp-idf.git

$ cd esp-idf

$ git submodule update --init --recursive

The next command fails with a local issue so I do the following prior:

$ export LANG="en_US.UTF-8"

$ python -m pip install --user -r $IDF_PATH/requirements.txt

Requirement already satisfied: pyserial>=3.0 in /Users/danedwcisco.com/Library/Python/3.8/lib/python/site-packages (from -r /Users/danedwcisco.com/esp/esp-idf/requirements.txt (line 8)) (3.5) Requirement already satisfied: future>=0.15.2 in /Users/danedwcisco.com/Library/Python/3.8/lib/python/site-packages (from -r /Users/danedwcisco.com/esp/esp-idf/requirements.txt (line 9)) (0.18.2) Requirement already satisfied: cryptography<35,>=2.1.4 in /Users/danedwcisco.com/Library/Python/3.8/lib/python/site-packages (from -r /Users/danedwcisco.com/esp/esp-idf/requirements.txt (line 10)) (3.4.8) Requirement already satisfied: pyparsing<2.4.0,>=2.0.3 in /Users/danedwcisco.com/Library/Python/3.8/lib/python/site-packages (from -r /Users/danedwcisco.com/esp/esp-idf/requirements.txt (line 13)) (2.3.1) Requirement already satisfied: cffi>=1.12 in /Users/danedwcisco.com/Library/Python/3.8/lib/python/site-packages (from cryptography<35,>=2.1.4->-r /Users/danedwcisco.com/esp/esp-idf/requirements.txt (line 10)) (1.15.1) Requirement already satisfied: pycparser in /Users/danedwcisco.com/Library/Python/3.8/lib/python/site-packages (from cffi>=1.12->cryptography<35,>=2.1.4->-r /Users/danedwcisco.com/esp/esp-idf/requirements.txt (line 10)) (2.21)

But it suggest I need to check python version so need to install requirements for python 3

python --version Python 3.8.9

$ python3 -m pip install --user -r $IDF_PATH/requirements.txt Ignoring cffi: markers 'python_version < "3.6"' don't match your environment Requirement already satisfied: setuptools in /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages (from -r /Users/danedwcisco.com/esp/esp-idf/requirements.txt (line 4)) (49.2.1) Requirement already satisfied: pyserial>=3.0 in /Users/danedwcisco.com/Library/Python/3.8/lib/python/site-packages (from -r /Users/danedwcisco.com/esp/esp-idf/requirements.txt (line 8)) (3.5) Requirement already satisfied: future>=0.15.2 in /Users/danedwcisco.com/Library/Python/3.8/lib/python/site-packages (from -r /Users/danedwcisco.com/esp/esp-idf/requirements.txt (line 9)) (0.18.2) Requirement already satisfied: cryptography<35,>=2.1.4 in /Users/danedwcisco.com/Library/Python/3.8/lib/python/site-packages (from -r /Users/danedwcisco.com/esp/esp-idf/requirements.txt (line 10)) (3.4.8) Requirement already satisfied: pyparsing<2.4.0,>=2.0.3 in /Users/danedwcisco.com/Library/Python/3.8/lib/python/site-packages (from -r /Users/danedwcisco.com/esp/esp-idf/requirements.txt (line 13)) (2.3.1) Requirement already satisfied: cffi>=1.12 in /Users/danedwcisco.com/Library/Python/3.8/lib/python/site-packages (from cryptography<35,>=2.1.4->-r /Users/danedwcisco.com/esp/esp-idf/requirements.txt (line 10)) (1.15.1) Requirement already satisfied: pycparser in /Users/danedwcisco.com/Library/Python/3.8/lib/python/site-packages (from cffi>=1.12->cryptography<35,>=2.1.4->-r /Users/danedwcisco.com/esp/esp-idf/requirements.txt (line 10)) (2.21)

Then when I try to execute the make menuconfig I get a bunch of errors where macOS doesn’t trust xtensa libs and bins, so I have to go find and execute all of them manually, don’t know if there’s an easier way to allow all

$ make menuconfig

@.***

There is this comment after the make menuconfig If you are Arch Linux user, navigate to SDK tool configuration and change the name of Python 2 interpreter from python to python2.

I am not sure if I should be changing this to python3 or leaving as default python on macOS? Tried both and no difference in the error output.

Then the OVMS clone all goes smoothly

$ git clone https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3.githttps://www.google.com/url?q=https://www.google.com/url?q%3Dhttps://github.com/openvehicles/Open-Vehicle-Monitoring-System-3.git%26amp;sa%3DD%26amp;source%3Deditors%26amp;ust%3D1662706031482808%26amp;usg%3DAOvVaw3FE6fxvLUDaQhDgm2xR4iO&sa=D&source=docs&ust=1662706031703463&usg=AOvVaw1uUqqGKb44xiY89H4yhnVy

$ cd Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3

$ git submodule update --init --recursive

$ cd vehicle/OVMS.V3 < not required , already there.

$ cp support/sdkconfig.default.hw31 sdkconfig

$ make menuconfig

Not using usb so at this point I just attempt to make the bin and get the following errors:

$ make -j9 all

See attached full output or the errors above.

No build/ovms3.bin file is created so I figure the errors are causing this.

I figured it may be the bison issue , even though I hadn’t installed the toolchain via the from scratch method …..should ? (tried, no success)

$ brew upgrade bison Running brew update --auto-update... ==> Auto-updated Homebrew! Updated 1 tap (homebrew/cask).

You have 11 outdated formulae and 1 outdated cask installed. You can upgrade them with brew upgrade or list them with brew outdated.

Error: bison not installed

Regards Dan Edwards

From: Mark Webb-Johnson @.> Date: Thursday, 8 September 2022 at 3:18 pm To: openvehicles/Open-Vehicle-Monitoring-System-3 @.> Cc: aidehuazi @.>, Mention @.> Subject: Re: [openvehicles/Open-Vehicle-Monitoring-System-3] 40kWh 2018+ Nissan LEAF support? (#323)

Apologies for lack of reply and updates. I haven’t been able to get back to this since I lost my development environment several months ago, would appreciate if someone has details on how to build the expresif dev environment on macOS 12.5 or 13, I’m getting some make issues.

I just follow the developer's guide instructions for installation on OSX. Sometimes there are issues with python and dependencies. What are the error messages shown during the build?

— Reply to this email directly, view it on GitHubhttps://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/issues/323#issuecomment-1240232072, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASUEJ56DIVICVR6YU24EUFLV5FZKJANCNFSM4KHXO7BA. You are receiving this because you were mentioned.Message ID: @.***>

aidehuazi commented 2 years ago

Hi Mark,

Spoke too soon, seems make is removing that config item. Any clue as to why?

I edit the sdkconfig file adding the entry CONFIG_ESP32_PANIC_CALLBACK=y , noting the statement at the top of the file “# Automatically generated file; DO NOT EDIT.”

Check it:

$ grep CONFIG_ESP32_PANIC_CALLBACK sdkconfig CONFIG_ESP32_PANIC_CALLBACK=y

Execute the build

$ make -j9 all Toolchain path: /Users/danedwcisco.com/esp/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc Toolchain version: crosstool-ng-1.22.0-97-gc752ad5 Compiler version: 5.2.0 GENCONFIG #

configuration written to /Users/danedwcisco.com/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/sdkconfig

# App "ovms3" version: 3.3.003-2-gd00de6c0 CC build/app_trace/app_trace.o … … CXX build/main/ovms_config.o /Users/danedwcisco.com/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/ovms_boot.cpp: In constructor 'Boot::Boot(': /Users/danedwcisco.com/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/ovms_boot.cpp:313:46: error: 'xt_set_error_handler_callback' was not declared in this scope xt_set_error_handler_callback(ErrorCallback); ^ CC build/lwip/lwip/src/core/def.o /Users/danedwcisco.com/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/ovms_boot.cpp: In static member function 'static void Boot::ErrorCallback(XtExcFrame*, int, bool)': /Users/danedwcisco.com/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/ovms_boot.cpp:499:94: error: 'esp_task_wdt_get_trigger_tasknames' was not declared in this scope esp_task_wdt_get_trigger_tasknames(boot_data.wdt_tasknames, sizeof(boot_data.wdt_tasknames)); ^ CC build/mbedtls/mbedtls/library/ecdsa.o CC build/nghttp/nghttp2/lib/nghttp2_outbound_item.o CXX build/nvs_flash/src/nvs_encr.o make[1]: [ovms_boot.o] Error 1 make[1]: Waiting for unfinished jobs.... … … CC build/lwip/port/esp32/tcp_isn/tcp_isn.o AR build/lwip/liblwip.a

build completes with errors

$ grep CONFIG_ESP32_PANIC_CALLBACK sdkconfig

So where do I modify config so that this remains in sdkconfig for the build?

Regards Dan Edwards

From: Dan Edwards @.> Date: Friday, 9 September 2022 at 8:01 pm To: openvehicles/Open-Vehicle-Monitoring-System-3 @.>, openvehicles/Open-Vehicle-Monitoring-System-3 @.> Cc: Mention @.> Subject: Re: [openvehicles/Open-Vehicle-Monitoring-System-3] 40kWh 2018+ Nissan LEAF support? (#323) Hi Mark,

I just found your response to Heiko in mid August.

check if you've copied the sdkconfig template (support/sdkconfig.default.hw31), it seems your config lacks CONFIG_ESP32_PANIC_CALLBACK=y, possibly more.

I copy the default file and execute make menuconfig and that config item is no longer in the sdkconfig file.

% cp support/sdkconfig.default.hw31 sdkconfig $ grep CONFIG_ESP32_PANIC_CALLBACK sdkconfig CONFIG_ESP32_PANIC_CALLBACK=y $ make menuconfig Toolchain path: /Users/danedwcisco.com/esp/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc Toolchain version: crosstool-ng-1.22.0-97-gc752ad5 Compiler version: 5.2.0 MENUCONFIG /Users/danedwcisco.com/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/sdkconfig - Espressif IoT Development Framework Configuration

configuration written to /Users/danedwcisco.com/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/sdkconfig

End of the configuration. Execute 'make' to start the build or try 'make help'.

GENCONFIG App "ovms3" version: 3.3.003-2-gd00de6c0 @.*** OVMS.V3 % grep CONFIG_ESP32_PANIC_CALLBACK sdkconfig

Just adding that back to the config file resolved it. Not sure why the make menuconfig removes it?

Regards Dan Edwards

From: Dan Edwards @.> Date: Friday, 9 September 2022 at 4:33 pm To: openvehicles/Open-Vehicle-Monitoring-System-3 @.>, openvehicles/Open-Vehicle-Monitoring-System-3 @.> Cc: Mention @.> Subject: Re: [openvehicles/Open-Vehicle-Monitoring-System-3] 40kWh 2018+ Nissan LEAF support? (#323) Hi Mark,

I’ve tried to see if my development environment install process is flawed, following the developer guide I have my suspicions I’m missing something as it jumps around a bit. But after a reinstall, my library issues go away I just have a build issue, where it looks like a header file may be missing some declarations?

From make output:

$ make -j9 all

Toolchain path: /Users/danedwcisco.com/esp/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc

Toolchain version: crosstool-ng-1.22.0-97-gc752ad5

Compiler version: 5.2.0

AR build/aws_iot/libaws_iot.a

CC build/bt/bt.o … … CXX build/main/ovms_console.o /Users/danedwcisco.com/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/ovms_boot.cpp: In constructor 'Boot::Boot()': /Users/danedwcisco.com/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/ovms_boot.cpp:313:46: error: 'xt_set_error_handler_callback' was not declared in this scope xt_set_error_handler_callback(ErrorCallback); ^ CC build/mbedtls/mbedtls/library/ecdh.o /Users/danedwcisco.com/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/ovms_boot.cpp: In static member function 'static void Boot::ErrorCallback(XtExcFrame*, int, bool)': /Users/danedwcisco.com/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/ovms_boot.cpp:499:94: error: 'esp_task_wdt_get_trigger_tasknames' was not declared in this scope esp_task_wdt_get_trigger_tasknames(boot_data.wdt_tasknames, sizeof(boot_data.wdt_tasknames)); ^ CC build/lwip/lwip/src/apps/sntp/sntp.o make[1]: [ovms_boot.o] Error 1 make[1]: Waiting for unfinished jobs.... CC build/libsodium/libsodium/src/libsodium/crypto_core/hsalsa20/core_hsalsa20.o

Here is my developer environment setup process:

Setup the tool chain

sudo easy_install pip

mkdir -p ~/esp

cd ~/esp

tar -xzf ~/Downloads/xtensa-esp32-elf-macos-1.22.0-97-gc752ad5-5.2.0.tar.gz

Path is set to $HOME/esp/xtensa-esp32-elf/bin

Download esp-idf v3.3 from github

$ cd ~/esp

$ git clone -b release/v3.3 --recursive https://github.com/espressif/esp-idf.git

$ cd esp-idf

$ git submodule update --init --recursive

The next command fails with a local issue so I do the following prior:

$ export LANG="en_US.UTF-8"

$ python -m pip install --user -r $IDF_PATH/requirements.txt

Requirement already satisfied: pyserial>=3.0 in /Users/danedwcisco.com/Library/Python/3.8/lib/python/site-packages (from -r /Users/danedwcisco.com/esp/esp-idf/requirements.txt (line 8)) (3.5) Requirement already satisfied: future>=0.15.2 in /Users/danedwcisco.com/Library/Python/3.8/lib/python/site-packages (from -r /Users/danedwcisco.com/esp/esp-idf/requirements.txt (line 9)) (0.18.2) Requirement already satisfied: cryptography<35,>=2.1.4 in /Users/danedwcisco.com/Library/Python/3.8/lib/python/site-packages (from -r /Users/danedwcisco.com/esp/esp-idf/requirements.txt (line 10)) (3.4.8) Requirement already satisfied: pyparsing<2.4.0,>=2.0.3 in /Users/danedwcisco.com/Library/Python/3.8/lib/python/site-packages (from -r /Users/danedwcisco.com/esp/esp-idf/requirements.txt (line 13)) (2.3.1) Requirement already satisfied: cffi>=1.12 in /Users/danedwcisco.com/Library/Python/3.8/lib/python/site-packages (from cryptography<35,>=2.1.4->-r /Users/danedwcisco.com/esp/esp-idf/requirements.txt (line 10)) (1.15.1) Requirement already satisfied: pycparser in /Users/danedwcisco.com/Library/Python/3.8/lib/python/site-packages (from cffi>=1.12->cryptography<35,>=2.1.4->-r /Users/danedwcisco.com/esp/esp-idf/requirements.txt (line 10)) (2.21)

But it suggest I need to check python version so need to install requirements for python 3

python --version Python 3.8.9

$ python3 -m pip install --user -r $IDF_PATH/requirements.txt Ignoring cffi: markers 'python_version < "3.6"' don't match your environment Requirement already satisfied: setuptools in /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages (from -r /Users/danedwcisco.com/esp/esp-idf/requirements.txt (line 4)) (49.2.1) Requirement already satisfied: pyserial>=3.0 in /Users/danedwcisco.com/Library/Python/3.8/lib/python/site-packages (from -r /Users/danedwcisco.com/esp/esp-idf/requirements.txt (line 8)) (3.5) Requirement already satisfied: future>=0.15.2 in /Users/danedwcisco.com/Library/Python/3.8/lib/python/site-packages (from -r /Users/danedwcisco.com/esp/esp-idf/requirements.txt (line 9)) (0.18.2) Requirement already satisfied: cryptography<35,>=2.1.4 in /Users/danedwcisco.com/Library/Python/3.8/lib/python/site-packages (from -r /Users/danedwcisco.com/esp/esp-idf/requirements.txt (line 10)) (3.4.8) Requirement already satisfied: pyparsing<2.4.0,>=2.0.3 in /Users/danedwcisco.com/Library/Python/3.8/lib/python/site-packages (from -r /Users/danedwcisco.com/esp/esp-idf/requirements.txt (line 13)) (2.3.1) Requirement already satisfied: cffi>=1.12 in /Users/danedwcisco.com/Library/Python/3.8/lib/python/site-packages (from cryptography<35,>=2.1.4->-r /Users/danedwcisco.com/esp/esp-idf/requirements.txt (line 10)) (1.15.1) Requirement already satisfied: pycparser in /Users/danedwcisco.com/Library/Python/3.8/lib/python/site-packages (from cffi>=1.12->cryptography<35,>=2.1.4->-r /Users/danedwcisco.com/esp/esp-idf/requirements.txt (line 10)) (2.21)

Then when I try to execute the make menuconfig I get a bunch of errors where macOS doesn’t trust xtensa libs and bins, so I have to go find and execute all of them manually, don’t know if there’s an easier way to allow all

$ make menuconfig

@.***

There is this comment after the make menuconfig If you are Arch Linux user, navigate to SDK tool configuration and change the name of Python 2 interpreter from python to python2.

I am not sure if I should be changing this to python3 or leaving as default python on macOS? Tried both and no difference in the error output.

Then the OVMS clone all goes smoothly

$ git clone https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3.githttps://www.google.com/url?q=https://www.google.com/url?q%3Dhttps://github.com/openvehicles/Open-Vehicle-Monitoring-System-3.git%26amp;sa%3DD%26amp;source%3Deditors%26amp;ust%3D1662706031482808%26amp;usg%3DAOvVaw3FE6fxvLUDaQhDgm2xR4iO&sa=D&source=docs&ust=1662706031703463&usg=AOvVaw1uUqqGKb44xiY89H4yhnVy

$ cd Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3

$ git submodule update --init --recursive

$ cd vehicle/OVMS.V3 < not required , already there.

$ cp support/sdkconfig.default.hw31 sdkconfig

$ make menuconfig

Not using usb so at this point I just attempt to make the bin and get the following errors:

$ make -j9 all

See attached full output or the errors above.

No build/ovms3.bin file is created so I figure the errors are causing this.

I figured it may be the bison issue , even though I hadn’t installed the toolchain via the from scratch method …..should ? (tried, no success)

$ brew upgrade bison Running brew update --auto-update... ==> Auto-updated Homebrew! Updated 1 tap (homebrew/cask).

You have 11 outdated formulae and 1 outdated cask installed. You can upgrade them with brew upgrade or list them with brew outdated.

Error: bison not installed

Regards Dan Edwards

From: Mark Webb-Johnson @.> Date: Thursday, 8 September 2022 at 3:18 pm To: openvehicles/Open-Vehicle-Monitoring-System-3 @.> Cc: aidehuazi @.>, Mention @.> Subject: Re: [openvehicles/Open-Vehicle-Monitoring-System-3] 40kWh 2018+ Nissan LEAF support? (#323)

Apologies for lack of reply and updates. I haven’t been able to get back to this since I lost my development environment several months ago, would appreciate if someone has details on how to build the expresif dev environment on macOS 12.5 or 13, I’m getting some make issues.

I just follow the developer's guide instructions for installation on OSX. Sometimes there are issues with python and dependencies. What are the error messages shown during the build?

— Reply to this email directly, view it on GitHubhttps://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/issues/323#issuecomment-1240232072, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASUEJ56DIVICVR6YU24EUFLV5FZKJANCNFSM4KHXO7BA. You are receiving this because you were mentioned.Message ID: @.***>

aidehuazi commented 2 years ago

Apologies, it was Michael who supplied that solution on 18/8. Any tips from anyone on getting that working in the 3.3 esp_idf would be helpful.

On 9 Sep 2022, at 8:58 pm, Dan Edwards @.***> wrote:

 Hi Mark,

Spoke too soon, seems make is removing that config item. Any clue as to why?

I edit the sdkconfig file adding the entry CONFIG_ESP32_PANIC_CALLBACK=y , noting the statement at the top of the file “# Automatically generated file; DO NOT EDIT.”

Check it:

$ grep CONFIG_ESP32_PANIC_CALLBACK sdkconfig CONFIG_ESP32_PANIC_CALLBACK=y

Execute the build

$ make -j9 all
Toolchain path: /Users/danedwcisco.com/esp/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc Toolchain version: crosstool-ng-1.22.0-97-gc752ad5 Compiler version: 5.2.0 GENCONFIG #

configuration written to /Users/danedwcisco.com/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/sdkconfig

# App "ovms3" version: 3.3.003-2-gd00de6c0 CC build/app_trace/app_trace.o … … CXX build/main/ovms_config.o /Users/danedwcisco.com/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/ovms_boot.cpp: In constructor 'Boot::Boot(': /Users/danedwcisco.com/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/ovms_boot.cpp:313:46: error: 'xt_set_error_handler_callback' was not declared in this scope xt_set_error_handler_callback(ErrorCallback); ^ CC build/lwip/lwip/src/core/def.o /Users/danedwcisco.com/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/ovms_boot.cpp: In static member function 'static void Boot::ErrorCallback(XtExcFrame*, int, bool)': /Users/danedwcisco.com/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/ovms_boot.cpp:499:94: error: 'esp_task_wdt_get_trigger_tasknames' was not declared in this scope esp_task_wdt_get_trigger_tasknames(boot_data.wdt_tasknames, sizeof(boot_data.wdt_tasknames)); ^ CC build/mbedtls/mbedtls/library/ecdsa.o CC build/nghttp/nghttp2/lib/nghttp2_outbound_item.o CXX build/nvs_flash/src/nvs_encr.o make[1]: [ovms_boot.o] Error 1 make[1]: Waiting for unfinished jobs.... … … CC build/lwip/port/esp32/tcp_isn/tcp_isn.o AR build/lwip/liblwip.a

build completes with errors

$ grep CONFIG_ESP32_PANIC_CALLBACK sdkconfig

So where do I modify config so that this remains in sdkconfig for the build?

Regards Dan Edwards

From: Dan Edwards @.> Date: Friday, 9 September 2022 at 8:01 pm To: openvehicles/Open-Vehicle-Monitoring-System-3 @.>, openvehicles/Open-Vehicle-Monitoring-System-3 @.> Cc: Mention @.> Subject: Re: [openvehicles/Open-Vehicle-Monitoring-System-3] 40kWh 2018+ Nissan LEAF support? (#323)

Hi Mark,

I just found your response to Heiko in mid August.

check if you've copied the sdkconfig template (support/sdkconfig.default.hw31), it seems your config lacks CONFIG_ESP32_PANIC_CALLBACK=y, possibly more.

I copy the default file and execute make menuconfig and that config item is no longer in the sdkconfig file.

% cp support/sdkconfig.default.hw31 sdkconfig
$ grep CONFIG_ESP32_PANIC_CALLBACK sdkconfig CONFIG_ESP32_PANIC_CALLBACK=y $ make menuconfig
Toolchain path: /Users/danedwcisco.com/esp/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc Toolchain version: crosstool-ng-1.22.0-97-gc752ad5 Compiler version: 5.2.0 MENUCONFIG /Users/danedwcisco.com/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/sdkconfig - Espressif IoT Development Framework Configuration

configuration written to /Users/danedwcisco.com/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/sdkconfig

End of the configuration. Execute 'make' to start the build or try 'make help'.

GENCONFIG App "ovms3" version: 3.3.003-2-gd00de6c0 @.*** OVMS.V3 % grep CONFIG_ESP32_PANIC_CALLBACK sdkconfig

Just adding that back to the config file resolved it. Not sure why the make menuconfig removes it?

Regards Dan Edwards

From: Dan Edwards @.> Date: Friday, 9 September 2022 at 4:33 pm To: openvehicles/Open-Vehicle-Monitoring-System-3 @.>, openvehicles/Open-Vehicle-Monitoring-System-3 @.> Cc: Mention @.> Subject: Re: [openvehicles/Open-Vehicle-Monitoring-System-3] 40kWh 2018+ Nissan LEAF support? (#323)

Hi Mark,

I’ve tried to see if my development environment install process is flawed, following the developer guide I have my suspicions I’m missing something as it jumps around a bit. But after a reinstall, my library issues go away I just have a build issue, where it looks like a header file may be missing some declarations?

From make output: $ make -j9 all
Toolchain path: /Users/danedwcisco.com/esp/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc Toolchain version: crosstool-ng-1.22.0-97-gc752ad5 Compiler version: 5.2.0 AR build/aws_iot/libaws_iot.a CC build/bt/bt.o
… … CXX build/main/ovms_console.o /Users/danedwcisco.com/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/ovms_boot.cpp: In constructor 'Boot::Boot()': /Users/danedwcisco.com/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/ovms_boot.cpp:313:46: error: 'xt_set_error_handler_callback' was not declared in this scope xt_set_error_handler_callback(ErrorCallback); ^ CC build/mbedtls/mbedtls/library/ecdh.o /Users/danedwcisco.com/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/ovms_boot.cpp: In static member function 'static void Boot::ErrorCallback(XtExcFrame*, int, bool)': /Users/danedwcisco.com/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/ovms_boot.cpp:499:94: error: 'esp_task_wdt_get_trigger_tasknames' was not declared in this scope esp_task_wdt_get_trigger_tasknames(boot_data.wdt_tasknames, sizeof(boot_data.wdt_tasknames)); ^ CC build/lwip/lwip/src/apps/sntp/sntp.o make[1]: [ovms_boot.o] Error 1 make[1]: Waiting for unfinished jobs.... CC build/libsodium/libsodium/src/libsodium/crypto_core/hsalsa20/core_hsalsa20.o

Here is my developer environment setup process:

Setup the tool chain sudo easy_install pip mkdir -p ~/esp cd ~/esp tar -xzf ~/Downloads/xtensa-esp32-elf-macos-1.22.0-97-gc752ad5-5.2.0.tar.gz

Path is set to $HOME/esp/xtensa-esp32-elf/bin

Download esp-idf v3.3 from github

$ cd ~/esp $ git clone -b release/v3.3 --recursive https://github.com/espressif/esp-idf.git

$ cd esp-idf $ git submodule update --init --recursive

The next command fails with a local issue so I do the following prior:

$ export LANG="en_US.UTF-8"

$ python -m pip install --user -r $IDF_PATH/requirements.txt

Requirement already satisfied: pyserial>=3.0 in /Users/danedwcisco.com/Library/Python/3.8/lib/python/site-packages (from -r /Users/danedwcisco.com/esp/esp-idf/requirements.txt (line 8)) (3.5) Requirement already satisfied: future>=0.15.2 in /Users/danedwcisco.com/Library/Python/3.8/lib/python/site-packages (from -r /Users/danedwcisco.com/esp/esp-idf/requirements.txt (line 9)) (0.18.2) Requirement already satisfied: cryptography<35,>=2.1.4 in /Users/danedwcisco.com/Library/Python/3.8/lib/python/site-packages (from -r /Users/danedwcisco.com/esp/esp-idf/requirements.txt (line 10)) (3.4.8) Requirement already satisfied: pyparsing<2.4.0,>=2.0.3 in /Users/danedwcisco.com/Library/Python/3.8/lib/python/site-packages (from -r /Users/danedwcisco.com/esp/esp-idf/requirements.txt (line 13)) (2.3.1) Requirement already satisfied: cffi>=1.12 in /Users/danedwcisco.com/Library/Python/3.8/lib/python/site-packages (from cryptography<35,>=2.1.4->-r /Users/danedwcisco.com/esp/esp-idf/requirements.txt (line 10)) (1.15.1) Requirement already satisfied: pycparser in /Users/danedwcisco.com/Library/Python/3.8/lib/python/site-packages (from cffi>=1.12->cryptography<35,>=2.1.4->-r /Users/danedwcisco.com/esp/esp-idf/requirements.txt (line 10)) (2.21)

But it suggest I need to check python version so need to install requirements for python 3

python --version Python 3.8.9

$ python3 -m pip install --user -r $IDF_PATH/requirements.txt
Ignoring cffi: markers 'python_version < "3.6"' don't match your environment Requirement already satisfied: setuptools in /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages (from -r /Users/danedwcisco.com/esp/esp-idf/requirements.txt (line 4)) (49.2.1) Requirement already satisfied: pyserial>=3.0 in /Users/danedwcisco.com/Library/Python/3.8/lib/python/site-packages (from -r /Users/danedwcisco.com/esp/esp-idf/requirements.txt (line 8)) (3.5) Requirement already satisfied: future>=0.15.2 in /Users/danedwcisco.com/Library/Python/3.8/lib/python/site-packages (from -r /Users/danedwcisco.com/esp/esp-idf/requirements.txt (line 9)) (0.18.2) Requirement already satisfied: cryptography<35,>=2.1.4 in /Users/danedwcisco.com/Library/Python/3.8/lib/python/site-packages (from -r /Users/danedwcisco.com/esp/esp-idf/requirements.txt (line 10)) (3.4.8) Requirement already satisfied: pyparsing<2.4.0,>=2.0.3 in /Users/danedwcisco.com/Library/Python/3.8/lib/python/site-packages (from -r /Users/danedwcisco.com/esp/esp-idf/requirements.txt (line 13)) (2.3.1) Requirement already satisfied: cffi>=1.12 in /Users/danedwcisco.com/Library/Python/3.8/lib/python/site-packages (from cryptography<35,>=2.1.4->-r /Users/danedwcisco.com/esp/esp-idf/requirements.txt (line 10)) (1.15.1) Requirement already satisfied: pycparser in /Users/danedwcisco.com/Library/Python/3.8/lib/python/site-packages (from cffi>=1.12->cryptography<35,>=2.1.4->-r /Users/danedwcisco.com/esp/esp-idf/requirements.txt (line 10)) (2.21)

Then when I try to execute the make menuconfig I get a bunch of errors where macOS doesn’t trust xtensa libs and bins, so I have to go find and execute all of them manually, don’t know if there’s an easier way to allow all

$ make menuconfig

There is this comment after the make menuconfig If you are Arch Linux user, navigate to SDK tool configuration and change the name of Python 2 interpreter from python to python2.

I am not sure if I should be changing this to python3 or leaving as default python on macOS? Tried both and no difference in the error output.

Then the OVMS clone all goes smoothly

$ git clone https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3.git $ cd Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3 $ git submodule update --init --recursive $ cd vehicle/OVMS.V3 < not required , already there. $ cp support/sdkconfig.default.hw31 sdkconfig $ make menuconfig

Not using usb so at this point I just attempt to make the bin and get the following errors:

$ make -j9 all

See attached full output or the errors above.

No build/ovms3.bin file is created so I figure the errors are causing this.

I figured it may be the bison issue , even though I hadn’t installed the toolchain via the from scratch method …..should ? (tried, no success)

$ brew upgrade bison
Running brew update --auto-update... ==> Auto-updated Homebrew! Updated 1 tap (homebrew/cask).

You have 11 outdated formulae and 1 outdated cask installed. You can upgrade them with brew upgrade or list them with brew outdated.

Error: bison not installed

Regards Dan Edwards

From: Mark Webb-Johnson @.> Date: Thursday, 8 September 2022 at 3:18 pm To: openvehicles/Open-Vehicle-Monitoring-System-3 @.> Cc: aidehuazi @.>, Mention @.> Subject: Re: [openvehicles/Open-Vehicle-Monitoring-System-3] 40kWh 2018+ Nissan LEAF support? (#323)

Apologies for lack of reply and updates. I haven’t been able to get back to this since I lost my development environment several months ago, would appreciate if someone has details on how to build the expresif dev environment on macOS 12.5 or 13, I’m getting some make issues.

I just follow the developer's guide instructions for installation on OSX. Sometimes there are issues with python and dependencies. What are the error messages shown during the build?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

dexterbg commented 2 years ago

$ cd ~/esp $ git clone -b release/v3.3 --recursive https://github.com/espressif/esp-idf.git

There's your fault. See developer guide, section "Install OVMS’s own ESP-IDF":

https://docs.google.com/document/d/1q5M9Lb5jzQhJzPMnkMKwy4Es5YK12ACQejX_NWEixr0/edit#heading=h.87wcje3uoqbd

…or the Linux/Mac section: https://docs.google.com/document/d/1q5M9Lb5jzQhJzPMnkMKwy4Es5YK12ACQejX_NWEixr0/edit#heading=h.ps7gqk91cb3s

aidehuazi commented 2 years ago

Hey Michael,

That’s fixed it. Thanks for looking over it, I had done that step previously when I had other library issues on the build, but missed it on this occasion when trying to reproduce to show you the procedure I was following.

Cheers Dan

From: Michael Balzer @.> Date: Saturday, 10 September 2022 at 5:35 pm To: openvehicles/Open-Vehicle-Monitoring-System-3 @.> Cc: aidehuazi @.>, Mention @.> Subject: Re: [openvehicles/Open-Vehicle-Monitoring-System-3] 40kWh 2018+ Nissan LEAF support? (#323)

$ cd ~/esp $ git clone -b release/v3.3 --recursive https://github.com/espressif/esp-idf.git

There's your fault. See developer guide, section "Install OVMS’s own ESP-IDF":

https://docs.google.com/document/d/1q5M9Lb5jzQhJzPMnkMKwy4Es5YK12ACQejX_NWEixr0/edit#heading=h.87wcje3uoqbd

— Reply to this email directly, view it on GitHubhttps://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/issues/323#issuecomment-1242657994, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASUEJ52HYFGWWC6JZQWJD4TV5Q25RANCNFSM4KHXO7BA. You are receiving this because you were mentioned.Message ID: @.***>

cooperised commented 1 year ago

Really interested in this. I've just (today) bought a 39kWh 2022 Acenta, and was disgruntled to find that it didn't have NissanConnect services like my late-2019 40kWh Acenta had. The dealership had omitted to mention this... grumble grumble.

Previously I'd been getting the state of charge from NissanConnect via a 3rd party library to feed into Home Assistant and make decisions about how aggressively to divert solar power to the car, and now all of that is broken.

I would love to be able to replicate this functionality with OVMS, but I'm not prepared to make a hardware mod to a car that's on finance. What's the current status of the polling firmware for OVMS? And does anyone know if the 2022 39kWh models provide the same information as the 40kWh models they replace?

I am an EE and a reasonably experienced software engineer, in case I can be of any help. On the downside I also have two kids under 5, so time is not exactly coming out of my ears...

cods4 commented 1 year ago

I am an EE and a reasonably experienced software engineer, in case I can be of any help. On the downside I also have two kids under 5, so time is not exactly coming out of my ears...

I'm in the same personal situation (electrical engineer with young kids). I would be very surprised if they completely re-designed the CAN-BUS network/messages etc on an EOL platform.

The best thing you can do is get one of the OVMS units and help with development by testing or contributing to the code.

I suspect there will be some simple wiring mod we could make that can be used to wake up the CAN gateway to allow communications while the vehicle is charging.

TommySharpNZ commented 1 year ago

We have a "new" 2018 Nissan Leaf picked up today and already a little dismayed I can't get any stats into Home Assistant to show on our dashboard in the kitchen. I might order an OVMS and hopefully at some point the community can get it fully working. I'm not an EE or developer but happy to test and trial stuff... Although modifying any wiring would be off limits for me. My EV charger will be fully controllable from Home Assistant so maybe turning off the charger once and hour and back on might get the CAN gateway to wake up for a few moments?

Dunc63 commented 1 year ago

I have a 2021 62Kwh Leaf and am also willing to help test with this vehicle. I am not an electrician so can't help with that side of things. I was a software developer but don't know the modern languages - although I am willing to learn. I bought an OVMS in the hope of being able to get some data across to my Home Assistant. Can anyone tell me what (if any) data I will be able to get from the car please? How near are we to getting OVMS integrated to the 62kwh Leaf please? Can I help with any testing?

TommySharpNZ commented 1 year ago

My OVMS unit arrived today after a long wait…. Unfortunately it looks like still no real progress on support for my 2018 leaf 😩

cods4 commented 1 year ago

Just to give an update after a few months of use, mine is still working fine. Some features that don't work are: Starting a charge is very finicky from the app. It seems like I have to unlock and lock the car to wake it up, then quickly hit the button to start the charge, and this will only work after 5 or more tries. I think it is a bit better when using my tesla wall connector instead of portable evse. So there's some sort of timing issue or canbus issue there I suspect.

There's no indication of charging when the car is DC fast charging, I can just see the SOC increasing.

Time to charge seems to always calculate based on the battery being empty. I.e 12 hours when charging at 3.3kW.

Battery temperature doesn't work.

Charger temp doesn't work.

And A/C only works when the car is plugged in.

What is working well and I use regularly. Lock/unlock Doors open/closed indication Headlights on indication Plugged in to AC indication Sufficient SOC option to limit charge to 80% or whatever Stop charge 12V battery voltage Ambient temperature HV battery voltage Cabin temp

TommySharpNZ commented 1 year ago

No more word on getting official support for the ZE1 leaf?

mobicek commented 1 year ago

Hi, please could someone send me can logs from ZE1 CAR CAN in charging mode (when charger wake up the car) or waked up via nissan remote command ? Thanks.

cods4 commented 1 year ago

Here is all my can logging data from last year. Sorry I don't have time at the moment to figure out how to set up the logging again.

https://drive.google.com/drive/folders/1KgSCeS5VRyIokIbVBJE_g6lh-6dCZZ_1?usp=sharing

mobicek commented 1 year ago

Here is all my can logging data from last year. Sorry I don't have time at the moment to figure out how to set up the logging again.

https://drive.google.com/drive/folders/1KgSCeS5VRyIokIbVBJE_g6lh-6dCZZ_1?usp=sharing

Thank you very much.

1onord commented 11 months ago

Hello OVMS friends,

I would like to give you another Tip if anyone is interested. I have the OVMS Active Polling firmware running without the Hardware Modification.

The old known Problem is that you dont get a Status if the Car is off.

I will know the SOC because i load the CAR over the PV.

If you send a Request via the Connect API you will receive a current status via OVMS. I have an Automation that queries the Position for my ZE1 via the Connect API every 10 minutes when I charge the car and then you also get a current SOC via OVMS.

Maybe one or the other can work with it.

TommySharpNZ commented 11 months ago

Hi @1onord I would appreciate some more detail on this.... I am in New Zealand and NissanConnect is not available so there is no API we can query... I obviously turn my car off, plug it in and then it charges by schedule overnight.... I'm guessing the OVMS will not be able to give me SOC during this time?

1onord commented 11 months ago

Hi,

oh yes you are right, i dont know that. Nissan Connect seems not to be available in NZ.

Without the 2 Wire Mod to the OBD Port you only got a Status if the Car is on, for me it wasn't that bad either. But of course it is nicer for energy Management if you know the SOC exactly. You can currently only achieve this via Connect, or you have to use the cable Mod, then the OVMS works like the ZE0 Leaf.

WillT93 commented 11 months ago

Joining the conversation to register interest in this. Recently picked up a 2018 Japanese import 40kwh Leaf. I live in NZ and so have no Nissan Connect services.

I have some development background but mostly only in UI and ASP.NET, probably not super helpful here....

Nonetheless, happy to test anything or help out in any way. I'd also be open to performing a hardware mod but would only be brave enough with some pretty clear instructions and a list of known limitations or dangers.

Big fan of this project and it's potential! (Also a Home Assistant user, like others in this thread)

Jerther commented 11 months ago

Same as @WMTaylor3 here. I have a 2018 SL in Canada, and I will happily do some hardware modifications, but I would need some fool-proof step by step instructions. With pictures™

@cods4 how successful have you been with your mod? Does it make the OVMS fully compatible with the ZE1? Any limitations? If all good, would you consider building a how-to for people like me and @WMTaylor3 ?

ehilfer commented 9 months ago

@1onord , to use the Connect API I'm assuming you need a recent model year Leaf (2022) that uses 4g service to connect, separately from the OVMS connection, is that right?

ehilfer commented 9 months ago

@cods4 thank you for sharing the wiring info! I think I follow most of it but could you share more about how and where you connected to the ev CAN and distinguish between H and L in both ev and car CAN connections? And also specifically where you are using connectors versus tapping into an existing wire. Can the M24 connector and cable be accessed by removing the glove compartment, or is it a more complicated dashboard disassembly? I'm looking forward to getting this running on my 2020 Leaf!

ehilfer commented 9 months ago

@cods4 since you've had your hands on the wiring, do you think there's enough room to use something like this to tap onto the CAN wires?

Brightfour Low Voltage Wire splice connectors - Pack of 12 Quick Solderless T Tap Connector 1 Pin,Rock Solid Connector for 24-20 AWG Cable for Vehicle/audio/video/Lighting and Automotive Uses https://a.co/d/7l6141t

caitotheonlypotato commented 9 months ago

We have a "new" 2018 Nissan Leaf picked up today and already a little dismayed I can't get any stats into Home Assistant to show on our dashboard in the kitchen. I might order an OVMS and hopefully at some point the community can get it fully working. I'm not an EE or developer but happy to test and trial stuff... Although modifying any wiring would be off limits for me. My EV charger will be fully controllable from Home Assistant so maybe turning off the charger once and hour and back on might get the CAN gateway to wake up for a few moments?

You absolutely can, but thisis using leaf spy and a perma mounted phone. while level 2 charging you need the do something like leave the parking lights on to keep the CANbus awake. Probably not relevant for this discussion though

image

reinux commented 8 months ago

2018 40kWh leaf owner and former IoT dev working in F#, C#, C, Python, JS/TS and the Zigbee stack. Could probably pick up CAN pretty quickly and chip in a little bit to this effort.

Seeing as car companies have become straight-up comic book villains, I intend not to buy a new car for as long as I can.

honzakadlec commented 6 months ago

Hi, Nissan leaf 2020 owner, attaching what I have found and tried to attach to connector M55 pins 28 & 29 to get to EV-CAN (I have simple SoC hardware posting data from my second car Nissan ZE0 and it works there) - but no luck so far. Is the EV-Can active during charging same as on ZE0 @dalathegreat please?

nissan_leaf_Network_diagram.pdf

caitotheonlypotato commented 6 months ago

Hi, Nissan leaf 2020 owner, attaching what I have found and tried to attach to connector M55 pins 28 & 29 to get to EV-CAN (I have simple SoC hardware posting data from my second car Nissan ZE0 and it works there) - but no luck so far. Is the EV-Can active during charging same as on ZE0 @dalathegreat please?

nissan_leaf_Network_diagram.pdf

Whilst I have no real technical knowledge, leafspy software will function on the ZE1 if the car is powered on, but not while charging unless the parking lights, or hazard lights are active. There may be other triggers that also work, but not that I've found. Hope that helps

Jerther commented 6 months ago

@honzakadlec Check out cods4's post about tapping into the CANBUS behind the CAN gateway.

honzakadlec commented 6 months ago

@honzakadlec Check out cods4's post about tapping into the CANBUS behind the CAN gateway.

aaah, I spot people are reffering to it, was not able to find it though, thank you @Jerther !

Jerther commented 6 months ago

@honzakadlec no problem! Please do keep us posted about your project if you can, successful or not ;)

honzakadlec commented 6 months ago

@honzakadlec no problem! Please do keep us posted about your project if you can, successful or not ;)

Hi @Jerther I sucessfully connected to EV-CAN of ZE1 today, the pins in documentation are reversed (CAN-H / CAN-L) - wire colors are correct (blue for CAN-H),

I'm building my own EVSE so I can limit the power going to car by surplusses in PV plant. I have now the SoC data in my OpenHab and I can use it to control the EVSE output power.

Thank you again for support!

Jan

honzakadlec commented 5 months ago

For anyone needing to connect to EV CAN and not wanting to void waranty, I found there are connectors available to buy and create custom "CAN Cord" wire that can have the splicing, so we are not modifying car cables. can-cord2 can-cord1

damesmokesmids commented 5 months ago

For anyone needing to connect to EV CAN and not wanting to void waranty, I found there are connectors available to buy and create custom "CAN Cord" wire that can have the splicing, so we are not modifying car cables.

@honzakadlec wow, this seems great. Could this be used by a novice like me to get OVMS working on my 2020 leaf S? If so, could you tell me how?

WillT93 commented 5 months ago

For anyone needing to connect to EV CAN and not wanting to void waranty, I found there are connectors available to buy and create custom "CAN Cord" wire that can have the splicing, so we are not modifying car cables. can-cord2 can-cord1

This looks very promising! Work I would be happy to do! Seems like it's pretty accessible in the drivers footwell too... Out of interest, this gets you access to EV CAN but not CAR CAN yes? So presumably charging and battery status etc but not things like central locking etc?

Any idea how access to CAR CAN could be achieved in a similarly non-destructive manner?

ehilfer commented 5 months ago

I don't think this will help with the 2018+ Leaf, since you need to patch into the two can buses on the other side of the gateway from where that cable connects to the obd2 connector.  I was able to make connections using clip on T-Taps on my 2020 Leaf and it works great with latest build. The taps create a little insulated spade lug that you can clip or un clip to.   If needed the taps could be removed without damaging the original wire. I tapped into both ev and car can buses at the vehicle control module which is s sitting right behind the glove box on my left hand drive model. I'll share more details and pictures when I get time:

image

image

image

image

damesmokesmids commented 5 months ago

I don't think this will help with the 2018+ Leaf, since you need to patch into the two can buses on the other side of the gateway from where that cable connects to the obd2 connector. I was able to make connections using clip on T-Taps on my 2020 Leaf and it works great with latest build. The taps create a little insulated spade lug that you can clip or un clip to. If needed the taps could be removed without damaging the original wire. I tapped into both ev and car can buses at the vehicle control module which is s sitting right behind the glove box on my left hand drive model. I'll share more details and pictures when I get time

@ehilfer this looks completely reasonable to do and has made me confident enough now to order a OVMS for my car. And you confirmed it works with 2020 and with the latest build. awesome. Those pictures are incredibly helpful!

ehilfer commented 5 months ago

I've been using the iOS app and the following have been working well, and some changes I'd like to make in the firmware to improve metrics that show in the app:

ehilfer commented 5 months ago

Also - for power to the OVMS module I used same type of T-Taps to clip onto 12V and ground wires behind the car's ODB2 connector and ran the wires across behind the dashboard.

Here's the tap connectors I used for all of the connections: https://www.amazon.com/gp/product/B0C9C54F87/

damesmokesmids commented 5 months ago

@ehilfer how did you find the correct wires? I can follow what wires you tapped into in the pictures, and im going to buy a multimeter for this project, but if i had a guide/diagram/another picture with wire colors that would be helpful with connecting to the OBD2 connector so i know which wires im plugging in. besides that it seems very straight forward to me. Thank you for the great work and information so far

ehilfer commented 5 months ago

I'll post wiring diagrams and color codes. Also, my apologies about my comment about that CAN bus splice connector. I misunderstood and thought it was an obd2 connector. That connector would definitely work great to catch the ev CAN as shown in their picture, but doesn't have access to the car CAN so what I ended up doing gets you access to both CANs in the same place.

damesmokesmids commented 5 months ago

I'll post wiring diagrams and color codes. Also, my apologies about my comment about that CAN bus splice connector. I misunderstood and thought it was an obd2 connector. That connector would definitely work great to catch the ev CAN as shown in their picture, but doesn't have access to the car CAN so what I ended up doing gets you access to both CANs in the same place.

@ehilfer if you can get those and post them here you should also consider compiling everything and making a post on the OVMS forums as thorough as you can. It's a huge step towards official support finally after these cars being out for over a half decade. Really appreciate the work everybody has contributed towards this despite the challenges there are.

WMTaylor2Degrees commented 4 months ago

I'll post wiring diagrams and color codes. Also, my apologies about my comment about that CAN bus splice connector. I misunderstood and thought it was an obd2 connector. That connector would definitely work great to catch the ev CAN as shown in their picture, but doesn't have access to the car CAN so what I ended up doing gets you access to both CANs in the same place.

That's fantastic work and very clean! Excited to see where this goes, you might have just cracked the code on getting OVMS working on the 2018+. I'd also be very grateful for any diagrams, photos etc you may be able to provide. In fact, I second @damesmokesmids comments about compiling everything into a post on the OVMS forums, you'd certainly help a lot of people! Thanks again for chiming in with your knowledge :)

UPDATE: Until we get some kind of documentation/guide put together, this video shows how to remove the glovebox (for purpose of changing the cabin filter) which exposes the wiring that @ehilfer has tapped into. video

Dave-Baldwin commented 4 months ago

Very excited to see this working for 2018+ ZE1s. I just bought a 2019 last month. @ehilfer I will 'third' the previous requests for additional documentation on how you did your install and wiring. I think I understand what was done but since this requires some lite hardware hacking it would be much more reassuring to have a comprehensive guide.

I will be purchasing my OVMS system from Medlock, does the specific purchase option matter?

pbutterworth commented 4 months ago

I'm jumping on the band wagon! Haven't purchased a OVMS module yet, but I am thinking about how I might wire in non-invasively. Looking at the wiring diagram, the 6CH CAN GATEWAY (M101) module appears to be on all the CAN busses, and (incidentally) is responsible for feeding out to the diagnostic CAN that is wired to the OBDII connector. I don't know how readily accessible this module is. My Leaf is right-hand-drive, so the wiring diagrams posted earlier need to be taken with a pinch of saltl. There's a pass-through cable on aliexpress for this type of connector: https://www.aliexpress.com/item/1005006117085027.html Might need to twist up some of the conductors, but the splicing could be done on this cable, offering a plug-and-play installation. M101 also has battery, ignition and ground as well.

Anyhow, I've bought a cable. Next step is to go hunting for the 6ch can gateway!

Dave-Baldwin commented 4 months ago

connectors available to buy

@honzakadlec can you please provide any link or part number to purchase? Maybe I found something on Aliexpress, but not sure if it's the right connector type or not. https://www.aliexpress.us/item/3256804310713563.html (M-F and 16P variant) or this one: https://www.aliexpress.us/item/3256806551839899.html I am hoping to plug into the EV CAN in the same location you did, and avoid splicing into OEM wiring.

honzakadlec commented 4 months ago

Hi @Dave-Baldvin

I bought it here

https://www.auto-click.co.uk/6098-5279?search=6098-5279 https://www.auto-click.co.uk/6098-5281?search=6098-5281

The duty tax was major part of the price :-( UK, we are missing you in EU

Jan

On Fri, 17 May 2024 at 08:38, Dave-Baldwin @.***> wrote:

connectors available to buy

@honzakadlec https://github.com/honzakadlec can you please provide any link or part number to purchase? Maybe I found something on Aliexpress, but not sure if it's the right connector type or not. https://www.aliexpress.us/item/3256804310713563.html (M-F and 16P variant)

— Reply to this email directly, view it on GitHub https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/issues/323#issuecomment-2116856298, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADDKIRJEAVJLJNBFEIFDYA3ZCWQXFAVCNFSM4KHXO7BKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMJRGY4DKNRSHE4A . You are receiving this because you were mentioned.Message ID: <openvehicles/Open-Vehicle-Monitoring-System-3/issues/323/2116856298@ github.com>