Commit graph

272 commits

Author SHA1 Message Date
rljonesau 10c33c3515 broke outgoing arrow flag in BTWebServer - fixed 2018-12-10 22:10:49 +11:00
rljonesau 2c136eb34c Ray fiddles to get temp slider to talk to heater, and show desired temp value. 2018-12-10 21:26:29 +11:00
James C (SkinnyBuddah) ff3fcc89f4 Update Arduino/BTCDieselHeater/mainpage.cpp 2018-12-09 23:25:54 +00:00
James C (SkinnyBuddah) e0a8f2ff9f Update Arduino/BTCDieselHeater/mainpage.cpp 2018-12-09 23:03:52 +00:00
James C (SkinnyBuddah) dfb04d97d8 Removed commented code 2018-12-09 22:55:13 +00:00
James C (SkinnyBuddah) 30a954f123 Update Arduino/BTCDieselHeater/mainpage.cpp 2018-12-09 22:53:39 +00:00
rljonesau f0d7d669ff fixed runstate JSON in javascript 2018-12-10 06:30:36 +11:00
rljonesau 43d35493c0 First play with ArduinoJson library and javascript JSON.parse() - too fucking easy! 2018-12-10 06:28:02 +11:00
James f4a52afd42 fixed parsing data into the webpage - need to get data coming out in the same format.
TRY THIS ONE RAY
2018-12-10 00:38:59 +11:00
rljonesau 1c9727b675 Merge branch 'JCWebPretty' of gitlab.com:mrjones.id.au/bluetoothheater into JCWebPretty
Conflicts resolved:
Arduino/BTCDieselHeater/mainpage.cpp
2018-12-09 20:19:51 +11:00
rljonesau 40305d6224 Fixed Console vs console, commented out new event code 2018-12-09 20:06:04 +11:00
James 374d299cf1 Fixed evt to Event ... FML 2018-12-09 17:24:18 +11:00
James e24caea95d fixed again 2018-12-09 17:21:04 +11:00
James 528b2b1fd3 missed } 2018-12-09 17:18:04 +11:00
James ba5bd51b14 Fixed small issue of not terminating init() function correctly 2018-12-09 17:15:27 +11:00
James 2bc415b2af Fixed on off toggle switch so it works 2018-12-09 17:09:50 +11:00
James 1d98716dd4 next 2018-12-09 15:41:44 +11:00
James b2db3dddad Hell yes its pretty.... doesn't do anything more than when Ray last updated the code - But I think i've nailed the design for now. 2018-12-09 15:07:18 +11:00
rljonesau f40f750c49 Extended range of actual temperature bar graph in screen 1 2018-12-09 14:00:40 +11:00
rljonesau 85ff28d347 Support for DS3231, DS1307, PCF8523 or millis() based RTCs - Use BTCConfig.h to select 2018-12-09 12:10:56 +11:00
rljonesau 55c33af996 added missing files! Dumbkoppf 2018-12-09 09:55:55 +11:00
rljonesau 90569c319c Encapsulated RTC and timer functionality inside CClock class. 2018-12-09 09:51:16 +11:00
rljonesau 2a7e3fce1b Added large clock screen 2018-12-08 23:25:53 +11:00
rljonesau 069633c61f Added isConnected() to ESP32 Bluetooth classes (enables polymorphism from CBluetoothAbstract)
key repeat added to time setting screen
2018-12-08 20:31:15 +11:00
rljonesau 0f397e93f8 Slowed DS3231 I2C accesses to 400kHz 2018-12-08 16:44:48 +11:00
rljonesau fbe39980ce Bug fixes: timer that spans midnight, stale info in timer setup screens 2018-12-08 15:18:37 +11:00
rljonesau ec1631b84b Now can define day timer operates on 2018-12-08 12:39:41 +11:00
rljonesau 283eff4288 Timers now start/stop as required, and self clear if non-repeating.
Adding notion of Day of Week timers.
2018-12-08 09:30:55 +11:00
rljonesau e51b2be8d1 dual timers, header icons for timers 2018-12-07 22:16:04 +11:00
Ray Jones 31f825ba5b vectorising CScreenManager Screens 2018-12-07 15:53:08 +11:00
Ray Jones 157bf4fa0f Adding Screen 7 for setting timer 2018-12-07 15:18:24 +11:00
rljonesau 00e68f3cc3 Removed SPI OLED support 2018-12-07 06:53:45 +11:00
rljonesau 3c8f0cff25 Added DS3231 support, and new screen to set the time/date 2018-12-07 06:47:36 +11:00
rljonesau e2a1a8cf6e keypad pins adjusted to suit final PCB pinout 2018-12-05 21:48:31 +11:00
rljonesau dafe2efecf Added missing arial and tahoma fonts 2018-12-02 17:31:26 +11:00
rljonesau 859419639d Bug fix in Dot factory bitmaps when > 255 bytes in array.
Added Access Point determination for OLED reporting of mode/IP address, now auto shows AP on icon
Fixed latency issue when switching thermo/fixed mode in Screen3
2018-12-02 17:30:40 +11:00
rljonesau bbede54cdc Final neat and tidy WiFi traffic animation code 2018-12-02 06:14:34 +11:00
rljonesau d947a4708c simultaneous wifi traffic animation 2018-12-02 05:51:53 +11:00
rljonesau e2b207625e Improved WiFi traffic animation 2018-12-02 05:25:10 +11:00
rljonesau 27d7c70068 Split CScreen base class out for fundamental screen functions
Added CScreenHeader for standard header items, then all other screens inherit from there.
Removed "get" helpers, now use getHeaterInfo() "CProtocolPackage"
2018-12-01 11:36:25 +11:00
rljonesau 891fa9f5c3 all menu items now use _drawMenuText, fully functioning with border when required 2018-12-01 00:33:49 +11:00
rljonesau a784943349 Immensely tidied Screen3's handling of fixed/thermo mode by adding _printInverted to CScreen 2018-11-30 07:09:46 +11:00
rljonesau abc8f63590 Added drawMenuText methods to considerably tidy up screen update code
Created an automatically resetting, transient font usage class.
2018-11-29 22:11:50 +11:00
rljonesau 0b4fe001fa Added _drawMenuText variants, tidied up Screen5 so far 2018-11-29 06:32:26 +11:00
rljonesau 388aef2c48 Screen5 completed - can set and save fuel settings OK.
Also enhanced pump setters/getters to use float.
Added selection box methods to CScreen
2018-11-28 22:15:23 +11:00
rljonesau fac5c8d1ae Further work on Screen5 - Fuel/Air settings menu 2018-11-28 06:40:01 +11:00
rljonesau 36a0755005 Have presentation of Fuel settings screen settled, need to allow adjustments 2018-11-27 21:44:47 +11:00
rljonesau 885573a4dc Rolled custom changes out of Adafruit_SH1106.cpp (other than 1 bug fix)
Splash screen now a bitmap drawn from display.cpp before initial _pDisplay->display()
Added BSDlicense.txt as we are including Adafruit library code in project
2018-11-27 06:25:51 +11:00
rljonesau 66c8407382 Gone crazy with license text headers 2018-11-26 22:58:15 +11:00
rljonesau ab539f0569 Merged remote-tracking branch 'remotes/origin/RLJ_WebSockets_I2C_OLED' 2018-11-26 21:45:28 +11:00
rljonesau 5bcddf1a24 Merged with code changes from RLJ_WebServer_I2C_OLED to obtain I2C OLED An javascript web server 2018-11-26 21:26:38 +11:00
rljonesau b5e57de2f2 Modified web server javascript to use bluetooth commands.
I2C OLED changes added
2018-11-26 20:05:05 +11:00
rljonesau b77bbb127e Revamped screens to now be based upon CScreen class, along with a CScreenManager class. 2018-11-25 15:45:17 +11:00
James 269da353de Merge branch 'NewPinout' of gitlab.com:mrjones.id.au/bluetoothheater into ESP32WebSockets
# Conflicts:
#	Arduino/BTCDieselHeater/.vscode/arduino.json
2018-11-25 13:39:30 +11:00
James f77c24e21b Merge branch 'ESP32WebSockets' of gitlab.com:mrjones.id.au/bluetoothheater into ESP32WebSockets 2018-11-25 13:29:10 +11:00
James 35217d9924 WebSocket Just Needs Background Code 2018-11-25 13:27:29 +11:00
James 603bb2eb14 Added WebScoket sessions
Have added a place holder for temp data
Slider now working
Off Off slide switch should work.

