rimai wrote:I heard Curt had something already developed and Dave was in the process of getting that implemented in his client.
Maybe they have more to say.
In the latest dev libraries (0.8.5.13 and .14), there is the ability to read/write the internal memory values via the web interface. Look at the ReefAngel_Wifi.cpp file and the function processHTTP() for how that is handled.
There are a few more little changes / tweaks I'm making to the response for reading memory values that I have not released yet. The changes are to wrap the value read in an XML tag to make it easier for Dave to process in his client app. There may also be a few other minor changes (like addition of attributes) to the xml tag being sent back from the controller but this isn't confirmed yet.
Here's how the memory reading / writing works. Reading and writing the memory values from the controller are handled via the same commands, but distinguished by the length of the commands.
For the values that are BYTE values (single storage block), the commands are:
- Read - /mbLOCATION
- Write - /mbLOCATION,VALUE
For the values that are INT values (two storage blocks), the commands are:
- Read - /miLOCATION
- Write - /miLOCATION,VALUE
So a sample web request to read the BYTE value from memory location 800:
Can't forget the space at the end of the request for it to work properly. So you can fire up the arduino serial monitor and issue that command and it will respond with the value.
A sample web request to write the BYTE value at memory location 800:
This will write 9 to the memory location. Again, you need the space at the end.
The memory locations are stored in the ReefAngel_Globals.h file. The memory locations are prefixed with Mem_ followed by a B_ or I_ depending on if it is a BYTE or INT storage space (respectively). The last part of the names are easily identified for what they contain. Here is an example of a few:
#define VarsStart 800
#define Mem_B_MHOnHour VarsStart (800)
#define Mem_B_MHOnMinute VarsStart+1 (801)
#define Mem_B_MHOffHour VarsStart+2 (802)
#define Mem_B_MHOffMinute VarsStart+3 (803)
#define Mem_I_WM1Timer VarsStart+8 (808)
So as you can see, the names are pretty straight forward. The values start at 800 and go up. It should be pretty simple to determine the locations.
These locations are not going to change, if anything more will be added on. I will say that some future development ideas I have will also require additional storage than what is listed here. So some stuff may move to different locations in the future, but I will definitely point that out whenever it happens.
Having a serial program that reads/writes this should be pretty straight forward for you to do.
This is most likely the information that you are seeking.
curt