Nov 18, 2023
This article covers updating the Pani MQTT script running on the Ewon.
The script file is called “program.bas”. The file can be opened with a text editor, a date and version number can be found at the top of the file for identification.
It is recommended to contact Pani support before performing a script update.
Update Script
Use the Ewon GUI to update the script.
1.1 Login
- Access the Ewon GUI by entering the IP address of the Ewon in a web browser. There can be up to 3 different IP addresses; LAN, WAN, and VPN. Which one you should use depends on your application and how you will connect. The default LAN IP address is 10.0.0.53.
- Login to the GUI using your device’s credentials. The default username and password are both adm.
1.2 Backup
Before overwriting the script it is recommended to backup the old script.
- Navigate to the Basic IDE at Setup > BASIC IDE.
- In the script there will be a line near the top that looks like one of the following:
or
Take note of the value of this variable. It is required to enter it into the new script.
- Click File > Export and save the old script with a unique name so it does not overwrite the new script, also called program.bas.
1.3 Upload and Configure
- While still in the Basic IDE, click File > Import and upload the new script, called program.bas.
- Locate the line in the script that contains:
Add the value taken from the old script to the line:
NOTE: “pani_test_plant” is an example, you must use the Id provided to you from Pani. Please contact Pani support if you do not know this ID.
- Select Run > Autorun to have the script start running when the Ewon starts.
1.4 Set Clock
In order to function properly, the Ewon must be set to UTC time zone.
- Navigate to Setup > System > Main > General > Date & Time.
- Set Timezone to Etc/GMT (UTC).
- Select radio button Update clock via NTP.
- Click Update.