Web console app?

I’ve written three programs to support the electric watthour meters our company makes that are sold to landlords so thy can charge their tenants for power.

  1. A console app that reads the meters using Modbus either through a USB/RS485 adapter or an Ethernet/RS485 adapter and stores the readings in an SQLite database. This app runs as a service. The app also allows third party apps to access it through TCP sockets.
  2. A desktop app that configures the system so the console app knows what to do. It also generates reports of power used and invoices for tenants.
  3. A web app that runs on the LAN and allows users to generate reports of power used.

Since a lot of our customers own apartment buildings that are managed from different sites, we are receiving requests to be able to access the meter data from the cloud. I have written PHP scripts in the past to do similar functions, but thought it might be easier and faster with Xojo. Until I go into it. I can’t use a web app because there would be no user interface. I’d like to use a TCPSocket or HTTPSocket but the docs say using a port below 1024 will cause an operating system error. It is important that the users not have to open ports in firewalls so I am planning to use port 80. Is port 80 an exception to the below 1024 problem?

I am open to any suggestions on how to handle the app that will run in the cloud and be accessible to both the service that reads the meters and the desktop app for billing and reports.

Thank you in advance.

You can do webapps without interface. HandleURL or HandleSpecialURL. As far as I remember there is a webinar about this topic available.

You certainly can. This would be called a web service and would use either the WebApplication.HandleURL or HandleSpecialURL events as Beatrix says.

There are links to lots of information on how to do web services with Xojo here:

https://documentation.xojo.com/topics/communication/internet/accessing_web_services.html

Thanks, Paul. Just watched your first webinar. Perfect!

Just another thing to look at and consider if wanting to service HTML requests:

https://aloe.zone/

There are forum discussions of Aloe too you may want to search out. Not necessarily recommending this over a web app – I have only used from desktop and console apps to provide HTML support to clients as a side feature of the app.

Just saying it may deserve a look as well.