Commit Graph

32 Commits

Author SHA1 Message Date
Starbeamrainbowlabs 754f1591f7
If we can't reconnect after 2 attempts and a delay fo 2s, then restart
Thankfully, the ESP32 has an inbuilt function to reboot it :D
2022-07-13 02:01:31 +01:00
Starbeamrainbowlabs 491b87c0b3
Add reconnect if the connection dies
this time, by recalling mqtt.connect

apparently it didn't like recreating the objects very much
2022-07-04 16:47:10 +01:00
Starbeamrainbowlabs 752045d4b0
Revert "automatically attempt to reconnect to the MQTT if we fail to send a message"
This reverts commit bbb6d542f3.
2022-07-04 16:26:53 +01:00
Starbeamrainbowlabs d2eea40641
Revert "bugfix: variable name shadowing"
This reverts commit a6dc9699d2.
2022-07-04 16:26:45 +01:00
Starbeamrainbowlabs 0159236011
Cleanup old remains 2022-07-04 16:15:48 +01:00
Starbeamrainbowlabs a6dc9699d2
bugfix: variable name shadowing 2022-06-30 21:59:25 +01:00
Starbeamrainbowlabs bbb6d542f3
automatically attempt to reconnect to the MQTT if we fail to send a message 2022-06-30 21:44:25 +01:00
Starbeamrainbowlabs 856f2d27bb
Fix up project
it works! :D
2022-06-30 16:01:26 +01:00
Starbeamrainbowlabs 61bbae7d16
.ino → .cpp
Platform.IO doesn't like .ino files, apparently
2022-06-30 15:30:42 +01:00
Starbeamrainbowlabs d3566bd894
Import project into Platform.io 2022-06-30 15:27:42 +01:00
Starbeamrainbowlabs 63821b881d
Ignore more things 2022-06-30 15:21:26 +01:00
Starbeamrainbowlabs 098dd82394
autoplant: fix settings.h inclusion ordering 2022-02-03 18:51:09 +00:00
Starbeamrainbowlabs 3eb49a813e
Merge branch 'main' of git.starbeamrainbowlabs.com:sbrl/autoplant into main 2022-02-03 18:34:23 +00:00
Starbeamrainbowlabs 4042e0aa09
Add water level sensor grip 2022-02-03 18:34:19 +00:00
Starbeamrainbowlabs d4db3ddc34
autoplant: attempt to fix crash, but we're just going around in circles
We get this crash:

path/to/autoplant/autoplant/autoplant.ino: In function 'void connect_wifi()':
autoplant:85:5: error: 'esp_wifi_sta_wpa2_ent_set_identity' was not declared in this scope
     esp_wifi_sta_wpa2_ent_set_identity((uint8_t *)user, strlen(user));
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
autoplant:86:5: error: 'esp_wifi_sta_wpa2_ent_set_username' was not declared in this scope
     esp_wifi_sta_wpa2_ent_set_username((uint8_t *)user, strlen(user));
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
autoplant:87:5: error: 'esp_wifi_sta_wpa2_ent_set_password' was not declared in this scope
     esp_wifi_sta_wpa2_ent_set_password((uint8_t *)pass, strlen(pass));
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
autoplant:88:2: error: 'esp_wpa2_config_t' was not declared in this scope
  esp_wpa2_config_t config = WPA2_CONFIG_INIT_DEFAULT();
  ^~~~~~~~~~~~~~~~~
path/to/autoplant/autoplant/autoplant.ino:88:2: note: suggested alternative: 'esp_eth_config_t'
  esp_wpa2_config_t config = WPA2_CONFIG_INIT_DEFAULT();
  ^~~~~~~~~~~~~~~~~
  esp_eth_config_t
autoplant:89:32: error: 'config' was not declared in this scope
  esp_wifi_sta_wpa2_ent_enable(&config);
                                ^~~~~~
path/to/autoplant/autoplant/autoplant.ino:89:32: note: suggested alternative: 'confstr'
  esp_wifi_sta_wpa2_ent_enable(&config);
                                ^~~~~~
                                confstr
autoplant:89:2: error: 'esp_wifi_sta_wpa2_ent_enable' was not declared in this scope
  esp_wifi_sta_wpa2_ent_enable(&config);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
path/to/autoplant/autoplant/autoplant.ino:89:2: note: suggested alternative: 'gpio_pin_wakeup_enable'
  esp_wifi_sta_wpa2_ent_enable(&config);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
  gpio_pin_wakeup_enable
Multiple libraries were found for "WiFi.h"
 Used: /home/USERNAME/.arduino15/packages/esp32/hardware/esp32/2.0.2/libraries/WiFi
 Not used: /home/USERNAME/Downloads/arduino-1.8.16/libraries/WiFi
exit status 1
'esp_wifi_sta_wpa2_ent_set_identity' was not declared in this scope
2022-01-21 18:41:14 +00:00
Starbeamrainbowlabs c5fcf90119
autoplant: upgrade to esp32, but enterprise wifi isn't working right. 2022-01-18 18:51:56 +00:00
Starbeamrainbowlabs cfa67aea37
Change pin numbers for esp8266 → esp32 change, but whether they are actually correct of not is correctly unclear
as usual, it's all untested....
2022-01-10 14:37:51 +00:00
Starbeamrainbowlabs f6d158236e
Add optional notls support 2021-12-14 18:45:45 +00:00
Starbeamrainbowlabs 3d42f3270b
autoplant: implement enterprise wifi support 2021-12-14 15:53:49 +00:00
Starbeamrainbowlabs 68cd7ac8a8
fixup 2021-12-14 15:35:51 +00:00
Starbeamrainbowlabs add6d2fd1e
Update settings to add enterprise wifi support
....now we just need to update the firmware itself....
2021-12-14 15:31:50 +00:00
Starbeamrainbowlabs 965f302f24
Merge branch 'main' of git.starbeamrainbowlabs.com:sbrl/autoplant 2021-12-13 20:02:50 +00:00
Starbeamrainbowlabs 77cfce1866 Initial commit 2021-12-13 20:02:34 +00:00
Starbeamrainbowlabs 873e7d463b
Design initial grep for water level sensor 2021-12-07 22:34:11 +00:00
Starbeamrainbowlabs da26e47056
minify json a bit more 2021-12-04 02:59:02 +00:00
Starbeamrainbowlabs 2781b27961
add comment 2021-11-28 23:16:34 +00:00
Starbeamrainbowlabs e537f9b42f
Add BME280 support to log temperature, humidity, and air pressure 2021-11-28 21:23:39 +00:00
Starbeamrainbowlabs f2d37de5fb
Use a horrible hack to get it working 2021-11-28 14:19:46 +00:00
Starbeamrainbowlabs 25afba6819
Fix a bunch of bugs, but we aren't finished yet 2021-11-23 20:44:26 +00:00
Starbeamrainbowlabs 3897e8aeb4
autoplant: implement mqtt, but it's not tested yet.
We anticipate most of our trouble will probably be in getting tls to 
work.....
2021-11-20 18:52:55 +00:00
Starbeamrainbowlabs 4bae1e0fbb
Add .gitignore and example settings file 2021-11-20 15:30:13 +00:00
Starbeamrainbowlabs 9c7f050f11
It works...... we think.
"Simple problems require complex solutions" --Brothgar, on YouTube
2021-11-20 15:17:23 +00:00