19 lines
561 B
Python
19 lines
561 B
Python
import time
|
|
|
|
from models import SensorData
|
|
|
|
|
|
cur_time = int(time.time())
|
|
device_mac = '9B-89-A9-ED-F2-FB'
|
|
device_name = 'My RaspberryPi 4B'
|
|
sensors = [
|
|
SensorData('owner', 'darkcat09'),
|
|
SensorData('lat', 56), # just random data
|
|
SensorData('lon', 49),
|
|
SensorData('alt', 400),
|
|
SensorData('t1', 12.42, cur_time), # let it be temp outdoors
|
|
SensorData('t2', 22.50, cur_time, 'Temp in living room'),
|
|
SensorData('t3', 60.11, None, 'Poor Raspberry CPU...'),
|
|
SensorData('p1', 752.33, None, 'Barometer'),
|
|
SensorData('p2', 751.42),
|
|
]
|