|
Post by fleabeard on Dec 21, 2021 16:14:34 GMT -8
I see that rain60Minutes and rainCalendarDay are being calculated in RainFunctions.h. I'm trying to add those to either REST or MQTT but can't seem to figure it out (I'm technical but new to coding).
So far I've added the following lines to SDL_ESP8266_WeatherPlus.ino
float rainCalendarDay;
rest.variable("rainCalendarDay", &rainCalendarDay); rest.variable("rain60Minutes", &rain60Minutes);
RestDataString += String(rainCalendarDay, 2) + ","; RestDataString += String(rain60Minutes, 2) + ",";
I can't find where the MQTT string or REST endpoints are defined.
|
|
|
Post by SDL on Dec 21, 2021 16:49:54 GMT -8
it is in SDL_ESP8266_WeatherPlus.ino
// Function to be exposed
rest.function("arduino", jsonCmd); // For RasPiConnect - ArduinoConnect
// auxillary functions rest.function("led", ledControl); rest.function("setID", setWeatherPlusIDControl); rest.function("resetOurWeather", resetOurWeather);
rest.function("setWUSID", setWUSID); rest.function("setWUKEY", setWUKEY); rest.function("setBAKEY", setBAKEY);
rest.function("setAdminPassword", setAdminPassword); //rest.function("rebootOurWeather", rebootOurWeather); rest.function("setDateTime", setDateTime); rest.function("resetToDefaults", resetToDefaults);
rest.function("resetWiFiAccessPoint", resetWiFiAccessPoint); rest.function("updateOurWeather", updateOurWeather);
// external interfaces
rest.function("enableCWOP", enableCWOPControl); rest.function("enableTwitter", enableTwitterControl);
// weather functions
rest.function("WeatherSmall", weatherSmallControl); rest.function("WeatherMedium", weatherMediumControl); rest.function("WeatherLarge", weatherLargeControl); rest.function("WeatherDemo", weatherDemoControl);
rest.function("EnglishUnits", englishUnitControl);
rest.function("MetricUnits", metricUnitControl);
// PubNub
rest.function("EnablePubNub", enableDisableSDL2PubNub);
rest.function("SendPubNubState", sendStateSDL2PubNub);
|
|