Skip to content

Instantly share code, notes, and snippets.

@NikolasK-source
NikolasK-source / senec_home_v2_1_li_data_request.sh
Last active February 16, 2024 11:44
Senec Home V2.1 1ph / Lithium json request
#!/bin/bash
#
# Copyright (C) 2022 Nikolas Koesling <nikolas@koesling.info>.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
# documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
@NikolasK-source
NikolasK-source / vz.md
Last active June 1, 2020 19:22 — forked from adlerweb/vz.md
Grafana MySQL query to visualize Volkszähler-Data

Using Channel-IDs (that's not UUID)

SELECT
  timestamp * 0.001 as time_sec, 
  data.value as value, 
  properties.value as metric
FROM data
  LEFT JOIN properties ON (properties.entity_id = data.channel_id)
  LEFT JOIN entities ON (entities.id = data.channel_id)