I have been struggling to get the ERPC interface working with my nut file and have uncovered a few issues that took a long time to resolve.
1. Large code size of the nut file may not allow space for ERPC to run. I have a large nut file built to run as a stand-alone thermal controller with LCD display, 2 one-wire thermocouples, 2 heater control SCR relays, buzzer, and an analog temp sensor. The issue was ERPC would not communicate with my html page until I pared down the size of the nut file to a bare-bones operation. Once this was done, the RPC communication would then work.
2. RPC passed parameters did not behave the same in stand-alone mode compared to RPC passed values. The problem was the values passed by RPC must be string text and the nut file did not automatically convert them to integer, float or boolean values. I had to force the conversion with param.tointeger; param.tofloat, and if (param == "false") newparam = false; else newparam = true; After this conversion, the controller operated the same as the stand-alone mode.
I would like to call the html page from the nut file to initiate data transfer to a html graph rather than poll the nut file from the html page. Can this be done? I cannot find an example of this being done.
I hope this will help others when they use html with nut files and the ERPC interface.
If I find any other issues and work-arounds, I will add to this topic.