I need make automation code how I can send data from EasyIOT server to Thingspeak. This is examble how is possible send by browser "
api.thingspeak.com/update?api_key=
*** Write API key *** &field1=0"
Oftopic, however maybe useful for someone. I discovered very quick way to get data from DB.
For analyses of home heating costs, I needed to know average temperature in home from few sensors and temperature outside.
0. choose your time range. Convert dates to epoch time in miliseconds:
www.epochconverter.com/
1. In Linux command line run sqllite (maybe done from W10 DB Browser for SQLite)
sqliete3
2. attach DB from EasyIoT
attach "/home/pi/easyiot/EasyIoTDatabase.sqlite" as db1;
3. check tables
.tables
4. Pull the addressid of nodes you need, i.e.
select * from addresses where address="N4S0";
5. take average temperature from sensors inside in time frame i.e. from 1st February to 20th February
select avg(value) from raw_values where address in (3, 6, 4, 7, 5) and timestamp between 1610236800000 and 1613779200000;
enjoy your output.
6. Take average temperature from weather station sensors:
select avg(value) from raw_values where address=6 and timestamp between 1610236800000 and 1613779200000;
BTW
I am copy database to Windows or Desktop Linux instead of running it directly on Rpi to not overload SD Card (5th year the same card with EasyIoT)