Commit Graph

20 Commits

Author SHA1 Message Date
78241d8e5a Add topic as method parameter 2020-11-22 12:42:30 +01:00
8e95443548 Enable '-1' for zone and group in topic regExp 2020-11-22 12:29:53 +01:00
dc5d066698 Read project name from database 2020-09-20 17:53:48 +02:00
e02af3c353 Store timestamp in database 2020-09-20 17:53:23 +02:00
5045802242 Fix: SQL Query scan device 2020-09-20 17:44:47 +02:00
6f319cf6dd Fix build/strip for arm 2020-09-14 10:27:56 +02:00
f21e4ff1d6 Expand database and device 2020-09-13 18:37:22 +02:00
3f0fa81f18 Update build for cross-compiling using CGO 2020-09-13 17:57:50 +02:00
91b94bd230 Resolve compiler warning 2020-09-13 17:57:23 +02:00
4a66fc4566 Use flag '-v' 2020-09-05 07:49:43 +02:00
12098aec70 Fix build script 2020-09-05 07:49:21 +02:00
4cf22e75c4 Update build script to use command line options 2020-09-04 12:44:54 +02:00
b9539d6db9 Integrate version numbering with govvv
See: https://oddcode.daveamit.com/2018/08/17/embed-versioning-information-in-golang-binary/
2020-09-02 18:06:06 +02:00
f2066c7de6 Add build script for linux/amd64 and linux/arm 2020-09-02 10:54:03 +02:00
ac3bb1ebe9 Write data in database table 2020-09-02 09:05:00 +02:00
8f7a285289 Extract data from mqtt json payload 2020-08-31 07:01:40 +02:00
985b4e8fde Prepare for storing device data in database
- create device id from mqtt topic
- implement method for storing device in database

Still todo:
- extract other data (e.g. MAC, SN) from monitoring object
- find a way in mqtt to use global env
2020-08-30 21:42:01 +02:00
231c17d7c3 Update MQTT message handling
- use separate handler
- use regexpression for topic check
2020-08-30 21:08:50 +02:00
daa79b27ca Extend this program:
- add a database for devices
- read devices from database and present this data on a simple web/REST
interface

The code or model is from a blog entry from Alex Edward:
https://www.alexedwards.net/blog/organising-database-access
2020-08-30 07:16:50 +02:00
cf4274c1e1 Initial commit 2020-08-26 09:54:26 +02:00