Influx Uploading

This commit is contained in:
2024-12-17 21:15:50 -05:00
parent b48eb7fa88
commit a5725edb36
8 changed files with 251 additions and 433 deletions

9
getDevices.js Normal file
View File

@@ -0,0 +1,9 @@
const axios = require('axios')
const fs = require('fs')
let config = JSON.parse(fs.readFileSync('config.json', 'utf8'))
axios.get(config.servers.deconz.url + '/api/' + config.servers.deconz.apiKey + '/sensors')
.then(response => {
// console.log(response.data)
fs.writeFileSync('devices.json', JSON.stringify(response.data, null, 2))
})