Now type the following command on your command line:
sudo python testWXLink.py
After a while you will see something like this and then your SolarMax is working! You will see protocol 10, as
this is a SolarMAX Lead Acid system. Otherwise you will see Protocol 8 (SolarMAX LiPo) or protocol 3, if
you have a WXLink system.
Good CRC Recived
('protocol_ID = ', 10)
('protocol_software_version = ', 3)
protocol 10 SolarMAX received
SMOTFloat=02d2a41
ITemperature from SolarMAX temperature: 10.6C
IHumidity from SolarMAX humidity: 77.3%
SolarMax batteryVoltage = 13.53
SolarMax batteryCurrent = -444.00
SolarMax loadVoltage = 5.16
SolarMax loadCurrent = 170.90
SolarMax solarPanelVoltage = 18.70
SolarMax solarPanelCurrent = 412.00
SolarMax auxA = 0.00
SolarMax Message ID 14675
Testing with a Raspberry Pi (without SkyWeather)
To test on a Raspberry Pi (without SkyWeather) you need to hook up the LoRa Radio to the serial port on the
Raspberry Pi. This can be done most easily by using a Pi2Grover and plugging the Grove cable into the Grove
Serial connector on the device. Otherwise, you will need to wire up the device to 3V, Ground and then connect
Rx (GPIO 14) and Tx (GPIO 15). Easier to use use a Pi2Grover (
https://shop.switchdoc.com/products/
pi2grover-raspberry-pi-to-grove-connector-interface-board
) IMHO.
Step 1) Download the SolarMAX python library:
git clone
https://github.com/switchdoclabs/SDL_Pi_SolarMAX
Step 2) run the program testWXLink.py
After a bit (30 seconds or so) you will see something like the following:
pi@switchdoclabs:~/SDL_Pi_SolarMAX $ sudo python testWXLink.py
block1= [171, 102, 103, 173, 84, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 204, 40, 165, 64,
0, 45, 42, 65, 64, 132, 154]
block2= [66, 177, 114, 88, 65, 1, 0, 222, 67, 102, 230, 42, 67, 105, 145, 149, 65, 0, 0, 206, 195,
0, 0, 0, 0, 83, 57, 0, 0, 128, 175]
-----------
block 1
ab6667ad5427000000000000000000000000000000cc28a540002d2a4140849a
block 2
42b17258410100de4366e62a43699195410000cec3000000005339000080af
-----------
Page
31
Version 1.4 December 2019