|
Post by gb0101010101 on Mar 24, 2019 18:37:41 GMT -8
I noticed that, amongst other sensor readings, the REST response does not list 'hourly rainfall' and 'daily rainfall' which appear to be calculated.
Can anyone provide direction on how to safely add REST variables to FULL and INDIVIDUAL strings? Should I just implement it using my best guess and hope it gets accepted into code? Or are there any docs that I should follow to implement new variables?
|
|
|
Post by SDL on Mar 25, 2019 8:55:04 GMT -8
There aren't any docs that specifically show that. Adding something to FULL is pretty easy. Building of the fulldatastring variable is towards the bottom of the main code if I am remembering correctly.
BP
|
|
|
Post by gb0101010101 on Mar 26, 2019 9:35:19 GMT -8
Is there any length limit to the Full Rest string? Can I just tack on more readings without causing side effects? Why is there a static "0.00" in the REST string?
Thanks
|
|
|
Post by SDL on Mar 28, 2019 6:41:00 GMT -8
Yes, you can tack on more variables AT THE END without screwing up the various pieces of software using this. However, if we update the REST string, we will overwrite you changes.
If you tell me what position number is 0.00 I can tell you why. Some kind of historical reason of backward compatibility I would guess.
BP
|
|
|
Post by gb0101010101 on Mar 28, 2019 23:37:18 GMT -8
Here is the code for the 0.00 in main loop(). RestDataString += String(WXSolarPanelCurrent, 2) + ","; RestDataString += "0.00,"; RestDataString += String(WXLoadCurrent, 2) + ",";
|
|
|
Post by SDL on Mar 30, 2019 13:00:29 GMT -8
OK! Got it. We don't transmit the Load Voltage (it's basically always 5.1V) from the WXLink to save a few bytes we needed somewhere else. But we wanted to leave the placeholder to make everything symmetric.
BP
|
|
|
Post by gb0101010101 on Mar 30, 2019 15:19:22 GMT -8
OK, Thanks. I have added comments to code.
|
|