Is there anything else that needs to be fixed or adjusted to get the solar information to come into Blynk? I feel like there is something missing still and reading thru all of the Support Forum, I cannot find a similar example of data failure.
Here is what Blynk is telling me. Still says SunAirPlus is not present. It is connected. I can see data on the OLED but it doesnt show up in Blynk where I need it.
Still says Am2315 is not connected. It is connected to the TX board and does report data to the RX and can be viewed on the OLED and Blynk.
I have read thru various manuals for SunAirPlus, WXlink, and OurWeather and cannot figure this out. So I went into the code and although I dont know the language I am wondering if I found something.



In SDL_Arduino_WeatherLink_LoRa_Tx you check if the SunAirPlus is present.
// test for SunAirPlus_Present
SunAirPlus_Present = false;
LoadVoltage = SunAirPlus.getBusVoltage_V(OUTPUT_CHANNEL);
Serial.print("SAP Load Voltage =");
Serial.println(LoadVoltage);
LoadVoltage = SunAirPlus.getBusVoltage_V(OUTPUT_CHANNEL);
LoadCurrent = SunAirPlus.getCurrent_mA(OUTPUT_CHANNEL);
BatteryVoltage = SunAirPlus.getBusVoltage_V(LIPO_BATTERY_CHANNEL);
BatteryCurrent = SunAirPlus.getCurrent_mA(LIPO_BATTERY_CHANNEL);
SolarPanelVoltage = SunAirPlus.getBusVoltage_V(SOLAR_CELL_CHANNEL);
SolarPanelCurrent = -SunAirPlus.getCurrent_mA(SOLAR_CELL_CHANNEL);
Serial.println("");
Serial.print(F("LIPO_Battery Load Voltage: ")); Serial.print(BatteryVoltage); Serial.println(F(" V"));
Serial.print(F("LIPO_Battery Current: ")); Serial.print(BatteryCurrent); Serial.println(F(" mA"));
Serial.println("");
Serial.print(F("Solar Panel Voltage: ")); Serial.print(SolarPanelVoltage); Serial.println(F(" V"));
Serial.print(F("Solar Panel Current: ")); Serial.print(SolarPanelCurrent); Serial.println(F(" mA"));
Serial.println("");
Serial.print(F("Load Voltage: ")); Serial.print(LoadVoltage); Serial.println(F(" V"));
Serial.print(F("Load Current: ")); Serial.print(LoadCurrent); Serial.println(F(" mA"));
Serial.println("");
if (LoadVoltage < 0.1)
{
SunAirPlus_Present = false;
Serial.println(F("SunAirPlus Not Present"));
}
else
{
SunAirPlus_Present = true;
Serial.println(F("SunAirPlus Present"));
}
It must determine it is present because it sends data to the OLED on the RX and OurWeather. I can see the battery voltage etc.
So it must be an issue with the BLYNK code in OurWeather. So I looked into that code and was able to track down each of the pieces of data and where they fit in the app on the screen. On the Solar Page, no data is being provided.
So I dug around in the OurWeather code and found this section in lines 285 to 388:
So I was wondering if OurWeather/Blynk isn't finding the SunAirPlus board??? Is there something I need to change to fix this to get data to flow to Blynk? I think that is the last step to fix in this whole package of gear. // Now solar Variables if present
delay(500); // push variables into next second - avoid flood
if (SunAirPlus_Present)
{
Blynk.virtualWrite(V56, String(returnPercentLeftInBattery(BatteryVoltage , 4.19)) );
Blynk.virtualWrite(V57, String(returnPercentLeftInBattery(BatteryVoltage , 4.19)) + "%" );
//
// Now do the graphs and results on the solar page
delay(1000); // push variables into next second - avoid flood
dtostrf(SolarPanelVoltage, 5, 2, floatString);
Blynk.virtualWrite(V80, atof(floatString));
Blynk.virtualWrite(V50, String(floatString) + "V");
dtostrf(SolarPanelCurrent, 5, 1, floatString);
Blynk.virtualWrite(V81, atof(floatString ));
Blynk.virtualWrite(V51, String(floatString ) + "mA");
dtostrf(BatteryVoltage, 5, 2, floatString);
Blynk.virtualWrite(V82, atof(floatString));
Blynk.virtualWrite(V52, String(floatString) + "V");
dtostrf(BatteryCurrent, 5, 1, floatString);
Blynk.virtualWrite(V83, atof(floatString) );
Blynk.virtualWrite(V53, String(floatString) + "mA");
dtostrf(LoadVoltage, 5, 2, floatString);
Blynk.virtualWrite(V84, atof(floatString));
Blynk.virtualWrite(V54, String(floatString) + "V");
dtostrf(LoadCurrent, 5, 1, floatString);
Blynk.virtualWrite(V85, atof(floatString) );
Blynk.virtualWrite(V55, String(floatString) + "mA");
// Power
dtostrf((BatteryVoltage * BatteryCurrent ) / 1000.0, 5, 2, floatString);
Blynk.virtualWrite(V60, String(floatString) + "W");
dtostrf((SolarPanelVoltage * SolarPanelCurrent) / 1000.0, 5, 2, floatString);
Blynk.virtualWrite(V61, String(floatString) + "W" );
dtostrf((LoadVoltage * LoadCurrent) / 1000.0, 5, 2, floatString);
Blynk.virtualWrite(V62, String(floatString) + "W");
}
#ifdef DEBUGBLYNK
Serial.println("myBTimerEvent - Data Sent to Blynk");
#endif
}
/*
BLYNK_WRITE(V8)
{
int pinValue = param.asInt(); // assigning incoming value from pin V6 to a variable
#ifdef DEBUGBLYNK
// process received value
Serial.print("V8 pinValue=");
Serial.println(pinValue);
if (pinValue == 0)
{
if (EnglishOrMetric == 1)
{
writeToBlynkStatusTerminal("Units set to English");
EnglishOrMetric = 0;
}
}
else
{
if (EnglishOrMetric == 0)
{
writeToBlynkStatusTerminal("Units set to Metric");
EnglishOrMetric = 1;
}
}
#endif
}
*/
/*
// This function will run every time Blynk connection is established
BLYNK_CONNECTED() {
// Request Blynk server to re-send latest values for all pins
//Blynk.syncAll();
// You can also update individual virtual pins like this:
Blynk.syncVirtual(V8);
}
*/
Then I dug a little deeper into the OurWeather githubsite.
github.com/switchdoclabs/OurWeatherWeatherPlus/blob/master/SDL_Arduino_INA3221.hYou had me change the address from 0x40 to 0x41 on the TX board.
Do I need to change the address in the OurWeather code in the line above as I did for the TX board and then re-upload to the OurWeather board in order to get Blynk to receive SunAirPlus data?