Not a full test code rollout
2018-11-25 13:26:47 +11:00
James 297757c4a7 Cleaned up code files 2018-11-25 13:26:46 +11:00
James 8a7d29d2f6 * Added 2 additional libraries
* Correct WifiManager Filename for auto unarchive
2018-11-25 13:24:58 +11:00
James 6320e08566 Removed unused Libraries. 2018-11-25 13:24:57 +11:00
James f7b1e745bf First Test 2018-11-25 13:24:57 +11:00
James 337043f0af WebSocket Just Needs Background Code 2018-11-25 11:20:15 +11:00
James e340ebb357 Added WebScoket sessions
Have added a place holder for temp data
Slider now working
Off Off slide switch should work.

Not a full test code rollout
2018-11-25 04:04:37 +11:00
rljonesau 346056f982 Now host 4 OLED screens, includes helper functions for fundamental inspection/operations 2018-11-24 22:03:47 +11:00
James 5b5a57d1c7 Cleaned up code files 2018-11-24 21:00:15 +11:00
James 99b8d12047 * Added 2 additional libraries
* Correct WifiManager Filename for auto unarchive
2018-11-24 20:58:15 +11:00
James aa736d69ef Removed unused Libraries. 2018-11-24 20:57:40 +11:00
rljonesau 03e7d6b89f Screen2 (simple display) pretty much done 2018-11-24 11:51:09 +11:00
rljonesau efe8afeff3 Added Screen2 - simple presentation with ability to toggle thermostat and change set point (keypad) 2018-11-23 21:34:37 +11:00
rljonesau fc23538ceb Introducing concept of multiple screens, with individual key handling via callbacks 2018-11-22 21:30:51 +11:00
rljonesau 9826399835 created CKeyPad class, added key event callback functionality 2018-11-22 06:40:31 +11:00
rljonesau 100aa4e493 removed test code from keypad handling 2018-11-22 05:46:02 +11:00
rljonesau 831f2ab516 Added 5 way keypad sensing 2018-11-21 20:53:12 +11:00
James bdde5e26b1 First Test 2018-11-21 10:50:59 +11:00
rljonesau 63800ec900 removed old pin definitions 2018-11-21 06:43:47 +11:00
rljonesau 4f9a077bd7 Added large and mini fonts, using derived class to print The Dot Factory style font definitions 2018-11-20 22:01:27 +11:00
rljonesau 4924eac137 New pin allocations, updated OLED presentation 2018-11-20 06:31:20 +11:00
rljonesau 50abc1b890 Initialise filtered temperature upon initial pass.
Added WiFi icon
2018-11-18 10:45:15 +11:00
rljonesau a36af395ea OLED working with small fonts, update @100ms
Now restart Serial1 if CRC errors or other issues with reception
2018-11-17 22:59:16 +11:00
rljonesau 9d79c107c5 Fine tuning OLED presentation, adding mini font 2018-11-17 13:08:22 +11:00
rljonesau 5158630996 Advancing with OLED display... 2018-11-14 22:12:18 +11:00
rljonesau 1cdb019401 Added SPI OLED (SH1106) on HSPI port and DS18B20 on pin 5.
*** NEED TO COMMENT OUT SPIClass SPI in ESP32 library!!!!!! ***
Added new state for temperature reading and OLED updates
2018-11-13 22:02:14 +11:00
rljonesau 7d187b3393 Added WiFi options to BTCConfig.h 2018-11-08 05:23:40 +11:00
rljonesau a7b6399c30 On/Off requests now repeat.
Using Minimal SPIFFS, can now fit internal Bluetooth code BUT internal Bluetooth and WiFi
bang radio heads - refusing to co-operate :-(
2018-11-07 21:31:00 +11:00
rljonesau dc8e1940f2 Merged remote-tracking branch 'remotes/origin/ESP32HTTP'
Conflict resolved in
	Arduino/BTCDieselHeater/BTCDieselHeater.ino
2018-11-07 19:56:47 +11:00
James b3de89595d Try again to upload BTCWebServer.cpp 2018-11-07 15:07:11 +11:00
rljonesau 2e9dfba3fc added getTemperature_Actual. Include guard in debugport.h. 2018-11-07 06:41:14 +11:00
James fc2182ee1d Add very simple webserver code -
http://ipaddress/on to poweron
http://ipaddress/off to power off
2018-11-07 04:18:12 +11:00
rljonesau 668870580e Added code to allow injection of test commands into unknown protocol values to see if some sort of
reaction could be found - none so far.
Added Blue LED flash on ESP32 when Rx'ing serial blue wire data.
Created a UtilClasses.h file for utility classes.
2018-11-06 20:43:54 +11:00
rljonesau d57f74482f RENAMED TO BTCDieselHeater.ino from SenderTrial2.ino - Using DebugPort in BTCWifi.cpp 2018-11-06 14:23:28 +11:00
rljonesau 4a841f530a Merged branch 'master' into ESP32OTA to acquire ClassyBluetooth changes
Resolved Conflict:
	Arduino/SenderTrial2/SenderTrial2.ino

Defined pin 23 for triggering wifiManager
2018-11-06 13:25:05 +11:00
James 129790badb *!!!!Removed Telnet - Not really required!!!
*Setup wifi connectivity as a blocking process.  As Wifi is required for OTA to function no point moving forward until this is done on startup.  This will mean either we connect to an Access Point or we become one.

*Added BTC OTA option
2018-11-04 16:19:22 +11:00
rljonesau c415a1a2c7 Now using a switch statement for state machine 2018-11-01 07:55:25 +11:00
rljonesau b128e51880 Converted to class based Bluetooth management. HC-05 tested on ESP32.
Cannot test the inbuilt ESP32 bluetooth - we blow the FLASH size!
2018-11-01 05:57:21 +11:00
rljonesau 756ebdd888 Initial cut at getting HC05 into classes for the ESP32 or Due environments
Runs on ESP32 OK.
2018-10-30 22:05:29 +11:00
rljonesau dea11622ba Merge branch 'ESP32WifiFINAL'
Resolved Conflicts in Arduino/SenderTrial2/SenderTrial2.ino
2018-10-30 20:27:56 +11:00
James b818b8541e Fixed all refs 2018-10-30 19:45:17 +11:00
James 010b0e71cf FINAL Commit of ESP32Wifi 2018-10-30 19:00:19 +11:00
James 269c6965b9 Had to create a new branch because of detached HEAD 2018-10-30 18:56:51 +11:00
James 80d1b43956 Working wifi - Telnet in testing - Ready for big MERGE 2018-10-30 18:23:22 +11:00
rljonesau baf1def165 Left out SmartError.cpp & SmartError.h :-( 2018-10-29 06:01:26 +11:00
James Clark 33bb526a54 Added nonblocking wifi manager - Also added STA mode on timeout of 20 seconds 2018-10-28 19:59:34 +11:00
rljonesau ca853a1ac5 Added a "carbon rod" to moderate enthusiastic OEM controllers to Bluetooth.
Updated Android app to better deal with blue wire comms situations, also added warning of limited
control when an OEM controller is in the mix, disabling the temperature and fixed/thermo modes.
2018-10-28 18:34:16 +11:00
rljonesau ea8af6db09 Added debug messages if state machine gets thrown back to idle due to no bluewire rx data
Added protocol document!
2018-10-28 15:05:23 +11:00
James 15a3b6d3ef Added RemoteDebug and a define to change debugging from serial to telnet depening on telnet define at top of .ino 2018-10-28 14:03:44 +11:00
James f3d6d8d6d2 Initial WifiManager addition. 2018-10-28 10:14:34 +11:00
rljonesau 151543b84c Smart error checking now performed in Arduino code.
App Inventor app re-configured to not check these itself any more.
The heater frames sent over blue tooth have the new error codes.
2018-10-28 08:21:35 +11:00
rljonesau a01bcea53d Massive tidy up of heater data state machine, SOO much nicer now :-) 2018-10-27 21:30:01 +11:00
rljonesau 2799ec3352 Tidied up HC-05 handling (on an ESP32 at least)
Now using SENSE line from HC-05 to detect a client is connected.
Runs with either sort of HC-05 module, provided the 5 pin regulator style is set to 9600 data mode.
Removed #ifdef BLUETOOTH from .ino file, Bluetooth functions report now anyway with/without client.
2018-10-27 20:03:10 +11:00
rljonesau 7be3424359 Switched to HC-05.
quick push for James
2018-10-27 17:35:17 +11:00
rljonesau a156062a94 Removed String vars - rumours of heap fragmentation causing long term issues
Report data frames within BT functions.
Improved command decode reporting
2018-10-20 22:28:32 +11:00
rljonesau 1325ae6038 Added NV Storage for ESP32
Changed "USB" to "DebugPort"
Tidy up of blue wire data frames and passing about by reference instead of just the data buffer.
Added AppInventor application
2018-10-20 18:11:23 +11:00
rljonesau 5d112d7e64 Added #ifdef BLUETOOTH to knobble Bluetooth functions if required 2018-10-18 21:09:18 +11:00
rljonesau 399ca22c5a Functionality works with ESP32 BLE or classic (not simultaneously)
Use #ifdef ESP32_USE_BLE_RLJ to toggle modes.

Also broken out bluetooth functions into a few files for better separation of code.
2018-10-18 20:49:14 +11:00
rljonesau baed4b3079 Beefed up Bluetooth handling to include tuning parameters.
Changed Tx headers to [OEM] and [BTC] for the OEM controller and this Bluetooth controller.
Added #ifdefs to accomodate Mega and ESP32.
Built and tested on ESP32, Serial1 talks to heater OK using standard pin numbering :-)
2018-10-15 18:14:12 +11:00
rljonesau 18571ae857 Added BT transmission of heater and controller frames.
Prefixed with [CTL], [HTR] or [SLF] to ID who sourced the data frame.
2018-10-13 10:12:38 +11:00
rljonesau 6ed419991c Serial2 now connects to HC-05 module and sets module to 115200 2018-09-25 20:56:32 +10:00
rljonesau d63988be64 Slight mod to allow simple sniffing mode by grounding pin 21 of the Due. 2018-09-24 20:56:37 +10:00
rljonesau 5c1f68369a CProtocol now, not CFrame 2018-09-23 19:15:49 +10:00
rljonesau 961c5b8b29 changed to protocol.h/.cpp 2018-09-23 18:59:19 +10:00
rljonesau 9818b33e47 Automatically detects if another controller exists on the blue wire.
If found, it parrots the settings, but allows on/off commands to be inserted by a user.
If no other controller detected, it falls back and delivers our settings each second.

Currently reports all packets to USB, but will move onto Bluetooth delivery of heater data soon.
2018-09-23 16:31:09 +10:00
rljonesau 99e1b9d6bc Initial attempt at injecting messages within a working system 2018-09-23 09:31:47 +10:00