2

I want to build a motion detector that performs a similar service to security services, which notify me upon intrusion and provide video feed. The other main requirement is that I can update the sotware remotely. (For example, I can flash over-the-air a Particle Photon, which is similar to Arduino.) I found this thread and this thread and still have questions on how to proceed.

I would like a board that can:

  • take code in C++ or Python
  • connect to a Passive Infrared motion sensor
  • connect to speakers for a high-pitched sound upon intrusion
  • use cellular connectivity if local area network is down
  • function for a long time on a power bank if power is down
  • be updated remotely, as I mentioned above
  • ideally, compress video to save on data usage for upload

I know that people have done this on a Raspberry Pi, but my main requirement is a board for which I can flash the firmware remotely (as far as I know, the Pi and any "normal" computer does not).

Has anyone built a similar system and could give some pointers?

1

You don't "flash" software to a pi in the same way you do a micro controller based device. You can easily update software OTA (over the air) to a Raspberry pi, just by copying the files to the device and restarting the application.

If you want to automate this sort of thing then using a service like balena.io will do it for you. You just need to package your application up into docker containers.

| improve this answer | |
  • Yes, I've been copying new application files over SSH. One concern is with security, e.g. patch the device with new updated packages. With the Particle Photon, a new version of the application is bundled with the latest firmware, and . With Balena on the Pi, it seems that I would be able to copy a docker container with my app and call it at boot, but I don't think I could flash the firmware, right? – miguelmorin Jan 7 at 9:53
  • 1
    Balena runs on top of a very thin layer, most of it runs as a hidden container next to your application containers, it gets updated automatically. You don't need to update the low level stuff in this model. It's a different mindset to embedded development. – hardillb Jan 7 at 10:06
  • 1
    And if you don't run Balena, then you just use the built in package management tools to update the base OS. e.g. apt-get upgrade (of course you should test all of this with local devices, before updating deployed devices) – hardillb Jan 7 at 10:36
  • I read the primer. It seems that with Balena I would still need to maintain the device with apt-get upgrade and the advantage of Balena is that my application is in a container and Balena automatically updates its own OS. Is that right? – miguelmorin Jan 7 at 22:47
  • 1
    No, you only need to update the content of your containers – hardillb Jan 7 at 22:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.