-
Notifications
You must be signed in to change notification settings - Fork 25
09 TESTING AND DEBUGGING
This system has a lot of debug capabilities. There is an infopage with a variables dump that can indicate where values are wrong.
We can use the console to start and monito somer of the key processes.
The zigbee signal quality value is displayed in the data page of your inverter. When the signal quality is bad, the communication may have errors. So we have to position the ESP-ECU as such that the range is short and there are as few obstacles as possible. You can also experiment with the direction of the antenna.
Via the console we can do various tests and watch the debug info on the screen. The console commands are always preceded with '10;'.
When we open the console, the output of a poll shows up in the screen. Some commands:
- 10;diag // show output in the console if diagNose == 1
- 10;init_n // start the zigbee coordinator.
- 10;poll=0 // poll inverter 0
- 10;poll=9 // poll all inverters
- 10;zbt=xxxx // send a zigbee command, e.g. 10;zbt=2101 sends a ping
Click help to see more commands.
The zigbee commands have the following format:
- byte 1 FE
- byte 2 length of the data
- byte 3 and 4 the command
- byte 5 ---> the data
- last byte(s) checksum
When we issue a command via console it only contains the command and the data e.g. 10;zbt=2710AABBCC. The 'FE', length and checksum are added by the software. Examen 'sendCmd' in the output.
At boot this value = true. And for most of the console commands it is set to true. It means that all debuginfo is shown in the console. You can follow the bootup process from the moment the wifi is set. If you issue 10;diag the value is toggled. The answer = 'set diagNose to 0/1'. You should set this to 0 when you leave the console but if you forgot, it is set to 0 at a successfull healthcheck.
If you want to be sure that the serial port on your ESP board is working, you can connect Rx and Tx with a dupont wire. Now type 10;zbt=12AB24. Your message (converted to a zigbee message) will be echo-ed back.
To test if the zigbee module is correctly wired, we can issue a zigbee command like '10;zbt=2710AABBCC'. The console shows:
- going to send a teststring, len=17
- sendCmd = FE032710AABBCCE9
- answer FE036710AABBCCA9
In this case the data sent (AABBCC) was returned, so the serial communication is correct.
When there is no text after 'answer', there is no answer.
We can poll manually to see the issued command and the extracted inverter data. If we want to poll inverter 0 we issue 10;poll=0.
We can open multiple pages on the ESP_ECU webinterface. For instance if we open the console in one page and start the pairing process in another page, we can see what is happening in the console.
get started || hardware || inverters || testing /debugging || zigbee module