BLL wrote: ↑Mon Jan 01, 2018 6:08 pmHi
I am looking for some advice. I have a RasPi model 3, running jessie. It is installed in my caravan (RV), where it acts as my internet router and also has a program I have written in lazarus/fpc (1.7/3.0.0), which monitors the health of my caravan systems.
I would like to communicate with this program remotely over the internet.
My first attempt was to implement a very simple webserver by using the weblaz package in lazarus. However, it won't install and pleas on the lazarus forum have not been answered, so it looks as though that way is dead.
The alternative, I suppose is to install a simple webserver on the RasPi. The requirements are trivial:
To webserver From webserver
Ac on Ac is on
Ac off Ac is off
Heating on Heating is on
Heating off Heating is off
Status Sends about 600 bytes of text
and that's it!
Could somebody advise me on the simplest solution please? I have never done anything with webservers before, so this is all new to me.
I hope to then produce an Android app to send/receive info to/from the RasPi.
Any help much appreciated.
Because installing Apache does not magically get the job done. And getting the job done from Apache is not nice.Why would you NOT just install Apache? It's a total no-brainer to install, and works perfectly.
websocketd is the WebSocket daemon
a small command-line tool that will wrap an existing command-line interface program, and allow it to be accessed via a WebSocket.
Turn any program that uses STDIN/STDOUT into a WebSocket server. Like inetd, but for WebSockets.
Forgot that one, it works fine too, very simple on Pi's just one binary file.you could look up websocketd
Have you looked at the Indy offerings? IIRC they include a web server. (Or you could do direct comms using sockets - might even be easier!)
I think that really comes down to what you know, if your experienced in Pascal and have everything else already running then tacking on a web server might be a lot simpler then learning a new language and re-implimenting everything in that new language.
Certainly "what you know" can save a lot of time and effort when it comes to getting things done than having to learn a whole new language and all it's infrastructure.I think that really comes down to what you know,...
Given what you want seems fairly simple, and you want to stick with Lazrus/Pascal, I would echo the suggestion of Gavinmc42 and take a look at Ultibo.
I thought Lazarus was just an IDE for Pascal and Delphi code. I suppose it does depend on which units and libraries you are using if you have already created the code.
I actually found it quite easy. It installed and just worked, gives an excellent, no tools set up, 'one-click' compilation process which turns Pascal source into a kernel.img which boots on the Pi, and rather quicker than Raspbian does.
Yet'mega MicroPython' - but, c'est la vie, that doesn't exist.
I have been thinking long and hard on the best approach for turning a Pi into a Micro:Bit or PyBoard equivalent. MicroPython makes a lot of sense on a constrained device; having any Python is worth the limitations it brings. It makes less sense on a non-constrained device like the Pi where one wants 'full Python' to take advantage of everything the Pi has to offer. IMO anything less isn't really worth it.
No, just the default fonts. Bigger fonts, TT fonts, along with graphics, are things I have yet to investigate.
Users browsing this forum: No registered users and 56 guests