matth-x / MicroOcppSimulator

GNU General Public License v3.0
76 stars 26 forks source link

Connection Error When Using MicroOcppSimulator with SteVe via WebSocket #20

Open lwollinger opened 1 month ago

lwollinger commented 1 month ago

I'm trying to connect microOcpp with Steve and I had some problems to work. i didn't use the 'docker' to build the STEVE, it was the 'Configuration and Installation'

The Monitor

d51 3 mongoose.c:3440:mg_connect 1 -1 ws://127.0.0.1:8080/steve/websocket/CentralSystemService/chargeBoxId d57 3 mongoose.c:4323:mg_connect_resolv 1 0x36 -> 7f000001:8080 pend [MO] ERROR (FilesystemUtils.cpp:68): Error deserializing file /mo_store/ocpp-config.jsn: EmptyInput [MO] ERROR (ConfigurationContainerFlash.cpp:70): failed to load /mo_store/ocpp-config.jsn [MO] info (MicroOcpp.cpp:349): initialized MicroOcpp v1.1.0 e5a 1 mongoose.c:404:mg_error 1 0x36 socket error e5c 1 MicroOcppMongooseClient.cpp:462:w 0x36 socket error [MO] info (MicroOcppMongooseClient.cpp:492): connection ws://127.0.0.1:8080/steve/websocket/CentralSystemService/chargeBoxId -- error [MO] info (MicroOcppMongooseClient.cpp:492): connection ws://127.0.0.1:8080/steve/websocket/CentralSystemService/chargeBoxId -- closed e76 3 mongoose.c:3417:mg_close_conn 1 0x36 closed 3461 3 mongoose.c:3440:mg_connect 2 -1 ws://127.0.0.1:8080/steve/websocket/CentralSystemService/chargeBoxId 3467 3 mongoose.c:4323:mg_connect_resol 2 0x36 -> 7f000001:8080 pend 346b 1 mongoose.c:404:mg_error 2 0x36 socket error 346e 1 MicroOcppMongooseClient.cpp:462: 0x36 socket error

matth-x commented 1 month ago

Hi, can you can reach the SteVe server in general? E.g. by running something like wget http://127.0.0.1:8080

Also, SteVe rejects chargers until their chargeBoxId has been added over the management portal which could also explain the failure to connect.

lwollinger commented 1 month ago

I think i know the problem. I'm having a problem with my ESP32, on menuconfig i'm changing the wifi param, and the OCPP backend and the chargeboxID but when i see the connection at the monitor, there said that i'm trying to connect with a older config. see... Captura de tela de 2024-05-14 18-31-17 Captura de tela de 2024-05-14 18-32-00

lwollinger commented 1 month ago

Solved!!! The problem was that my ESP32 wasn't updating when I flashed it, it always took the old settings that I had set the first time I ran it. How to solve? reset the flash memory with 'idf.py erase_flash', and then build and flash normally