Ubuntu Services

Now that the CAN and SMS MQTT gateways are working on the proper Linux server I figured it would be better to run them as services instead of having to log in and run them both manually.

In the end it was pretty simple (yay for Google). Here is the script template I have used, modified for each app with proper description, paths and user/group settings.

I think it will run the app, if it does crash then only try to restart it after 60 seconds.

So far so good.

Next up is to start decoding the other CAN messages (calls and cancels) and something like a messaging/allocation app that can use the call/cancel messages and push message out to SMS.

Example Use Case

  • Door bell gets pressed
  • CAN app takes the CAN message and puts it into /messages/can/incoming
  • Allocation app takes that message and figures that a message should be sent as an SMS, then SMS message put into /messages/sms/outgoing
  • SMS app takes that message and sends the message

 

Leave a Reply