Challenge: pycom reference app - gps lte logger
-
Hi all,
I would like to propose a challenge for the programmers at pycom to provide an example app for the following IoT GPS logger:
- The device is battery powered and has the longest possible battery life
- It has 2 modes: A: 10 minutes and B: 1 hour. In mode A the device sends its position to Pybytes and then sleeps 10 minutes. In mode B the time spent sleeping is 60 minutes
- Normal operating conditions are outside on a fair day. Note however that the device should be able to recover itself from beeing locked in a place with little or no radio reception (like a car) without user intervention.
- It uses LTE Nb IoT and should provide settings for the Vodafone SIM sold by pycom.
- The "Pro" version is capable of sleeping indefinetely (only sending it's battery voltage every 24h) and will wake up when movement is detected and then switch to mode A or B. After a given time withoutt movement it will fall asleep.
A combination of FiPy+Pytrack and a small Lipo is everything needed on the hardware side, however the software is not as trivial as it sounds. What looks like a simple 10 liner at first glance (open gps and get position, open pybytes and get connection, send data and sleep) gets more complicated if data should not be lost and power management is to be done right and this is essential for IoT.
I think such a "reference" implementation could help new starters with pycom devices to better understand the more difficult parts (power management of gps and lte modem) with a simple example. It also could show off what you can do with your pycom device (track your dog!). And last not least it could point at necessary improvements for the firmware, if something does not work correctly or power consumption is too high in order to be usable with a reasonable battery life. For example, I think the "Pro" model is not possible to implement with the current firmware, there seems to be a problem with Pytrack-2 devices not waking up upon accelerometer readings.
I have been trying to implement this as my first project but I can't seem to get stable LTE connections with pybytes. This might be due to errors in my code, a bad antenna or bad coverage in Spain. If we had such a reference implementation that works for others I could find problems on my side more easily.
Anyone at pycom (or here in the forum) going to give it a try? Such a well thought out hardware needs more real world examples that work reliably and are useable in an IoT setting (i.e. stable & low power)!
The price for submissions to this challenge is a beer during your next visit to Seville ;) Submissions of the "Pro" version will get "tapas" included!
-
Hi,
Thanks for the challenge! :) I like the requirements you set out and once I have some spare time, Ill take a look at working this out!