Compare commits

..

6 commits

Author SHA1 Message Date
Sebastian Wendel f5a448eedd cleanup of documentation and image data 2023-09-16 17:50:56 +02:00
simonox b77dfdfcef Fixed a link 2023-09-16 17:15:37 +02:00
simonox 2956cb7cca better markdown 2023-09-16 17:12:55 +02:00
simonox cb86888b6c Added link to a more powered shelly device 2023-09-16 17:12:13 +02:00
simonox 666a1e6198 hardware/BOM.md aktualisiert 2023-09-16 17:10:21 +02:00
Sebastian Wendel cfee634dbc split up components in to separate repositories 2023-09-16 17:05:44 +02:00
4693 changed files with 212 additions and 614618 deletions

View file

@ -1,7 +0,0 @@
.direnv
.github
.vscode
docs
hardware
nix
software

View file

@ -8,18 +8,13 @@ Copyright: (C) 2023 Curious Community Labs e. V.
License: CERN-OHL-S-2.0 License: CERN-OHL-S-2.0
Files: Files:
.github
.vscode .vscode
.dockerignore
.editorconfig .editorconfig
.envrc .envrc
.gitignore .gitignore
flake.* flake.*
nix/* nix/*
Dockerfile
pyproject.toml
okh.toml okh.toml
mkdocs.yml
software/* software/*
Copyright: (C) 2023 Curious Community Labs e. V. Copyright: (C) 2023 Curious Community Labs e. V.
License: GPL-3.0-or-later License: GPL-3.0-or-later

View file

@ -1,53 +1,56 @@
# IoT Platform # Smart Energy Monitoring
## Docker Smart Energy Monitoring is an open-source hardware project designed to empower individuals to monitor their energy consumption easily and efficiently. With the versatility of two different integrations - a DIY kit and a finished product - users can make informed decisions to manage and reduce their energy footprint.
First install DockerDesktop and `docker-compose`: The project seamlessly integrates with the [IoT Prototyping Backend](https://code.curious.bio/curious.bio/iot-backend/) and serves as an exemplary application for the comprehensive integration of sensor systems, through the manipulation of data streams and visualization on a dashboard.
- https://www.docker.com/products/docker-desktop/ ## Features
- https://docs.docker.com/compose/install/
Then you can export a path to mount as a volume and spin up the containers: - Real-time energy monitoring
- Historical data logging
- MQTT Support
- Open-Source firmware
```sh ## Integrations
export DATA_DIR = /some/path/to/mount
docker-compose --file software/container/docker-compose.yml up
```
### Mosquitto ### DIY Kit
```sh The DIY Kit includes an [ESP microcontroller](https://www.espressif.com/en/products/socs) and comes with appropriate measurement terminals. The firmware is open-source, based on the [Arduino framework](https://www.arduino.cc/reference/), allowing enthusiasts to extend or customize features according to their needs.
mosquitto_sub -h localhost -t '#' -p 1883
mosquitto_pub -h localhost -p 1883 -t '/' -m $(date --utc +%s)
```
There is also a *very* usefuly tool to debug MQTT: [MQTT Explorer](https://github.com/thomasnordquist/MQTT-Explorer/), that is also available at [mqtt-explorer.com](https://mqtt-explorer.com/). #### Hardware Requirements
### Node-RED - [Bill of Material](./hardware/BOM.md)
- Soldering iron
NodeRed is running here: http://localhost:1880/ ### Shelly Plus Plug S
A simple introduction to Node-RED can be found - along with the nodes / the code - in [this repository, please have a look](./software/flow/README.md)! For users looking for a ready-made solution, we support the [Shelly Plus Plug S](https://kb.shelly.cloud/knowledge-base/shelly-plus-plug-s) / [Shelly Plug](https://kb.shelly.cloud/knowledge-base/shelly-plug) or any other ESP based Power Plug with measurement functions. We use the device with the open-source firmware [Tasmota](https://tasmota.github.io/), making integration into your existing smart home systems a breeze. The following page gives an overview of the [devices supported by Tasmota](https://templates.blakadder.com/plug.html).
### InfluxDB ## Safety Note
InfluxDb is running here: http://localhost:8086/ > ⚠️ Handling High Voltage
> Working with electrical systems can be dangerous if not handled carefully.
### Grafana Always make sure to:
You can login to Grafana: http://localhost:3000/login (admin:admin) - Turn off the power supply before making any electrical connections.
- Use insulated tools.
- Work in a dry environment.
- If you are not confident or experienced in working with electricity, please contact a professional to assist you.
Have a look at the [HowTo in this repository](./software/dashboard/README.md). ## Installation
- [DIY Kit Installation](./docs/energy-monitor/README.md)
- [Shelly Plus Plug S](./docs/shelly-monitor/README.md)
## Hardware ## Contribution
We are using HelTec Automation Wirelsess Sticks ESP32 Dev-Boards. Feel free to open an issue for bugs, feature requests, or questions. Contributions are welcome.
See the [documentation in this repository](./hardware/README.md). ## License
## Hardware sensors This project follows the [REUSE Specification](https://reuse.software/spec/) and is licensed under the following:
* [Energy Monitor](./software/firmware/energy-monitor/README.md) - [Documentation: Creative Commons Attribution-ShareAlike 4.0 Licence](./LICENSES/CC-BY-SA-4.0.txt)
* [Plant Monitor](./software/firmware/plant-monitor/README.md) - [Hardware: CERN Open Hardware strongly reciprocal Licence](./LICENSES/CERN-OHL-S-2.0.txt)
* [Shelly Example](./software/firmware/shelly-monitor/README.md) - [Software: The GNU General Public License v3.0 Licence](./LICENSES/GPL-3.0-or-later.txt)

BIN
docs/.DS_Store vendored

Binary file not shown.

View file

@ -1 +0,0 @@
# Changelog

View file

@ -1 +0,0 @@
# IoT platform for analyzing resource consumption and machine status

View file

@ -1,6 +1,6 @@
# Energy Monitor # Energy Monitor
Our energy monitor is based on the openenergymonitor.org project (Licence GNU GPL V3). Our energy monitor is based on the [openenergymonitor.org](https://openenergymonitor.org/) project (Licence GNU GPL V3).
It uses our HelTec Wireless Stick. This - of course - can be replaced by a cheaper ESP32 module. It uses our HelTec Wireless Stick. This - of course - can be replaced by a cheaper ESP32 module.
@ -10,51 +10,50 @@ Power Measurement is done by a SCT013 clamp (100A:50mA).
### Used materials ### Used materials
* ESP32 module (e.g. Heltec Wireless Stick) - [Bill of Material](../../hardware/BOM.md)
* 3 x SCT-013-100 (100 A), see: http://openenergymonitor.org/emon/node/156
* 6 x 10 kOhm Resistors 1/4 W
* 1 x 22 Ohm Resistor 1/4 W (TODO: I am using a 47 Ohm Resistor to be replaced)
* 3 x 10 uF Elko 10 V
* 3 x 3,5 mm audio jack connector
### PinOut ### PinOut
![PinOut](https://resource.heltec.cn/download/Wireless_Stick_V3/HTIT-WS_V3.png "PinOut") We are using HelTec Automation Wirelsess Sticks ESP32 Dev-Boards.
The PinOut of our version 3 modules can be found here: https://docs.heltec.org/en/node/esp32/dev-board/hardware_update_log.html#wifi-lora-32-hardware-update-logs
![PinOut](../images/HTIT-WS_V3.png "PinOut")
We use A1, A2 and A3 because they are free (most ADCs are already used on the HelTec Board) We use A1, A2 and A3 because they are free (most ADCs are already used on the HelTec Board)
### Sensors ### Sensors
The SCT-013 sensors are small current transformers (SCT). They have a ferromagnetic core that can be opened and in which we can enclose our conductor. This conductor is the primary winding and the secondary winding is fixed in the sensor and can have 2000 turns. This gives us a ratio of 1:2000 as an example. The SCT-013 sensors are small current transformers (SCT). They have a ferromagnetic core that can be opened and in which we can enclose our conductor. This conductor is the primary winding and the secondary winding is fixed in the sensor and can have 2000 turns. This gives us a ratio of 1:2000 as an example.
When AC current flows through the conductor, a magnetic flux is generated in the ferromagnetic core, which in turn generates an electric current in the secondary winding. When AC current flows through the conductor, a magnetic flux is generated in the ferromagnetic core, which in turn generates an electric current in the secondary winding.
I could not meassure "small" power consumptions (like a LED lamp or a light stripe, as the magnetix flux in the ferromagnet core seems to be too small). I could not meassure "small" power consumptions (like a LED lamp or a light stripe, as the magnetix flux in the ferromagnet core seems to be too small).
![clamp on wire](./docs/images/clamp1.jpeg "clamp on a wire") ![clamp on wire](../images/clamp1.jpeg "clamp on a wire")
I was able to measure high loads (like a heater the can be switched between 1 kW and 2 kW). I was able to measure high loads (like a heater the can be switched between 1 kW and 2 kW).
![heater](./docs/images/example-heater.png "serial out of a heater") ![heater](../images/example-heater.png "serial out of a heater")
Make sure the clamp is *always positioned towards the consumer*, otherwise it does *not* work. There is a small arrow on the case. Make sure the clamp is _always positioned towards the consumer_, otherwise it does _not_ work. There is a small arrow on the case.
![point the clamp](./docs/images/clamp2.jpeg "point the clamp") ![point the clamp](../images/clamp2.jpeg "point the clamp")
> Attention: I could not measure any meaningful values on the "cable". I had to go to the wire. > Attention: I could not measure any meaningful values on the "cable". I had to go to the wire.
![cable](./docs/images/clamp3.jpeg "use the clamp on the wire, not on the cable") ![cable](../images/clamp3.jpeg "use the clamp on the wire, not on the cable")
### Breadboard ### Breadboard
Let's start with a simple breadboard layout. Let's start with a simple breadboard layout.
![Breadboard](./docs/images/breadboard.png "breakboard layout") ![Breadboard](../images/breadboard.png "breakboard layout")
![Photo of breadboard](./docs/images/photo-breadboard.jpeg "photo of breadboard") ![Photo of breadboard](../images/photo-breadboard.jpeg "photo of breadboard")
To understand this, have a look at this plan: To understand this, have a look at this plan:
![Plan](./docs/images/plan.png "plan") ![Plan](../images/plan.png "plan")
R1 & R2 are a voltage divider that provides the 1.65 V source. We use 10 kΩ for mains powered monitors. If we want to run on batteries, we have to choose differnt ones (like 470 kΩ resistors to keep the power consumption to a minimum). R1 & R2 are a voltage divider that provides the 1.65 V source. We use 10 kΩ for mains powered monitors. If we want to run on batteries, we have to choose differnt ones (like 470 kΩ resistors to keep the power consumption to a minimum).
@ -62,15 +61,31 @@ Capacitor C1 has a low reactance - a few hundred ohms - and provides a path for
R3 is the burden resistor. Ideal burden would be 19 Ω. As this is not a common value, you could choose 18 Ω or 22 Ω (I am still using a 47 Ω restistor, that has to be replaced). R3 is the burden resistor. Ideal burden would be 19 Ω. As this is not a common value, you could choose 18 Ω or 22 Ω (I am still using a 47 Ω restistor, that has to be replaced).
See the Fritzing file for [details](./energy-monitor/energy-monitor.fzz). See the Fritzing file for [details](./energy-monitor.fzz).
## USB-C
Our HelTec Automation Wirelsess Sticks ESP32 Dev-Boards already have USB-C. But they do not support Power Deliver (PD). If your computer tries to do PD, just plug a cheap USB hub between the board and your computer.
## Code ## Code
### Arduino IDE
HelTecs GitHub repo can be found here: https://github.com/HelTecAutomation/Heltec_ESP32
I had to install VCP Drivers, first: https://www.silabs.com/developers/usb-to-uart-bridge-vcp-drivers?tab=downloads
You can add their Board Manager to the boards managers URLs: https://github.com/HelTecAutomation/Heltec_ESP32/blob/master/library.json and find their libraries in the IDE (Sketch -> Include Library -> Manage Libraries... Search for "heltec esp32").
> These boards are already _V3_ boards, so be careful selecting the right board and port (VCP).
![Arduino IDE](../images/flash-with-arduino.png "select the right board and port")
### Print to serial out ### Print to serial out
Start with a simple code that just prints the values. The code is quite simple, as we can use the existing *[EmonLib libary V1.1.0 by OpenEnergyMonitor](https://docs.openenergymonitor.org/electricity-monitoring/ct-sensors/)*. Start with a simple code that just prints the values. The code is quite simple, as we can use the existing _[EmonLib libary V1.1.0 by OpenEnergyMonitor](https://docs.openenergymonitor.org/electricity-monitoring/ct-sensors/)_.
[Check out the small amount of code to print the values to serial out.](./01-energy-monitor-serial-out/) This piece of code is based on on Thomas Edlinger's code for [Edi's Tech Lab](https://www.edistechlab.com). [Check out the small amount of code to print the values to serial out.](../../software/energy-monitor/01-energy-monitor-serial-out/) This piece of code is based on on Thomas Edlinger's code for [Edi's Tech Lab](https://www.edistechlab.com).
The only interesting part is this line: The only interesting part is this line:
@ -82,7 +97,7 @@ The [calibration](https://docs.openenergymonitor.org/electricity-monitoring/ctac
The code just prints the current power consumption to serial out: The code just prints the current power consumption to serial out:
``` ```txt
16:28:18.915 -> 2853.16 Watt - 12.41 Ampere 16:28:18.915 -> 2853.16 Watt - 12.41 Ampere
16:28:19.998 -> 2854.63 Watt - 12.41 Ampere 16:28:19.998 -> 2854.63 Watt - 12.41 Ampere
16:28:21.119 -> 2850.93 Watt - 12.40 Ampere 16:28:21.119 -> 2850.93 Watt - 12.40 Ampere
@ -90,19 +105,16 @@ The code just prints the current power consumption to serial out:
16:28:23.289 -> 400.62 Watt - 1.74 Ampere 16:28:23.289 -> 400.62 Watt - 1.74 Ampere
16:28:24.367 -> 94.42 Watt - 0.41 Ampere 16:28:24.367 -> 94.42 Watt - 0.41 Ampere
``` ```
### Post to MQTT ### Post to MQTT
#### Boot up MQTT #### Boot up MQTT
First, boot your local server infrastructure: Now follow this documentation to set up [IoT Prototyping Backend](https://code.curious.bio/curious.bio/iot-backend).
```sh
docker-compose --file software/container/docker-compose.yml up
```
#### Credentials #### Credentials
To connect to your Wifi and access your MQTT server you have to add this to an `environment` [header file](./02-energy-monitor-mqtt/environment.h): To connect to your Wifi and access your MQTT server you have to add this to an `environment` [header file](../../software/energy-monitor/02-energy-monitor-mqtt/environment.h):
```C ```C
// Replace with your network credentials // Replace with your network credentials
@ -117,6 +129,10 @@ The `mqtt_server` in tis example posts to my local IP adress. The Wifi network i
The `mqtt_prefix` should be different per device, as this is the topic prefix used to identify the device. The `mqtt_prefix` should be different per device, as this is the topic prefix used to identify the device.
We now can consume this messages in Node-RED, store them in InfluxDB and build a dashboard in Grafana.
If you haven't deployed the [IoT prototyping backend yet, check out our guide](https://code.curious.bio/curious.bio/iot-backend/).
### Testing ### Testing
You can subscribe to your local MQTT server and subscribe to all or just the interesting topics: You can subscribe to your local MQTT server and subscribe to all or just the interesting topics:
@ -136,16 +152,16 @@ Posting to MQTT is quite simple. After setting up Wifi and connection to the MQT
client.publish(concat(mqttPrefix, "/ampere"), irmsArray); client.publish(concat(mqttPrefix, "/ampere"), irmsArray);
``` ```
Have a look at the complete [example](./02-energy-monitor-mqtt/). Have a look at the complete [example](../../software/energy-monitor/02-energy-monitor-mqtt/).
## Simulator ## Simulator
If you just need random inputs (without using the actual hardware), you can simply modify my short [shell script](./00-simulator/). If you just need random inputs (without using the actual hardware), you can simply modify my short [shell script](../../software/energy-monitor/00-simulator/).
## Links ## Links
* A very comprehensive project to build an energy monitor can be found in the [ESP32 + ESPHome Open Source Energy Monitor project by Daniel BP](https://github.com/danpeig/ESP32EnergyMonitor). - A very comprehensive project to build an energy monitor can be found in the [ESP32 + ESPHome Open Source Energy Monitor project by Daniel BP](https://github.com/danpeig/ESP32EnergyMonitor).
* A nice (German) [video tutorial can be found at Eddie's Techlab](https://edistechlab.com/sct013-sensor-zum-wechselstrom-messen/). - A nice (German) [video tutorial can be found at Eddie's Techlab](https://edistechlab.com/sct013-sensor-zum-wechselstrom-messen/).
* Have a look at the [complete documentation of the Open Energy Monitor project](https://docs.openenergymonitor.org/). - Have a look at the [complete documentation of the Open Energy Monitor project](https://docs.openenergymonitor.org/).
* There is also a German [example project](http://www.technik-fan.de/index.php/Open_Energy_Monitor_mit_dem_ESP32) (that currently cannot be reached over TLS, so be careful before clicking this link). - There is also a German [example project](http://www.technik-fan.de/index.php/Open_Energy_Monitor_mit_dem_ESP32) (that currently cannot be reached over TLS, so be careful before clicking this link).
* MQTT and ESP32 is described in this article ["How to Connect ESP32 to MQTT Broker"](https://iotdesignpro.com/projects/how-to-connect-esp32-mqtt-broker). - MQTT and ESP32 is described in this article ["How to Connect ESP32 to MQTT Broker"](https://iotdesignpro.com/projects/how-to-connect-esp32-mqtt-broker).

View file

BIN
docs/images/HTIT-WS_V3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 MiB

View file

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 68 KiB

View file

Before

Width:  |  Height:  |  Size: 232 KiB

After

Width:  |  Height:  |  Size: 232 KiB

View file

Before

Width:  |  Height:  |  Size: 280 KiB

After

Width:  |  Height:  |  Size: 280 KiB

View file

Before

Width:  |  Height:  |  Size: 212 KiB

After

Width:  |  Height:  |  Size: 212 KiB

View file

Before

Width:  |  Height:  |  Size: 159 KiB

After

Width:  |  Height:  |  Size: 159 KiB

View file

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 41 KiB

View file

Before

Width:  |  Height:  |  Size: 526 KiB

After

Width:  |  Height:  |  Size: 526 KiB

View file

Before

Width:  |  Height:  |  Size: 151 KiB

After

Width:  |  Height:  |  Size: 151 KiB

View file

Before

Width:  |  Height:  |  Size: 158 KiB

After

Width:  |  Height:  |  Size: 158 KiB

View file

Before

Width:  |  Height:  |  Size: 556 KiB

After

Width:  |  Height:  |  Size: 556 KiB

View file

Before

Width:  |  Height:  |  Size: 64 KiB

After

Width:  |  Height:  |  Size: 64 KiB

View file

Before

Width:  |  Height:  |  Size: 358 KiB

After

Width:  |  Height:  |  Size: 358 KiB

View file

Before

Width:  |  Height:  |  Size: 148 KiB

After

Width:  |  Height:  |  Size: 148 KiB

View file

Before

Width:  |  Height:  |  Size: 122 KiB

After

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

View file

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 58 KiB

View file

Before

Width:  |  Height:  |  Size: 168 KiB

After

Width:  |  Height:  |  Size: 168 KiB

View file

@ -0,0 +1,81 @@
# Shelly Plug (S)
Shelly Plugs S are quite cheap but relatively accurate to measure power consumptions less than 2.5 kW.
![Shelly Plug](../images/shelly_plug_s_1-1.jpg)
## Flash Tasmota
There's an OpenSource project to flash Tasmota on Shelly Plugs: [mg2x](https://github.com/arendst/mgos-to-tasmota).
Locate your Shellie's IP adress (in my case: 192.168.2.150) and update it "over the air" with the Tasmota firmware:
http://192.168.2.150/ota?url=http://ota.tasmota.com/tasmota/shelly/mg2tasmota-ShellyPlugS.zip
Your Shelly will return a JSON object that looks like that:
```
{
"status": "updating",
"has_update": false,
"new_version": "20230109-114426/v1.12.2-g32055ee",
"old_version": "20230109-114426/v1.12.2-g32055ee"
}
```
After a while your Shelly Plug S should be flashed with Tasmota firmware.
> Just be patient. This took longer than five minutes in my DSL connected network.
The Shelly Plus S will create create a new Wifi.
![Tasmota Wifi](../images/wifi.png)
Join that Wifi and configure the device: http://192.164.4.1/
![Join Wifi](../images/configure-wifi.png)
You can configure it as a BlitzWolf SHP product.
Then it offers you power measurement and a programmable toogle.
![BlitzWolf](../images/blitzwolf.png)
It should be configurable just like our [plant monitor](../plant-monitor/README.md).
Just enable MQTT and enter a shorter telemetry period.
![MQTT](../images/mqtt.png) ![Telemetry period](../images/telemetry-period.png)
It will post MQTT messages unter a topic `tele/tasmota_891E97/SENSOR` like this one:
```
{
"Time": "2023-02-27T16:45:07",
"ENERGY": {
"TotalStartTime": "2023-02-27T16:33:06",
"Total": 0.004,
"Yesterday": 0,
"Today": 0.004,
"Period": 0,
"Power": 34,
"ApparentPower": 44,
"ReactivePower": 27,
"Factor": 0.79,
"Voltage": 253,
"Current": 0.172
}
}
```
We now can consume this messages in Node-RED, store them in InfluxDB and build a dashboard in Grafana.
If you haven't deployed the [IoT prototyping backend yet, check out our guide](https://code.curious.bio/curious.bio/iot-backend/).
## Links
- [Pinout for the ESP8266 based Shelly Plug-S Smart Plug
](https://faulty.cloud/blog/shelly-plug-s-pinout)
- [Youtube video: Upgrade Shelly Switches | Easy NO Soldering Smart Garage Door Opener](https://www.youtube.com/watch?v=_oRr8FZyyQ0)
- [mg2x](https://github.com/arendst/mgos-to-tasmota)
- [Shelly Plug S Power Monitoring Plug Tasmota template](https://templates.blakadder.com/shelly_plug_S.html)

View file

@ -1,7 +0,0 @@
[data-md-color-primary=rgb(4, 170, 109)] {
--md-accent-fg-color: #04AA6D;
--md-primary-fg-color--dark: #04AA6D;
--md-primary-fg-color--light: #04AA6D;
--md-primary-fg-color: #04AA6D;
--md-typeset-a-color: #04AA6D;
}

View file

10
hardware/BOM.md Normal file
View file

@ -0,0 +1,10 @@
# Bill of Materials (BOM)
| Part | Quantity | Note | Link |
| --------------------------- | -------: | ---------------- | ------------------------------------------ |
| ESP Microcontroller | 1 | ESP8266 or ESP32 | |
| SCT-013-100 | 1 | one per phase | http://openenergymonitor.org/emon/node/156 |
| 10 kOhm Resistors 1/4 W | 2 | two per phase | |
| 22 Ohm Resistor 1/4 W | 1 | one per phase | |
| 10 uF Elko 10 V | 1 | one per phase | |
| 3,5 mm audio jack connector | 1 | one per phase | |

View file

@ -1,55 +0,0 @@
# Hardware
We are using HelTec Automation Wirelsess Sticks ESP32 Dev-Boards.
### PinOut
The PinOut of our version 3 modules can be found here: https://docs.heltec.org/en/node/esp32/dev-board/hardware_update_log.html#wifi-lora-32-hardware-update-logs
![PinOut](https://resource.heltec.cn/download/Wireless_Stick_V3/HTIT-WS_V3.png "PinOut")
### License
For some parts of the Heltec board you need a ["license"](https://docs.heltec.org/general/view_limited_technical_data.html#esp32-lora-series).
### USB-C
Our HelTec Automation Wirelsess Sticks ESP32 Dev-Boards already have USB-C. But they do not support Power Deliver (PD). If your computer tries to do PD, just plug a cheap USB hub between the board and your computer.
### Arduino IDE
HelTecs GitHub repo can be found here: https://github.com/HelTecAutomation/Heltec_ESP32
I had to install VCP Drivers, first: https://www.silabs.com/developers/usb-to-uart-bridge-vcp-drivers?tab=downloads
You can add their Board Manager to the boards managers URLs: https://github.com/HelTecAutomation/Heltec_ESP32/blob/master/library.json and find their libraries in the IDE (Sketch -> Include Library -> Manage Libraries... Search for "heltec esp32").
> These boards are already *V3* boards, so be careful selecting the right board and port (VCP).
![Arduino IDE](docs/images/flash-with-arduino.png "select the right board and port")
### Install esptool
Esptool is a Pyhton program to flash ESP32. As it's a Pyhton tool you can install it using `pip`:
```sh
pip install esptool
```
### Find the port
Usually you can find the used port using `esptool.py`:
```sh
esptool.py write_flash_status --non-volatile 0
```
#### Using MicroPython
Download the firmware: https://micropython.org/download/
Flash it using `esptool`: https://micropython.org/download/GENERIC_S3/
```sh
esptool.py --chip esp32s3 write_flash -z 0 ~/Desktop/GENERIC_S3-20220117-v1.18.bin
```

View file

@ -1,80 +0,0 @@
(kicad_pcb (version 20221018) (generator pcbnew)
(general
(thickness 1.6)
)
(paper "A4")
(layers
(0 "F.Cu" signal)
(31 "B.Cu" signal)
(32 "B.Adhes" user "B.Adhesive")
(33 "F.Adhes" user "F.Adhesive")
(34 "B.Paste" user)
(35 "F.Paste" user)
(36 "B.SilkS" user "B.Silkscreen")
(37 "F.SilkS" user "F.Silkscreen")
(38 "B.Mask" user)
(39 "F.Mask" user)
(40 "Dwgs.User" user "User.Drawings")
(41 "Cmts.User" user "User.Comments")
(42 "Eco1.User" user "User.Eco1")
(43 "Eco2.User" user "User.Eco2")
(44 "Edge.Cuts" user)
(45 "Margin" user)
(46 "B.CrtYd" user "B.Courtyard")
(47 "F.CrtYd" user "F.Courtyard")
(48 "B.Fab" user)
(49 "F.Fab" user)
(50 "User.1" user)
(51 "User.2" user)
(52 "User.3" user)
(53 "User.4" user)
(54 "User.5" user)
(55 "User.6" user)
(56 "User.7" user)
(57 "User.8" user)
(58 "User.9" user)
)
(setup
(pad_to_mask_clearance 0)
(pcbplotparams
(layerselection 0x00010fc_ffffffff)
(plot_on_all_layers_selection 0x0000000_00000000)
(disableapertmacros false)
(usegerberextensions false)
(usegerberattributes true)
(usegerberadvancedattributes true)
(creategerberjobfile true)
(dashed_line_dash_ratio 12.000000)
(dashed_line_gap_ratio 3.000000)
(svgprecision 4)
(plotframeref false)
(viasonmask false)
(mode 1)
(useauxorigin false)
(hpglpennumber 1)
(hpglpenspeed 20)
(hpglpendiameter 15.000000)
(dxfpolygonmode true)
(dxfimperialunits true)
(dxfusepcbnewfont true)
(psnegative false)
(psa4output false)
(plotreference true)
(plotvalue true)
(plotinvisibletext false)
(sketchpadsonfab false)
(subtractmaskfromsilk false)
(outputformat 1)
(mirror false)
(drillshape 1)
(scaleselection 1)
(outputdirectory "")
)
)
(net 0 "")
)

View file

@ -1,483 +0,0 @@
{
"board": {
"3dviewports": [],
"design_settings": {
"defaults": {
"board_outline_line_width": 0.09999999999999999,
"copper_line_width": 0.19999999999999998,
"copper_text_italic": false,
"copper_text_size_h": 1.5,
"copper_text_size_v": 1.5,
"copper_text_thickness": 0.3,
"copper_text_upright": false,
"courtyard_line_width": 0.049999999999999996,
"dimension_precision": 4,
"dimension_units": 3,
"dimensions": {
"arrow_length": 1270000,
"extension_offset": 500000,
"keep_text_aligned": true,
"suppress_zeroes": false,
"text_position": 0,
"units_format": 1
},
"fab_line_width": 0.09999999999999999,
"fab_text_italic": false,
"fab_text_size_h": 1.0,
"fab_text_size_v": 1.0,
"fab_text_thickness": 0.15,
"fab_text_upright": false,
"other_line_width": 0.15,
"other_text_italic": false,
"other_text_size_h": 1.0,
"other_text_size_v": 1.0,
"other_text_thickness": 0.15,
"other_text_upright": false,
"pads": {
"drill": 0.762,
"height": 1.524,
"width": 1.524
},
"silk_line_width": 0.15,
"silk_text_italic": false,
"silk_text_size_h": 1.0,
"silk_text_size_v": 1.0,
"silk_text_thickness": 0.15,
"silk_text_upright": false,
"zones": {
"min_clearance": 0.5
}
},
"diff_pair_dimensions": [],
"drc_exclusions": [],
"meta": {
"version": 2
},
"rule_severities": {
"annular_width": "error",
"clearance": "error",
"connection_width": "warning",
"copper_edge_clearance": "error",
"copper_sliver": "warning",
"courtyards_overlap": "error",
"diff_pair_gap_out_of_range": "error",
"diff_pair_uncoupled_length_too_long": "error",
"drill_out_of_range": "error",
"duplicate_footprints": "warning",
"extra_footprint": "warning",
"footprint": "error",
"footprint_type_mismatch": "ignore",
"hole_clearance": "error",
"hole_near_hole": "error",
"invalid_outline": "error",
"isolated_copper": "warning",
"item_on_disabled_layer": "error",
"items_not_allowed": "error",
"length_out_of_range": "error",
"lib_footprint_issues": "warning",
"lib_footprint_mismatch": "warning",
"malformed_courtyard": "error",
"microvia_drill_out_of_range": "error",
"missing_courtyard": "ignore",
"missing_footprint": "warning",
"net_conflict": "warning",
"npth_inside_courtyard": "ignore",
"padstack": "warning",
"pth_inside_courtyard": "ignore",
"shorting_items": "error",
"silk_edge_clearance": "warning",
"silk_over_copper": "warning",
"silk_overlap": "warning",
"skew_out_of_range": "error",
"solder_mask_bridge": "error",
"starved_thermal": "error",
"text_height": "warning",
"text_thickness": "warning",
"through_hole_pad_without_hole": "error",
"too_many_vias": "error",
"track_dangling": "warning",
"track_width": "error",
"tracks_crossing": "error",
"unconnected_items": "error",
"unresolved_variable": "error",
"via_dangling": "warning",
"zones_intersect": "error"
},
"rules": {
"max_error": 0.005,
"min_clearance": 0.0,
"min_connection": 0.0,
"min_copper_edge_clearance": 0.0,
"min_hole_clearance": 0.25,
"min_hole_to_hole": 0.25,
"min_microvia_diameter": 0.19999999999999998,
"min_microvia_drill": 0.09999999999999999,
"min_resolved_spokes": 2,
"min_silk_clearance": 0.0,
"min_text_height": 0.7999999999999999,
"min_text_thickness": 0.08,
"min_through_hole_diameter": 0.3,
"min_track_width": 0.0,
"min_via_annular_width": 0.09999999999999999,
"min_via_diameter": 0.5,
"solder_mask_clearance": 0.0,
"solder_mask_min_width": 0.0,
"solder_mask_to_copper_clearance": 0.0,
"use_height_for_length_calcs": true
},
"teardrop_options": [
{
"td_allow_use_two_tracks": true,
"td_curve_segcount": 5,
"td_on_pad_in_zone": false,
"td_onpadsmd": true,
"td_onroundshapesonly": false,
"td_ontrackend": false,
"td_onviapad": true
}
],
"teardrop_parameters": [
{
"td_curve_segcount": 0,
"td_height_ratio": 1.0,
"td_length_ratio": 0.5,
"td_maxheight": 2.0,
"td_maxlen": 1.0,
"td_target_name": "td_round_shape",
"td_width_to_size_filter_ratio": 0.9
},
{
"td_curve_segcount": 0,
"td_height_ratio": 1.0,
"td_length_ratio": 0.5,
"td_maxheight": 2.0,
"td_maxlen": 1.0,
"td_target_name": "td_rect_shape",
"td_width_to_size_filter_ratio": 0.9
},
{
"td_curve_segcount": 0,
"td_height_ratio": 1.0,
"td_length_ratio": 0.5,
"td_maxheight": 2.0,
"td_maxlen": 1.0,
"td_target_name": "td_track_end",
"td_width_to_size_filter_ratio": 0.9
}
],
"track_widths": [],
"via_dimensions": [],
"zones_allow_external_fillets": false
},
"layer_presets": [],
"viewports": []
},
"boards": [],
"cvpcb": {
"equivalence_files": []
},
"erc": {
"erc_exclusions": [],
"meta": {
"version": 0
},
"pin_map": [
[
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
2
],
[
0,
2,
0,
1,
0,
0,
1,
0,
2,
2,
2,
2
],
[
0,
0,
0,
0,
0,
0,
1,
0,
1,
0,
1,
2
],
[
0,
1,
0,
0,
0,
0,
1,
1,
2,
1,
1,
2
],
[
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
2
],
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
2
],
[
1,
1,
1,
1,
1,
0,
1,
1,
1,
1,
1,
2
],
[
0,
0,
0,
1,
0,
0,
1,
0,
0,
0,
0,
2
],
[
0,
2,
1,
2,
0,
0,
1,
0,
2,
2,
2,
2
],
[
0,
2,
0,
1,
0,
0,
1,
0,
2,
0,
0,
2
],
[
0,
2,
1,
1,
0,
0,
1,
0,
2,
0,
0,
2
],
[
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2
]
],
"rule_severities": {
"bus_definition_conflict": "error",
"bus_entry_needed": "error",
"bus_to_bus_conflict": "error",
"bus_to_net_conflict": "error",
"conflicting_netclasses": "error",
"different_unit_footprint": "error",
"different_unit_net": "error",
"duplicate_reference": "error",
"duplicate_sheet_names": "error",
"endpoint_off_grid": "warning",
"extra_units": "error",
"global_label_dangling": "warning",
"hier_label_mismatch": "error",
"label_dangling": "error",
"lib_symbol_issues": "warning",
"missing_bidi_pin": "warning",
"missing_input_pin": "warning",
"missing_power_pin": "error",
"missing_unit": "warning",
"multiple_net_names": "warning",
"net_not_bus_member": "warning",
"no_connect_connected": "warning",
"no_connect_dangling": "warning",
"pin_not_connected": "error",
"pin_not_driven": "error",
"pin_to_pin": "error",
"power_pin_not_driven": "error",
"similar_labels": "warning",
"simulation_model_issue": "ignore",
"unannotated": "error",
"unit_value_mismatch": "error",
"unresolved_variable": "error",
"wire_dangling": "error"
}
},
"libraries": {
"pinned_footprint_libs": [],
"pinned_symbol_libs": []
},
"meta": {
"filename": "Din-Rail-Energy-Meter.kicad_pro",
"version": 1
},
"net_settings": {
"classes": [
{
"bus_width": 12,
"clearance": 0.2,
"diff_pair_gap": 0.25,
"diff_pair_via_gap": 0.25,
"diff_pair_width": 0.2,
"line_style": 0,
"microvia_diameter": 0.3,
"microvia_drill": 0.1,
"name": "Default",
"pcb_color": "rgba(0, 0, 0, 0.000)",
"schematic_color": "rgba(0, 0, 0, 0.000)",
"track_width": 0.25,
"via_diameter": 0.8,
"via_drill": 0.4,
"wire_width": 6
}
],
"meta": {
"version": 3
},
"net_colors": null,
"netclass_assignments": null,
"netclass_patterns": []
},
"pcbnew": {
"last_paths": {
"gencad": "",
"idf": "",
"netlist": "",
"specctra_dsn": "",
"step": "",
"vrml": ""
},
"page_layout_descr_file": ""
},
"schematic": {
"annotate_start_num": 0,
"drawing": {
"dashed_lines_dash_length_ratio": 12.0,
"dashed_lines_gap_length_ratio": 3.0,
"default_line_thickness": 6.0,
"default_text_size": 50.0,
"field_names": [
{
"name": "Untitled Field",
"url": false,
"visible": false
}
],
"intersheets_ref_own_page": false,
"intersheets_ref_prefix": "",
"intersheets_ref_short": false,
"intersheets_ref_show": false,
"intersheets_ref_suffix": "",
"junction_size_choice": 3,
"label_size_ratio": 0.375,
"pin_symbol_size": 25.0,
"text_offset_ratio": 0.15
},
"legacy_lib_dir": "",
"legacy_lib_list": [],
"meta": {
"version": 1
},
"net_format_name": "",
"page_layout_descr_file": "",
"plot_directory": "",
"spice_current_sheet_as_root": false,
"spice_external_command": "spice \"%I\"",
"spice_model_current_sheet_as_root": true,
"spice_save_all_currents": false,
"spice_save_all_voltages": false,
"subpart_first_id": 65,
"subpart_id_separator": 0
},
"sheets": [
[
"a83500ad-471e-4639-9589-a537dc752fa7",
""
]
],
"text_variables": {}
}

File diff suppressed because it is too large Load diff

View file

View file

@ -1,81 +0,0 @@
---
site_name: iot-platform
site_description: IoT platform for analyzing open lab resource consumption and machine status
site_url: https://iot-platform.curious.bio/
repo_name: iot-platform
repo_url: https://code.curious.bio/curious.bio/iot-platform
nav:
- Home: documents/index.md
theme:
logo: images/logos/iot-platform.svg
language: en
name: material
font:
text: Roboto
code: Roboto Mono
features:
- content.code.annotate
- navigation.sections
- navigation.expand
- navigation.tabs
- navigation.tabs.sticky
- navigation.instant
palette:
- media: "(prefers-color-scheme: dark)"
scheme: slate
primary: indigo
accent: indigo
toggle:
icon: material/weather-night
name: Switch to light mode
- media: "(prefers-color-scheme: light)"
scheme: default
primary: indigo
accent: indigo
toggle:
icon: material/weather-sunny
name: Switch to dark mode
plugins:
- glightbox
- minify:
minify_html: true
markdown_extensions:
- admonition
- attr_list
- md_in_html
- tables
- toc:
permalink: true
- pymdownx.details
- pymdownx.superfences:
custom_fences:
- name: mermaid
class: mermaid
format: !!python/name:pymdownx.superfences.fence_code_format
- pymdownx.emoji:
emoji_index: !!python/name:materialx.emoji.twemoji
emoji_generator: !!python/name:materialx.emoji.to_svg
options:
custom_icons:
- overrides/.icons
- pymdownx.tasklist:
custom_checkbox: true
extra:
homepage: https://iot-platform.curious.bio/
social:
- icon: fontawesome/brands/comments-alt
link: https://matrix.to/#/#iot-platform:curious.bio
- icon: fontawesome/brands/mastodon
link: https://social.curious.bio/@iot-platform
generator: false
extra_css:
- stylesheets/extra.css
copyright: >
Copyright © 2023 Curious Community Labs e. V.

View file

@ -1,13 +0,0 @@
{
mkdocs,
python3,
}: let
mkdocsOutput = mkdocs.build {
src = ../.;
siteDir = "site";
};
in {
package = python3.pip.buildPackages rec {
mkdocs = mkdocsOutput;
};
}

View file

@ -1,48 +1,27 @@
okhv = "OKH-LOSHv1.0" okhv = "OKH-LOSHv1.0"
name = "iot-platform" name = "Smart Energy Monitor"
function = "IoT platform for analyzing open lab resource consumption and machine status" function = "A smart energy monitor to measure the power consumption"
image = ""
version = "0.1" version = "0.1"
repo = "https://code.curious.bio/curious.bio/iot-platform" repo = "https://code.curious.bio/curious.bio/smart-energy-monitor"
release = "https://code.curious.bio/curious.bio/iot-platform/releases" release = "https://code.curious.bio/curious.bio/smart-energy-monitor/releases"
license = "CERN-OHL-S-2.0" license = "CERN-OHL-S-2.0"
licensor = "Curious Community Labs e. V." licensor = "Curious Community Labs e. V."
readme = "/README.md" readme = "/README.md"
user-manual = "/docs/documents/usage/getting-started.md" user-manual = "/docs/energy-monitor/README.md"
manufacturing-instructions = "/docs/documents/hardware/manufacturing.md" manufacturing-instructions = "/docs/energy-monitor/README.md"
contribution-guide = "/docs/documents/contribute/development.md" contribution-guide = "README.md"
documentation-language = "en" documentation-language = "en"
technology-readiness-level = "OTRL-5" technology-readiness-level = "OTRL-5"
documentation-readiness-level = "ODRL-3*" documentation-readiness-level = "ODRL-3*"
bom = "/hardware/BOM.csv" bom = "/hardware/BOM.md"
source = ["/hardware/case/iot-platform-case.csg"] tsdc = ["STD"]
tsdc = ["3DP", "PCB", "STD"]
[[software]] [[software]]
release = "0.1" release = "0.1"
installation-guide = "/docs/documents/usage/getting_started.md" installation-guide = "/docs/energy-monitor/README.md"
[[part]]
name = "Case"
image = ""
tsdc = "3DP"
source = "/hardware/case/iot-platform-case.csg"
export = ["/hardware/case/iot-platform-case.stl"]
outer-dimension-dim = "mm"
outer-dimension = "cube(size = [350,150,150])"
[[part]]
name = "Board"
image = ""
tsdc = "PCB"
source = "/hardware/board/iot-platform-board.kicad_pro"
export = ["/hardware/board/iot-platform-board.pdf"]
outer-dimension-dim = "mm"
outer-dimension = "cube(size = [100,65,10])"

View file

@ -1,2 +0,0 @@
listener 1883
allow_anonymous true

View file

@ -1,50 +0,0 @@
version: '3'
services:
mosquitto:
# https://hub.docker.com/_/eclipse-mosquitto
image: eclipse-mosquitto:2.0
restart: always
ports:
- 1883:1883
volumes:
- ./mosquitto.conf:/mosquitto/config/mosquitto.conf
influxdb:
# https://hub.docker.com/_/influxdb
image: influxdb:2.6
restart: always
ports:
- 8086:8086
volumes:
- type: bind
source: ../database/influxdb2
target: /var/lib/influxdb2
grafana:
# https://hub.docker.com/r/grafana/grafana
image: grafana/grafana:9.3.6
depends_on:
- influxdb
restart: always
ports:
- 3000:3000
volumes:
- ../dashboard/grafana:/var/lib/grafana
- ../dashboard/flows.json:/data/flows.json
- ../dashboard/grafana.ini:/etc/grafana/grafana.ini
nodered:
# https://hub.docker.com/r/grafana/grafana
# https://nodered.org/docs/getting-started/docker
image: nodered/node-red:3.0.2
depends_on:
- influxdb
restart: always
ports:
- 1880:1880
environment:
- TZ=Europe/Berlin
- NODE_RED_ENABLE_PROJECTS=true
- FLOWS=flows.json
volumes:
- ../flow:/data

View file

@ -1,2 +0,0 @@
listener 1883
allow_anonymous true

View file

@ -1,38 +0,0 @@
# Grafana
Grafana is an open source analytics and interactive visualization tool. It provides charts, graphs, and alerts for the web when connected to supported data sources.
As a visualization tool, Grafana is a popular component in monitoring stacks, often used in combination with time series databases such as InfluxDB.
## Connection
To connect Grafana to our Influx-DB, you have to create a data source.
The `URL`of our InfluxDB is `http://influxdb:8086`.
In InfluxDB you have to create a `token` to connect: [Load Data -> API Tokens](http://localhost:8086/orgs/721027680173bf2f/load-data/tokens).
![Influx Create Token](../flow/docs/images/influx-create-token.png)
You can use this token to [create a connection from Grafana to Influx-DB](http://localhost:3000/datasources/).
![Connection](./docs/images/database-connection.png)
After having a connection to a database you can easily create an own dashboard in Grafana.
Here's the demo snippet (directly copyied from Influx Data Explorer) and the screen shot.
```
from(bucket: "test")
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["_measurement"] == "msg")
|> filter(fn: (r) => r["_field"] == "value")
|> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)
|> yield(name: "mean")
```
![Example Dashboard](./docs/images/grafana-example-dashboard.png)
## CSV Import
See [CSV Import](./docs/csv-import.md).

View file

@ -1,30 +0,0 @@
# CSV Import
## Grafana
In Grafana there is a [csv-datasource plugin](https://grafana.github.io/grafana-csv-datasource/). This plug lets you visualize data from any URL that returns CSV data, such as REST APIs or static file servers. You can even load data from a local file path. But it is *not* importing CSV from Grafana into a data source (like InfluxDB) or uploading CSV data to a local file system.
> For visualizing CSV data this is enough. Why should you duplicate data if the true data source is a CSV file located somewhere in the internet. If the CSV is not online, this might be another story.
I added this plugin to our Grafana installation, so it's ready to be used.
> I just mounted the whole [Grafana directory](../grafana/) into our Docker-Compose setup. Maybe we have to come up with a better solution.
![Mounted directory](./images/mounted-grafana-directory.png)
Garafana is running on [localhost on port 3000 with credentials admin:admin](http://localhost:3000). So let's get there to add the CSV file as a usable data source.
> I added the CSV file to this repository and mounted it into our Docker-Compose setup. So the CSV file is also available in Grafana. Maybe we have to come up with a better solution..
As the CSV is reachable by Grafana, you can create a data source, there.
![Mounting a CSV file](./images/grafana-csv-data-source.png)
> grafana.ini is also mounted from [this repository](../grafana.ini). So local data mode is enabled.
Whith Grafana having access to data in the CSV file, it's easy to access this data to create a dashboard.
![Using CSV data](./images/grafana-csv-data.png)
![Defining types](./images/grafana-csv-data-type.png)
![Two boards in Grafana](./images/grafana-two-boards.png)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 207 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 214 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

View file

@ -1,3 +0,0 @@
[plugin.marcusolsson-csv-datasource]
allow_local_mode = true
GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS="plugin.marcusolsson-csv-datasource"

View file

@ -1,53 +0,0 @@
{{ define "__subject" }}[{{ .Status | toUpper }}{{ if eq .Status "firing" }}:{{ .Alerts.Firing | len }}{{ if gt (.Alerts.Resolved | len) 0 }}, RESOLVED:{{ .Alerts.Resolved | len }}{{ end }}{{ end }}] {{ .GroupLabels.SortedPairs.Values | join " " }} {{ if gt (len .CommonLabels) (len .GroupLabels) }}({{ with .CommonLabels.Remove .GroupLabels.Names }}{{ .Values | join " " }}{{ end }}){{ end }}{{ end }}
{{ define "__text_values_list" }}{{ $len := len .Values }}{{ if $len }}{{ $first := gt $len 1 }}{{ range $refID, $value := .Values -}}
{{ $refID }}={{ $value }}{{ if $first }}, {{ end }}{{ $first = false }}{{ end -}}
{{ else }}[no value]{{ end }}{{ end }}
{{ define "__text_alert_list" }}{{ range . }}
Value: {{ template "__text_values_list" . }}
Labels:
{{ range .Labels.SortedPairs }} - {{ .Name }} = {{ .Value }}
{{ end }}Annotations:
{{ range .Annotations.SortedPairs }} - {{ .Name }} = {{ .Value }}
{{ end }}{{ if gt (len .GeneratorURL) 0 }}Source: {{ .GeneratorURL }}
{{ end }}{{ if gt (len .SilenceURL) 0 }}Silence: {{ .SilenceURL }}
{{ end }}{{ if gt (len .DashboardURL) 0 }}Dashboard: {{ .DashboardURL }}
{{ end }}{{ if gt (len .PanelURL) 0 }}Panel: {{ .PanelURL }}
{{ end }}{{ end }}{{ end }}
{{ define "default.title" }}{{ template "__subject" . }}{{ end }}
{{ define "default.message" }}{{ if gt (len .Alerts.Firing) 0 }}**Firing**
{{ template "__text_alert_list" .Alerts.Firing }}{{ if gt (len .Alerts.Resolved) 0 }}
{{ end }}{{ end }}{{ if gt (len .Alerts.Resolved) 0 }}**Resolved**
{{ template "__text_alert_list" .Alerts.Resolved }}{{ end }}{{ end }}
{{ define "__teams_text_alert_list" }}{{ range . }}
Value: {{ template "__text_values_list" . }}
Labels:
{{ range .Labels.SortedPairs }} - {{ .Name }} = {{ .Value }}
{{ end }}
Annotations:
{{ range .Annotations.SortedPairs }} - {{ .Name }} = {{ .Value }}
{{ end }}
{{ if gt (len .GeneratorURL) 0 }}Source: [{{ .GeneratorURL }}]({{ .GeneratorURL }})
{{ end }}{{ if gt (len .SilenceURL) 0 }}Silence: [{{ .SilenceURL }}]({{ .SilenceURL }})
{{ end }}{{ if gt (len .DashboardURL) 0 }}Dashboard: [{{ .DashboardURL }}]({{ .DashboardURL }})
{{ end }}{{ if gt (len .PanelURL) 0 }}Panel: [{{ .PanelURL }}]({{ .PanelURL }})
{{ end }}
{{ end }}{{ end }}
{{ define "teams.default.message" }}{{ if gt (len .Alerts.Firing) 0 }}**Firing**
{{ template "__teams_text_alert_list" .Alerts.Firing }}{{ if gt (len .Alerts.Resolved) 0 }}
{{ end }}{{ end }}{{ if gt (len .Alerts.Resolved) 0 }}**Resolved**
{{ template "__teams_text_alert_list" .Alerts.Resolved }}{{ end }}{{ end }}

View file

@ -1,14 +0,0 @@
Jahr,Verarbeitendes Gewerbe (in kt),Verkehr gesamt (in kt),Straßenverkehr (in kt),Haushalte und GHD gesamt (in kt),Haushalte (in kt),"Gewerbe, Handel, Dienstleistungen GHD (in kt)",CO2-Emissionen gesamt (in kt)
2020-01-01,3702,3760,2989,6070,3165,2905,13532
2019-01-01,3956,4708,3313,6477,3451,3026,15140
2018-01-01,4220,4755,3294,6982,3600,3382,15957
2017-01-01,4630,4653,3333,7012,3509,3503,16294
2016-01-01,4661,4577,3287,7314,3637,3677,16552
2015-01-01,5135,4460,3198,7434,3593,3841,17029
2014-01-01,5388,4417,3178,7419,3657,3762,17224
2013-01-01,5224,4337,3165,8277,4056,4221,17839
2012-01-01,5848,4259,3033,8313,4030,4283,18419
2011-01-01,5714,4279,3045,8143,4052,4091,18136
2010-01-01,5899,4243,3065,8611,4245,4366,18753
2009-01-01,5442,4172,3013,8360,4159,4201,17974
2008-01-01,5835,4234,3019,8462,4284,4178,18531
1 Jahr Verarbeitendes Gewerbe (in kt) Verkehr gesamt (in kt) Straßenverkehr (in kt) Haushalte und GHD gesamt (in kt) Haushalte (in kt) Gewerbe, Handel, Dienstleistungen GHD (in kt) CO2-Emissionen gesamt (in kt)
2 2020-01-01 3702 3760 2989 6070 3165 2905 13532
3 2019-01-01 3956 4708 3313 6477 3451 3026 15140
4 2018-01-01 4220 4755 3294 6982 3600 3382 15957
5 2017-01-01 4630 4653 3333 7012 3509 3503 16294
6 2016-01-01 4661 4577 3287 7314 3637 3677 16552
7 2015-01-01 5135 4460 3198 7434 3593 3841 17029
8 2014-01-01 5388 4417 3178 7419 3657 3762 17224
9 2013-01-01 5224 4337 3165 8277 4056 4221 17839
10 2012-01-01 5848 4259 3033 8313 4030 4283 18419
11 2011-01-01 5714 4279 3045 8143 4052 4091 18136
12 2010-01-01 5899 4243 3065 8611 4245 4366 18753
13 2009-01-01 5442 4172 3013 8360 4159 4201 17974
14 2008-01-01 5835 4234 3019 8462 4284 4178 18531

View file

@ -1,3 +0,0 @@
ID,Path,StartTime,EndTime
0,C:\Users\InMachines\Desktop\MQTT\bCNC-laser\tests\static\sample.gcode,2023-03-01 12:31:30.351399,2023-03-01 12:31:52.538042
1,C:\Users\InMachines\Desktop\MQTT\bCNC-laser\tests\static\sample.gcode,2023-03-01 12:32:17.547355,2023-03-01 12:32:38.265005
1 ID Path StartTime EndTime
2 0 C:\Users\InMachines\Desktop\MQTT\bCNC-laser\tests\static\sample.gcode 2023-03-01 12:31:30.351399 2023-03-01 12:31:52.538042
3 1 C:\Users\InMachines\Desktop\MQTT\bCNC-laser\tests\static\sample.gcode 2023-03-01 12:32:17.547355 2023-03-01 12:32:38.265005

View file

@ -1,13 +0,0 @@
Time,State-CNC,State-Lasercutter,State-3D-Printer
2023-03-01 12:31:28,Connected,Connected,Connected
2023-03-01 12:31:29,Idle,Idle,Idle
2023-03-01 12:31:30,Idle, Run,Idle
2023-03-01 12:31:31,Run,Idle,Run
2023-03-01 12:31:32,Idle,Run,Run
2023-03-01 12:31:33,Run,Run,Run
2023-03-01 12:31:52,Idle,Idle,Run
2023-03-01 12:31:52,Idle,Run,Idle
2023-03-01 12:32:17,Idle,Run,Idle
2023-03-01 12:32:20,Run,Idle,Run
2023-03-01 12:32:39,Idle,Run,Run
2023-03-01 12:32:39,Idle,Idle,Idle
1 Time State-CNC State-Lasercutter State-3D-Printer
2 2023-03-01 12:31:28 Connected Connected Connected
3 2023-03-01 12:31:29 Idle Idle Idle
4 2023-03-01 12:31:30 Idle Run Idle
5 2023-03-01 12:31:31 Run Idle Run
6 2023-03-01 12:31:32 Idle Run Run
7 2023-03-01 12:31:33 Run Run Run
8 2023-03-01 12:31:52 Idle Idle Run
9 2023-03-01 12:31:52 Idle Run Idle
10 2023-03-01 12:32:17 Idle Run Idle
11 2023-03-01 12:32:20 Run Idle Run
12 2023-03-01 12:32:39 Idle Run Run
13 2023-03-01 12:32:39 Idle Idle Idle

View file

@ -1,733 +0,0 @@
/**
* Copyright JS Foundation and other contributors, http://js.foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
**/
if (!RED) {
var RED = {}
}
RED.debug = (function() {
var config;
var messageList;
var messageTable;
var filterType = "filterAll";
var filteredNodes = {}; // id->true means hide, so default to all visible
var view = 'list';
var messages = [];
var messagesByNode = {};
var sbc;
var activeWorkspace;
var numMessages = 100; // Hardcoded number of message to show in debug window scrollback
var debugNodeTreeList;
function init(_config) {
config = _config;
var content = $("<div>").css({"position":"relative","height":"100%"});
var toolbar = $('<div class="red-ui-sidebar-header">'+
'<span class="button-group">'+
'<a id="red-ui-sidebar-debug-filter" style="padding-right: 5px" class="red-ui-sidebar-header-button" href="#"><i class="fa fa-filter"></i> <span></span> <i style="padding-left: 5px;" class="fa fa-caret-down"></i></a>'+
'</span>'+
'<span class="button-group">'+
'<a id="red-ui-sidebar-debug-clear" style="border-right: none; padding-right: 6px" class="red-ui-sidebar-header-button" href="#" data-clear-type="all"><i class="fa fa-trash"></i> <span>all</span></a>' +
'<a id="red-ui-sidebar-debug-clear-opts" style="padding: 5px; border-left: none;" class="red-ui-sidebar-header-button" href="#"><i class="fa fa-caret-down"></i></a>'+
'</span></div>').appendTo(content);
var footerToolbar = $('<div>'+
'<span class="button-group"><a id="red-ui-sidebar-debug-open" class="red-ui-footer-button" href="#"><i class="fa fa-desktop"></i></a></span> ' +
'</div>');
messageList = $('<div class="red-ui-debug-content red-ui-debug-content-list"/>').appendTo(content);
sbc = messageList[0];
messageTable = $('<div class="red-ui-debug-content red-ui-debug-content-table hide"/>').appendTo(content);
var filterDialogCloseTimeout;
var filterDialogShown = false;
var filterDialog = $('<div class="red-ui-debug-filter-box hide"></div>').appendTo(toolbar);//content);
filterDialog.on('mouseleave' ,function(evt) {
if (filterDialogShown) {
filterDialogCloseTimeout = setTimeout(function() {
filterDialog.slideUp(200);
filterDialogShown = false;
},500)
}
})
filterDialog.on('mouseenter' ,function(evt) {
clearTimeout(filterDialogCloseTimeout)
})
var filterToolbar = $('<div style="margin-bottom: 3px; display: flex;">'+
'<span style="flex-grow:1; text-align: left;">'+
'<span class="button-group"><button type="button" id="red-ui-sidebar-filter-select-all" class="red-ui-sidebar-header-button red-ui-button-small" data-i18n="node-red:debug.sidebar.selectAll"></button></span>' +
'<span class="button-group"><button type="button" id="red-ui-sidebar-filter-select-none" class="red-ui-sidebar-header-button red-ui-button-small" data-i18n="node-red:debug.sidebar.selectNone"></button></span>' +
'</span>'+
'<span class="button-group"><button type="button" id="red-ui-sidebar-filter-select-close" class="red-ui-sidebar-header-button red-ui-button-small"><i class="fa fa-times"></i></button></span>'+
'</div>').appendTo(filterDialog);
filterToolbar.find("#red-ui-sidebar-filter-select-close").on('click', function(evt) {
clearTimeout(filterDialogCloseTimeout)
filterDialogShown = false;
filterDialog.slideUp(200);
})
filterToolbar.find("#red-ui-sidebar-filter-select-all").on('click', function(evt) {
evt.preventDefault();
var data = debugNodeTreeList.treeList('data');
data.forEach(function(flow) {
if (!flow.selected) {
if (flow.treeList.checkbox) {
flow.treeList.checkbox.trigger('click')
}
} else {
flow.children.forEach(function(item) {
if (!item.selected) {
item.treeList.select();
}
})
}
});
refreshMessageList();
})
filterToolbar.find("#red-ui-sidebar-filter-select-none").on('click', function(evt) {
evt.preventDefault();
debugNodeTreeList.treeList('clearSelection');
var data = debugNodeTreeList.treeList('data');
data.forEach(function(flow) {
if (flow.children) {
flow.children.forEach(function(item) {
filteredNodes[item.node.id] = true;
})
}
});
RED.settings.set('debug.filteredNodes',Object.keys(filteredNodes))
refreshMessageList();
})
var debugNodeListRow = $('<div class="red-ui-debug-filter-row" id="red-ui-sidebar-debug-filter-node-list-row"></div>').appendTo(filterDialog);
debugNodeTreeList = $("<div></div>").appendTo(debugNodeListRow).css({width: "100%", height: "300px"})
.treeList({autoSelect: false}).on("treelistitemmouseover", function(e, item) {
if (item.node) {
item.node.highlighted = true;
item.node.dirty = true;
RED.view.redraw();
}
}).on("treelistitemmouseout", function(e, item) {
if (item.node) {
item.node.highlighted = false;
item.node.dirty = true;
RED.view.redraw();
}
}).on("treelistselect", function(e, item) {
if (item.children) {
item.children.forEach(function(child) {
if (child.checkbox) {
child.treeList.select(item.selected)
}
})
} else {
if (item.node) {
if (item.selected) {
delete filteredNodes[item.node.id]
} else {
filteredNodes[item.node.id] = true;
}
RED.settings.set('debug.filteredNodes',Object.keys(filteredNodes))
refreshMessageList();
}
}
})
try {
content.i18n();
} catch(err) {
console.log("TODO: i18n library support");
}
toolbar.find('#red-ui-sidebar-debug-filter span').text(RED._('node-red:debug.sidebar.filterAll'));
toolbar.find('#red-ui-sidebar-debug-filter').on("click",function(e) {
e.preventDefault();
var options = [
{ label: $('<span data-i18n="[append]node-red:debug.sidebar.filterAll"><input type="radio" value="filterAll" name="filter-type" style="margin-top:0"> </span>').i18n() , value: "filterAll" },
{ label: $('<span><span data-i18n="[append]node-red:debug.sidebar.filterSelected"><input type="radio" value="filterSelected" name="filter-type" style="margin-top:0"> </span>...</span>').i18n(), value: "filterSelected" },
{ label: $('<span data-i18n="[append]node-red:debug.sidebar.filterCurrent"><input type="radio" value="filterCurrent" name="filter-type" style="margin-top:0"> </span>').i18n(), value: "filterCurrent" }
]
var menu = RED.popover.menu({
options: options,
onselect: function(item) {
if (item.value !== filterType) {
filterType = item.value;
$('#red-ui-sidebar-debug-filter span').text(RED._('node-red:debug.sidebar.'+filterType));
refreshMessageList();
RED.settings.set("debug.filter",filterType)
}
if (filterType === 'filterSelected') {
refreshDebugNodeList();
filterDialog.slideDown(200);
filterDialogShown = true;
debugNodeTreeList.focus();
}
}
});
menu.show({
target: $("#red-ui-sidebar-debug-filter"),
align: "left",
offset: [$("#red-ui-sidebar-debug-filter").outerWidth()-2, -1]
})
$('input[name="filter-type"][value="'+RED.settings.get("debug.filter","filterAll")+'"]').prop("checked", true)
});
RED.popover.tooltip(toolbar.find('#red-ui-sidebar-debug-filter'),RED._('node-red:debug.sidebar.filterLog'));
toolbar.find("#red-ui-sidebar-debug-clear").on("click", function(e) {
e.preventDefault();
var action = RED.settings.get("debug.clearType","all")
clearMessageList(false, action === 'filtered');
});
var clearTooltip = RED.popover.tooltip(toolbar.find("#red-ui-sidebar-debug-clear"),RED._('node-red:debug.sidebar.clearLog'),"core:clear-debug-messages");
toolbar.find("#red-ui-sidebar-debug-clear-opts").on("click", function(e) {
e.preventDefault();
var options = [
{ label: $('<span data-i18n="[append]node-red:debug.sidebar.clearLog"><input type="radio" value="all" name="clear-type" style="margin-top:0"> </span>').i18n() , value: "all" },
{ label: $('<span data-i18n="[append]node-red:debug.sidebar.clearFilteredLog"><input type="radio" value="filtered" name="clear-type" style="margin-top:0"> </span>').i18n(), value: "filtered" }
]
var menu = RED.popover.menu({
options: options,
onselect: function(item) {
if (item.value === "all") {
$("#red-ui-sidebar-debug-clear > span").text(RED._('node-red:debug.sidebar.all'));
clearTooltip.setAction("core:clear-debug-messages");
clearTooltip.setContent(RED._('node-red:debug.sidebar.clearLog'))
RED.settings.set("debug.clearType","all")
} else {
$("#red-ui-sidebar-debug-clear > span").text(RED._('node-red:debug.sidebar.filtered'));
clearTooltip.setAction("core:clear-filtered-debug-messages");
clearTooltip.setContent(RED._('node-red:debug.sidebar.clearFilteredLog'))
RED.settings.set("debug.clearType","filtered")
}
}
});
menu.show({
target: $("#red-ui-sidebar-debug-clear-opts"),
align: "left",
offset: [$("#red-ui-sidebar-debug-clear-opts").outerWidth()-2, -1]
})
$('input[name="clear-type"][value="'+RED.settings.get("debug.clearType","all")+'"]').prop("checked", true)
})
var clearType = RED.settings.get("debug.clearType","all");
if (clearType === "all") {
toolbar.find("#red-ui-sidebar-debug-clear > span").text(RED._('node-red:debug.sidebar.all'));
clearTooltip.setAction("core:clear-debug-messages");
clearTooltip.setContent(RED._('node-red:debug.sidebar.clearLog'))
} else {
toolbar.find("#red-ui-sidebar-debug-clear > span").text(RED._('node-red:debug.sidebar.filtered'));
clearTooltip.setAction("core:clear-filtered-debug-messages");
clearTooltip.setContent(RED._('node-red:debug.sidebar.clearFilteredLog'))
}
filterType = RED.settings.get("debug.filter","filterAll")
var filteredNodeList = RED.settings.get("debug.filteredNodes",[]);
filteredNodes = {}
filteredNodeList.forEach(function(id) {
filteredNodes[id] = true
})
toolbar.find('#red-ui-sidebar-debug-filter span').text(RED._('node-red:debug.sidebar.'+filterType));
refreshMessageList();
return {
content: content,
footer: footerToolbar
};
}
function containsDebug(sid, map) {
var item = map[sid];
if (item) {
if (item.debug === undefined) {
var sfs = Object.keys(item.subflows);
var contain = false;
for (var i = 0; i < sfs.length; i++) {
var sf = sfs[i];
if (containsDebug(sf, map)) {
contain = true;
break;
}
}
item.debug = contain;
}
return item.debug;
}
return false;
}
function refreshDebugNodeList() {
var workspaceOrder = RED.nodes.getWorkspaceOrder();
var workspaceOrderMap = {};
workspaceOrder.forEach(function(ws,i) {
workspaceOrderMap[ws] = i;
});
var candidateNodes = [];
var candidateSFs = [];
var subflows = {};
RED.nodes.eachNode(function (n) {
var nt = n.type;
if (nt === "debug") {
if (n.z in workspaceOrderMap) {
candidateNodes.push(n);
}
else {
var sf = RED.nodes.subflow(n.z);
if (sf) {
subflows[sf.id] = {
debug: true,
subflows: {}
};
}
}
}
else if(nt.substring(0, 8) === "subflow:") {
if (n.z in workspaceOrderMap) {
candidateSFs.push(n);
}
else {
var psf = RED.nodes.subflow(n.z);
if (psf) {
var sid = nt.substring(8);
var item = subflows[psf.id];
if (!item) {
item = {
debug: undefined,
subflows: {}
};
subflows[psf.id] = item;
}
item.subflows[sid] = true;
}
}
}
});
candidateSFs.forEach(function (sf) {
var sid = sf.type.substring(8);
if (containsDebug(sid, subflows)) {
candidateNodes.push(sf);
}
});
candidateNodes.sort(function(A,B) {
var wsA = workspaceOrderMap[A.z];
var wsB = workspaceOrderMap[B.z];
if (wsA !== wsB) {
return wsA-wsB;
}
var labelA = RED.utils.getNodeLabel(A,A.id);
var labelB = RED.utils.getNodeLabel(B,B.id);
return labelA.localeCompare(labelB);
});
var currentWs = null;
var data = [];
var currentFlow;
var currentSelectedCount = 0;
candidateNodes.forEach(function(node) {
if (currentWs !== node.z) {
if (currentFlow && currentFlow.checkbox) {
currentFlow.selected = currentSelectedCount === currentFlow.children.length
}
currentSelectedCount = 0;
currentWs = node.z;
var parent = RED.nodes.workspace(currentWs) || RED.nodes.subflow(currentWs);
currentFlow = {
label: RED.utils.getNodeLabel(parent, currentWs),
}
if (!parent.disabled) {
currentFlow.children = [];
currentFlow.checkbox = true;
} else {
currentFlow.class = "disabled"
}
data.push(currentFlow);
}
if (currentFlow.children) {
if (!filteredNodes[node.id]) {
currentSelectedCount++;
}
currentFlow.children.push({
label: RED.utils.getNodeLabel(node,node.id),
node: node,
checkbox: true,
selected: !filteredNodes[node.id]
});
}
});
if (currentFlow && currentFlow.checkbox) {
currentFlow.selected = currentSelectedCount === currentFlow.children.length
}
debugNodeTreeList.treeList("data", data);
}
function getTimestamp() {
var d = new Date();
return d.toLocaleString();
}
function sanitize(m) {
return m.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");
}
var refreshTimeout;
function refreshMessageList(_activeWorkspace) {
if (refreshTimeout) {
clearTimeout(refreshTimeout);
}
refreshTimeout = setTimeout(function() {
_refreshMessageList(_activeWorkspace);
},200);
}
function _refreshMessageList(_activeWorkspace) {
if (_activeWorkspace) {
activeWorkspace = _activeWorkspace.replace(/\./g,"_");
}
if (filterType === "filterAll") {
$(".red-ui-debug-msg").removeClass("hide");
} else {
$(".red-ui-debug-msg").each(function() {
if (filterType === 'filterCurrent') {
$(this).toggleClass('hide',!$(this).hasClass('red-ui-debug-msg-flow-'+activeWorkspace));
} else if (filterType === 'filterSelected') {
var id = $(this).data('source');
if (id) {
$(this).toggleClass('hide',!!filteredNodes[id]);
}
}
});
}
}
function refreshMessageTable() {
}
function showMessageList() {
view = 'list';
messageTable.hide();
messageTable.empty();
messages.forEach(function(m) {
messageList.append(m.el);
})
messageList.show();
}
function showMessageTable() {
view = 'table';
messageList.hide();
messageList.empty();
Object.keys(messagesByNode).forEach(function(id) {
var m = messagesByNode[id];
var msg = m.el;
var sourceNode = m.source;
if (sourceNode) {
var wrapper = $("<div>",{id:"red-ui-debug-msg-source-"+sourceNode.id.replace(/\./g,"_")}).appendTo(messageTable);
wrapper.append(msg);
}
});
messageTable.show();
}
function formatString(str) {
return str.replace(/\n/g,"&crarr;").replace(/\t/g,"&rarr;");
}
var menuOptionMenu;
var activeMenuMessage;
function showMessageMenu(button,dbgMessage,sourceId) {
activeMenuMessage = dbgMessage;
if (!menuOptionMenu) {
var opts = [
{id:"red-ui-debug-msg-menu-item-collapse",label:RED._("node-red:debug.messageMenu.collapseAll"),onselect:function(){
activeMenuMessage.collapse();
}},
];
if (activeMenuMessage.clearPinned) {
opts.push(
{id:"red-ui-debug-msg-menu-item-clear-pins",label:RED._("node-red:debug.messageMenu.clearPinned"),onselect:function(){
activeMenuMessage.clearPinned();
}},
);
}
opts.push(
null,
{id:"red-ui-debug-msg-menu-item-filter", label:RED._("node-red:debug.messageMenu.filterNode"),onselect:function(){
var candidateNodes = RED.nodes.filterNodes({type:'debug'});
candidateNodes.forEach(function(n) {
filteredNodes[n.id] = true;
});
delete filteredNodes[sourceId];
$("#red-ui-sidebar-debug-filterSelected").trigger("click");
RED.settings.set('debug.filteredNodes',Object.keys(filteredNodes))
refreshMessageList();
}},
{id:"red-ui-debug-msg-menu-item-clear-filter",label:RED._("node-red:debug.messageMenu.clearFilter"),onselect:function(){
$("#red-ui-sidebar-debug-filterAll").trigger("click");
refreshMessageList();
}}
);
menuOptionMenu = RED.menu.init({id:"red-ui-debug-msg-option-menu",
options: opts
});
menuOptionMenu.css({
position: "absolute"
})
menuOptionMenu.on('mouseleave', function(){ $(this).hide() });
menuOptionMenu.on('mouseup', function() { $(this).hide() });
menuOptionMenu.appendTo("body");
}
var filterOptionDisabled = false;
var sourceNode = RED.nodes.node(sourceId);
if (sourceNode && sourceNode.type !== 'debug') {
filterOptionDisabled = true;
}
RED.menu.setDisabled('red-ui-debug-msg-menu-item-filter',filterOptionDisabled);
RED.menu.setDisabled('red-ui-debug-msg-menu-item-clear-filter',filterOptionDisabled);
var elementPos = button.offset();
menuOptionMenu.css({
top: elementPos.top+"px",
left: (elementPos.left - menuOptionMenu.width() + 20)+"px"
})
menuOptionMenu.show();
}
var stack = [];
var busy = false;
function handleDebugMessage(o) {
if (o) { stack.push(o); }
if (!busy && (stack.length > 0)) {
busy = true;
processDebugMessage(stack.shift());
setTimeout(function() {
busy = false;
handleDebugMessage();
}, 15); // every 15mS = 66 times a second
if (stack.length > numMessages) { stack = stack.splice(-numMessages); }
}
}
function processDebugMessage(o) {
var msg = $("<div/>");
var sourceNode = o._source;
msg.on("mouseenter", function() {
msg.addClass('red-ui-debug-msg-hover');
if (o._source) {
// highlight the top-level node (could be subflow instance)
config.messageMouseEnter(o._source.id);
if (o._source._alias) {
// this is inside a subflow - highlight the node itself
config.messageMouseEnter(o._source._alias);
}
// if path.length > 2, we are nested - highlight subflow instances
for (var i=2;i<o._source.path.length;i++) {
config.messageMouseEnter(o._source.path[i]);
}
}
});
msg.on("mouseleave", function() {
msg.removeClass('red-ui-debug-msg-hover');
if (o._source) {
config.messageMouseLeave(o._source.id);
if (o._source._alias) {
config.messageMouseLeave(o._source._alias);
}
for (var i=2;i<o._source.path.length;i++) {
config.messageMouseLeave(o._source.path[i]);
}
}
});
var name = sanitize(((o.name?o.name:o.id)||"").toString());
var topic = sanitize((o.topic||"").toString());
var property = sanitize(o.property?o.property:'');
var payload = o.msg;
var format = sanitize((o.format||"").toString());
msg.attr("class", 'red-ui-debug-msg'+(o.level?(' red-ui-debug-msg-level-'+o.level):'')+
(sourceNode?(
" red-ui-debug-msg-node-"+sourceNode.id.replace(/\./g,"_")+
(sourceNode.z?" red-ui-debug-msg-flow-"+sourceNode.z.replace(/\./g,"_"):"")
):""));
if (sourceNode) {
msg.data('source',sourceNode.id);
if (filterType === "filterCurrent" && activeWorkspace) {
if (sourceNode.z && sourceNode.z.replace(/\./g,"_") !== activeWorkspace) {
msg.addClass('hide');
}
} else if (filterType === 'filterSelected'){
if (!!filteredNodes[sourceNode.id]) {
msg.addClass('hide');
}
}
}
var metaRow = $('<div class="red-ui-debug-msg-meta"></div>').appendTo(msg);
$('<span class="red-ui-debug-msg-date">'+ getTimestamp()+'</span>').appendTo(metaRow);
if (sourceNode) {
var nodeLink = $('<a>',{href:"#",class:"red-ui-debug-msg-name"}).text(RED._("node-red:debug.node")+": "+(o.name||sourceNode.name||sourceNode.id))
.appendTo(metaRow)
.on("click", function(evt) {
evt.preventDefault();
config.messageSourceClick(sourceNode.id, sourceNode._alias, sourceNode.path);
});
if (sourceNode.pathHierarchy) {
RED.popover.create({
tooltip: true,
target:nodeLink,
trigger: "hover",
size: "small",
direction: "bottom",
interactive: true,
content: function() {
const content = $("<div>")
sourceNode.pathHierarchy.forEach((pathPart,idx) => {
const link = $("<a>", {href:"#" ,style:'display: block'})
.css({
paddingLeft:((idx*10)+((idx === sourceNode.pathHierarchy.length - 1)?10:0))+"px",
paddingRight:'2px'
})
.text(pathPart.label)
.appendTo(content)
.on("click", function(evt) {
evt.preventDefault();
config.messageSourceClick(pathPart.id);
})
if (idx < sourceNode.pathHierarchy.length - 1) {
$('<i class="fa fa-angle-down" style="margin-right: 3px"></i>').prependTo(link)
}
})
return content
},
delay: { show: 50, hide: 150 }
});
}
} else if (name) {
$('<span class="red-ui-debug-msg-name">'+name+'</span>').appendTo(metaRow);
}
payload = RED.utils.decodeObject(payload,format);
var el = $('<span class="red-ui-debug-msg-payload"></span>').appendTo(msg);
var path = o.property||'';
var debugMessage = RED.utils.createObjectElement(payload, {
key: /*true*/null,
typeHint: format,
hideKey: false,
path: path,
sourceId: sourceNode&&sourceNode.id,
rootPath: path
});
// Do this in a separate step so the element functions aren't stripped
debugMessage.appendTo(el);
// NOTE: relying on function error to have a "type" that all other msgs don't
if (o.hasOwnProperty("type") && (o.type === "function")) {
var errorLvlType = 'error';
var errorLvl = 20;
if (o.hasOwnProperty("level") && o.level === 30) {
errorLvl = 30;
errorLvlType = 'warn';
}
msg.addClass('red-ui-debug-msg-level-' + errorLvl);
$('<span class="red-ui-debug-msg-topic">function : (' + errorLvlType + ')</span>').appendTo(metaRow);
} else {
var tools = $('<span class="red-ui-debug-msg-tools button-group"></span>').appendTo(metaRow);
var filterMessage = $('<button class="red-ui-button red-ui-button-small"><i class="fa fa-caret-down"></i></button>').appendTo(tools);
filterMessage.on("click", function(e) {
e.preventDefault();
e.stopPropagation();
showMessageMenu(filterMessage,debugMessage,sourceNode&&sourceNode.id);
});
$('<span class="red-ui-debug-msg-topic">'+
(o.topic?topic+' : ':'')+
(o.property?'msg.'+property:'msg')+" : "+format+
'</span>').appendTo(metaRow);
}
var atBottom = (sbc.scrollHeight-messageList.height()-sbc.scrollTop) < 5;
var m = {
el: msg
};
messages.push(m);
if (sourceNode) {
m.source = sourceNode;
messagesByNode[sourceNode.id] = m;
}
if (view == "list") {
messageList.append(msg);
} else {
if (sourceNode) {
var wrapper = $("#red-ui-debug-msg-source-"+sourceNode.id.replace(/\./g,"_"));
if (wrapper.length === 0 ) {
wrapper = $("<div>",{id:"red-ui-debug-msg-source-"+sourceNode.id.replace(/\./g,"_")}).appendTo(messageTable);
}
wrapper.empty();
wrapper.append(msg);
}
}
if (messages.length === numMessages) {
m = messages.shift();
if (view === "list") {
m.el.remove();
}
}
if (atBottom) {
messageList.scrollTop(sbc.scrollHeight);
}
}
function clearMessageList(clearFilter, filteredOnly) {
if (!filteredOnly) {
$(".red-ui-debug-msg").remove();
} else {
$(".red-ui-debug-msg:not(.hide)").remove();
}
config.clear();
if (!!clearFilter) {
clearFilterSettings();
}
refreshDebugNodeList();
}
function clearFilterSettings() {
filteredNodes = {};
filterType = 'filterAll';
RED.settings.set("debug.filter",filterType);
RED.settings.set('debug.filteredNodes',Object.keys(filteredNodes))
$('#red-ui-sidebar-debug-filter span').text(RED._('node-red:debug.sidebar.filterAll'));
}
return {
init: init,
refreshMessageList:refreshMessageList,
handleDebugMessage: handleDebugMessage,
clearMessageList: clearMessageList
}
})();

View file

@ -1 +0,0 @@
<svg width="32" height="32" xmlns="http://www.w3.org/2000/svg"><path color="#000" fill="#8c101c" d="M0 .002h32v32H0z"/><g color="#000"><path fill="#fff" d="M2 13.002h10v5H2zM19 8.002h10v5H19z"/><path d="M19 21.002h10v5H19z"/></g><path d="M11.5 15.502h2l4-5h2" fill="none" stroke="#fff" stroke-width="1.5"/></svg>

Before

Width:  |  Height:  |  Size: 312 B

View file

@ -1 +0,0 @@
<svg width="27" height="18" xmlns="http://www.w3.org/2000/svg"><g fill="#fff" color="#000"><path d="M0 5h10v5H0zM17 0h10v5H17zM17 13h10v5H17z"/></g><path d="M9.5 7.5h2l4-5h2" fill="none" stroke="#fff" stroke-width="1.5"/></svg>

Before

Width:  |  Height:  |  Size: 227 B

View file

@ -1 +0,0 @@
<svg width="32" height="32" xmlns="http://www.w3.org/2000/svg"><path color="#000" fill="#8c101c" d="M0 0h32v32H0z"/><g fill="#fff" color="#000"><path d="M2 13h10v5H2zM19 8h10v5H19zM19 21h10v5H19z"/></g><path d="M11.5 15.5h2l4-5h2" fill="none" stroke="#fff" stroke-width="1.5"/></svg>

Before

Width:  |  Height:  |  Size: 283 B

View file

@ -1 +0,0 @@
<svg width="32" height="32" xmlns="http://www.w3.org/2000/svg"><path color="#000" fill="#8c101c" d="M0 .002h32v32H0z"/><path color="#000" d="M2 13.002h10v5H2zM19 21.002h10v5H19z"/><path d="M11.5 15.502h2l4-5h2" fill="none" stroke="#000" stroke-width="1.5"/><path color="#000" fill="#fff" d="M19 8.002h10v5H19z"/></svg>

Before

Width:  |  Height:  |  Size: 318 B

View file

@ -1 +0,0 @@
<svg width="32" height="32" xmlns="http://www.w3.org/2000/svg"><g color="#000"><path fill="#8c101c" d="M0 .006h32v32H0z"/><path d="M11.81 25.429a10.02 10.02 0 0 0 4.19.914c5.562 0 10.107-4.545 10.107-10.106S21.562 6.131 16 6.131 5.895 10.676 5.895 16.237h3.368c0-3.74 2.997-6.737 6.738-6.737s6.737 2.996 6.737 6.737-2.996 6.738-6.737 6.738a6.775 6.775 0 0 1-2.533-.486l1.43-3.48-6.947 1.317 2.13 8.485z" fill="#fff" style="isolation:auto;mix-blend-mode:normal;text-decoration-color:#000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-transform:none;white-space:normal"/></g></svg>

Before

Width:  |  Height:  |  Size: 606 B

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,3 +0,0 @@
/** gridstack.js 0.6.4 - JQuery UI Drag&Drop plugin @preserve */
!function(t){if("function"==typeof define&&define.amd)define(["jquery","gridstack","exports"],t);else if("undefined"!=typeof exports){try{jQuery=require("jquery")}catch(t){}try{gridstack=require("gridstack")}catch(t){}t(jQuery,gridstack.GridStackUI,exports)}else t(jQuery,GridStackUI,window)}(function(a,e,t){function r(t){e.GridStackDragDropPlugin.call(this,t)}return e.GridStackDragDropPlugin.registerPlugin(r),((r.prototype=Object.create(e.GridStackDragDropPlugin.prototype)).constructor=r).prototype.resizable=function(t,e){if(t=a(t),"disable"===e||"enable"===e)t.resizable(e);else if("option"===e){var r=arguments[2],i=arguments[3];t.resizable(e,r,i)}else{var n=t.data("gs-resize-handles")?t.data("gs-resize-handles"):this.grid.opts.resizable.handles;t.resizable(a.extend({},this.grid.opts.resizable,{handles:n},{start:e.start||function(){},stop:e.stop||function(){},resize:e.resize||function(){}}))}return this},r.prototype.draggable=function(t,e){return t=a(t),"disable"===e||"enable"===e?t.draggable(e):t.draggable(a.extend({},this.grid.opts.draggable,{containment:this.grid.opts.isNested&&!this.grid.opts.dragOut?this.grid.container.parent():this.grid.opts.draggable.containment||null,start:e.start||function(){},stop:e.stop||function(){},drag:e.drag||function(){}})),this},r.prototype.droppable=function(t,e){return(t=a(t)).droppable(e),this},r.prototype.isDroppable=function(t,e){return t=a(t),Boolean(t.data("droppable"))},r.prototype.on=function(t,e,r){return a(t).on(e,r),this},t.JQueryUIGridStackDragDropPlugin=r});
//# sourceMappingURL=gridstack.min.map

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,3 +0,0 @@
<!DOCTYPE html>
<!-- saved from url=(0062)chrome-extension://knjbgabkeojmfdhindppcmhhfiembkeb/index.html -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta name="viewport" content="width=device-width"><meta name="next-head-count" content="2"><link rel="preload" href="chrome-extension://knjbgabkeojmfdhindppcmhhfiembkeb/next/static/css/e1f3fc4f37b73b75.css" as="style"><link rel="stylesheet" href="chrome-extension://knjbgabkeojmfdhindppcmhhfiembkeb/next/static/css/e1f3fc4f37b73b75.css" data-n-g=""><link rel="preload" href="chrome-extension://knjbgabkeojmfdhindppcmhhfiembkeb/next/static/css/dbb3cce3661ac5c0.css" as="style"><link rel="stylesheet" href="chrome-extension://knjbgabkeojmfdhindppcmhhfiembkeb/next/static/css/dbb3cce3661ac5c0.css" data-n-p=""><link rel="preload" href="chrome-extension://knjbgabkeojmfdhindppcmhhfiembkeb/next/static/css/1e3285f6f12d0906.css" as="style"><link rel="stylesheet" href="chrome-extension://knjbgabkeojmfdhindppcmhhfiembkeb/next/static/css/1e3285f6f12d0906.css" data-n-p=""><noscript data-n-css=""></noscript><script defer="" nomodule="" src="chrome-extension://knjbgabkeojmfdhindppcmhhfiembkeb/next/static/chunks/polyfills-0d1b80a048d4787e.js"></script><script src="chrome-extension://knjbgabkeojmfdhindppcmhhfiembkeb/next/static/chunks/webpack-9416c693c650cdc9.js" defer=""></script><script src="chrome-extension://knjbgabkeojmfdhindppcmhhfiembkeb/next/static/chunks/framework-25a828f663c71176.js" defer=""></script><script src="chrome-extension://knjbgabkeojmfdhindppcmhhfiembkeb/next/static/chunks/main-7b75b77264532375.js" defer=""></script><script src="chrome-extension://knjbgabkeojmfdhindppcmhhfiembkeb/next/static/chunks/pages/_app-004a08b02ae3936b.js" defer=""></script><script src="chrome-extension://knjbgabkeojmfdhindppcmhhfiembkeb/next/static/chunks/247-687a9dcc57d11d43.js" defer=""></script><script src="chrome-extension://knjbgabkeojmfdhindppcmhhfiembkeb/next/static/chunks/457-681ed9a1ace1278b.js" defer=""></script><script src="chrome-extension://knjbgabkeojmfdhindppcmhhfiembkeb/next/static/chunks/917-2a929b26e0e3c9e3.js" defer=""></script><script src="chrome-extension://knjbgabkeojmfdhindppcmhhfiembkeb/next/static/chunks/236-81a5b0e797edebba.js" defer=""></script><script src="chrome-extension://knjbgabkeojmfdhindppcmhhfiembkeb/next/static/chunks/pages/index-39af106d4b750cab.js" defer=""></script><script src="chrome-extension://knjbgabkeojmfdhindppcmhhfiembkeb/next/static/MlRHwSEgi8a1HKafQVEF9/_buildManifest.js" defer=""></script><script src="chrome-extension://knjbgabkeojmfdhindppcmhhfiembkeb/next/static/MlRHwSEgi8a1HKafQVEF9/_ssgManifest.js" defer=""></script></head><body><div id="__next" data-reactroot=""><div class="_12u1he45d"><div class="_8jp051a ouiv4n5 _12u1he418 _12u1he436 _12u1he44e _12u1he445 _12u1he413 _12u1he481 _12u1he486 _12u1he48j _12u1he41t _12u1he454"><nav class="_12u1he44e _12u1he43z"><button class="kkxc9fv _12u1he43k _12u1he44e _12u1he418 _12u1he453 _12u1he44c kkxc9f19 kkxc9fy kkxc9fm kkxc9f1b "><svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M4.38618 4.38612C4.64978 4.12251 5.07717 4.12251 5.34077 4.38612L9.00005 8.0454L12.6593 4.38612C12.9229 4.12251 13.3503 4.12251 13.6139 4.38612C13.8775 4.64972 13.8775 5.07711 13.6139 5.34071L9.95465 8.99999L13.6139 12.6593C13.8775 12.9229 13.8775 13.3503 13.6139 13.6139C13.3503 13.8775 12.9229 13.8775 12.6593 13.6139L9.00005 9.95458L5.34077 13.6139C5.07717 13.8775 4.64978 13.8775 4.38618 13.6139C4.12258 13.3503 4.12258 12.9229 4.38618 12.6593L8.04546 8.99999L4.38618 5.34071C4.12258 5.07711 4.12258 4.64972 4.38618 4.38612Z" fill="currentColor"></path></svg></button></nav></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/","query":{},"buildId":"MlRHwSEgi8a1HKafQVEF9","nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script><next-route-announcer><p aria-live="assertive" id="__next-route-announcer__" role="alert" style="border: 0px; clip: rect(0px, 0px, 0px, 0px); height: 1px; margin: -1px; overflow: hidden; padding: 0px; position: absolute; width: 1px; white-space: nowrap; overflow-wrap: normal;"></p></next-route-announcer></body></html>

File diff suppressed because one or more lines are too long

View file

@ -1,16 +0,0 @@
/**
* Copyright OpenJS Foundation and other contributors, https://openjsf.org/
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
**/
$(function(){"localhost"!==window.location.hostname&&"127.0.0.1"!==window.location.hostname&&(document.title=document.title+" : "+window.location.hostname),RED.init({apiRootUrl:""})});

File diff suppressed because one or more lines are too long

View file

@ -1,26 +0,0 @@
(function() {
var _isIE = /MSIE \d|Trident.*rv:/.test(navigator.userAgent);
//dont load monaco if IE
if(_isIE === false) {
var userLocale = (localStorage.getItem("editor-language") + "")
var browserLocale = typeof navigator === "undefined" ? "" : (navigator.language || navigator.userLanguage || "");
var cultureDists = {
"zh-cn":"zh-hans",
"zh-tw":"zh-hant",
"ja":"ja",
"ko":"ko",
"de":"de",
"fr":"fr",
"it":"it",
"es":"es",
"ru":"ru",
"tr":"tr",
"pl":"pl",
"pt-br":"pt-br",
"cs":"cs"
};
var uiLanguage = cultureDists[userLocale.toLowerCase()] || cultureDists[browserLocale.toLowerCase()];
if(uiLanguage) document.write('<script src="vendor/monaco/dist/locale/' + uiLanguage + '.js"><\/script>');
document.write('<script src="vendor/monaco/dist/editor.js"><\/script>');
}
})();

View file

@ -1 +0,0 @@
<svg width="46.994" height="18.006" xmlns="http://www.w3.org/2000/svg"><g stroke="#d6d6d6"><g fill="#9e3131" stroke-linejoin="round" stroke-width="3.847" transform="matrix(.25848 0 0 .2614 -63.87 -108.483)"><rect x="249.04" y="435.92" width="50.294" height="22.953" ry="6.608"/><rect x="345.63" y="416.93" width="50.294" height="22.953" ry="6.608"/><rect x="376.71" y="459.01" width="50.294" height="22.953" ry="6.608"/></g><path d="M301.04 447.43c24.406.184 7.107-18.84 42.708-19.03M374.82 470.48c-46.966.538-28.989-22.664-73.619-22.944" fill="none" stroke-width="5.771" transform="matrix(.25848 0 0 .2614 -63.87 -108.483)"/></g></svg>

Before

Width:  |  Height:  |  Size: 636 B

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,41 +0,0 @@
<!--
The MIT License (MIT)
Copyright (c) 2014 Brent Jackson
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 Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
https://github.com/jxnblk/loading
-->
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="#999">
<path transform="translate(2)" d="M0 12 V20 H4 V12z">
<animate attributeName="d" values="M0 12 V20 H4 V12z; M0 4 V28 H4 V4z; M0 12 V20 H4 V12z; M0 12 V20 H4 V12z" dur="1.2s" repeatCount="indefinite" begin="0" keytimes="0;.2;.5;1" keySplines="0.2 0.2 0.4 0.8;0.2 0.6 0.4 0.8;0.2 0.8 0.4 0.8" calcMode="spline" />
</path>
<path transform="translate(8)" d="M0 12 V20 H4 V12z">
<animate attributeName="d" values="M0 12 V20 H4 V12z; M0 4 V28 H4 V4z; M0 12 V20 H4 V12z; M0 12 V20 H4 V12z" dur="1.2s" repeatCount="indefinite" begin="0.2" keytimes="0;.2;.5;1" keySplines="0.2 0.2 0.4 0.8;0.2 0.6 0.4 0.8;0.2 0.8 0.4 0.8" calcMode="spline" />
</path>
<path transform="translate(14)" d="M0 12 V20 H4 V12z">
<animate attributeName="d" values="M0 12 V20 H4 V12z; M0 4 V28 H4 V4z; M0 12 V20 H4 V12z; M0 12 V20 H4 V12z" dur="1.2s" repeatCount="indefinite" begin="0.4" keytimes="0;.2;.5;1" keySplines="0.2 0.2 0.4 0.8;0.2 0.6 0.4 0.8;0.2 0.8 0.4 0.8" calcMode="spline" />
</path>
<path transform="translate(20)" d="M0 12 V20 H4 V12z">
<animate attributeName="d" values="M0 12 V20 H4 V12z; M0 4 V28 H4 V4z; M0 12 V20 H4 V12z; M0 12 V20 H4 V12z" dur="1.2s" repeatCount="indefinite" begin="0.6" keytimes="0;.2;.5;1" keySplines="0.2 0.2 0.4 0.8;0.2 0.6 0.4 0.8;0.2 0.8 0.4 0.8" calcMode="spline" />
</path>
<path transform="translate(26)" d="M0 12 V20 H4 V12z">
<animate attributeName="d" values="M0 12 V20 H4 V12z; M0 4 V28 H4 V4z; M0 12 V20 H4 V12z; M0 12 V20 H4 V12z" dur="1.2s" repeatCount="indefinite" begin="0.8" keytimes="0;.2;.5;1" keySplines="0.2 0.2 0.4 0.8;0.2 0.6 0.4 0.8;0.2 0.8 0.4 0.8" calcMode="spline" />
</path>
</svg>

View file

@ -1,22 +0,0 @@
/*
Some classes and styles in node-red affect the monaco editor.
This stylesheet overrides those to correct some graphical glitches
*/
/* unset `margin-left: 180px` of `.controls` class for hover tips */
.monaco-editor div.phwrapper > div.controls {
margin-left: unset;
}
/* unset some styles of `code` tag (set by node-red css) for monaco hover items */
.monaco-editor .monaco-hover code {
font-size: unset;
color: unset;
margin: unset;
}
/* unset some styles of `input` tag (set by node-red css) for monaco rename box */
.monaco-editor .rename-box .rename-input {
box-sizing: unset;
height: unset;
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,126 +0,0 @@
# Changelog
## 0.6.4 (2022-12-13)
- **Chore** backend binaries are now compiled with go 1.19.4
## 0.6.3 (2021-12-03)
- **Chore** backend binaries are now compiled with go 1.19.3
- **Chore** frontend npm dependencies updated
- **Chore** added spellcheck
## 0.6.2 (2021-10-14)
[Full changelog](https://github.com/grafana/grafana-csv-datasource/compare/v0.6.1...v0.6.2)
- Fixed the broken docs and links
## 0.6.1 (2021-06-22)
[Full changelog](https://github.com/grafana/grafana-csv-datasource/compare/v0.6.0...v0.6.1)
### Bug fixes
- allow_local_mode accepts any value
## 0.6.0 (2021-06-21)
[Full changelog](https://github.com/grafana/grafana-csv-datasource/compare/v0.5.0...v0.6.0)
### Enhancements
- Disable local mode by default. To use local mode, allow it in your grafana.ini:
```ini
[plugin.marcusolsson-csv-datasource]
allow_local_mode = true
```
## 0.5.0 (2021-03-21)
[Full changelog](https://github.com/grafana/grafana-csv-datasource/compare/v0.4.1...v0.5.0)
### Enhancements
- Improved query editor with support for HTTP params, headers, and body.
- Add support for relative paths ([#69](https://github.com/grafana/grafana-csv-datasource/issues/69))
- Add support for decimal separators ([#43](https://github.com/grafana/grafana-csv-datasource/issues/43))
- **EXPERIMENTAL:** Add support for regular expressions in field names ([#68](https://github.com/grafana/grafana-csv-datasource/issues/68)). Must be enabled in the Experimental tab in the query editor.
### Bug fixes
- **BREAKING:** Remove default Accept header ([#56](https://github.com/grafana/grafana-csv-datasource/issues/56)). If your data source expects `Accept: text/csv` on the request, you now need to add it yourself in the Params tab.
## 0.4.1 (2021-03-21)
[Full changelog](https://github.com/grafana/grafana-csv-datasource/compare/v0.4.0...v0.4.1)
### Bug fixes
- Wrong data format is detected
## 0.4.0 (2021-03-21)
[Full changelog](https://github.com/grafana/grafana-csv-datasource/compare/v0.3.3...v0.4.0)
### Enhancements
- Add support for annotation queries
- Add support for variables queries ([#30](https://github.com/grafana/grafana-csv-datasource/issues/30))
- Upgrade @grafana/\* packages
- Upgrade Grafana Go SDK
## 0.3.3 (2021-02-05)
[Full changelog](https://github.com/grafana/grafana-csv-datasource/compare/v0.3.2...v0.3.3)
### Bug fixes
- Default to HTTP if no storage type has been set
## 0.3.2 (2021-02-03)
[Full changelog](https://github.com/grafana/grafana-csv-datasource/compare/v0.3.1...v0.3.2)
### Bug fixes
- Allow lazy quotes ([#17](https://github.com/grafana/grafana-csv-datasource/issues/17))
## 0.3.1
[Full changelog](https://github.com/grafana/grafana-csv-datasource/compare/v0.3.0...v0.3.1)
### Enhancements
- Update grafana-plugin-sdk-go to v0.83.0
### Bug fixes
- Ignore empty custom HTTP headers
- Fix duplicate JSON tag for TLS skip verify
## 0.3.0
[Full changelog](https://github.com/grafana/grafana-csv-datasource/compare/v0.2.0...v0.3.0)
### Enhancements
- Add ARM support ([#13](https://github.com/grafana/grafana-csv-datasource/issues/13))
### Bug fixes
- Windows: Paths with backslashes don't work ([#14](https://github.com/grafana/grafana-csv-datasource/issues/14))
## 0.2.0
[Full changelog](https://github.com/grafana/grafana-csv-datasource/compare/v0.1.0...v0.2.0)
### Enhancements
- Add support for local CSV files ([#6](https://github.com/grafana/grafana-csv-datasource/issues/6))
- Add a default Accept header for text/csv
## 0.1.0
Initial release. Not fit for production use.

View file

@ -1,201 +0,0 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "{}"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2022 Grafana Labs
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View file

@ -1,38 +0,0 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
{
"manifestVersion": "2.0.0",
"signatureType": "community",
"signedByOrg": "marcusolsson",
"signedByOrgName": "Marcus Olsson",
"plugin": "marcusolsson-csv-datasource",
"version": "0.6.3",
"time": 1670932858740,
"keyId": "7e4d0c6a708866e7",
"files": {
"CHANGELOG.md": "6d89b3325adfe2067a5ccde632bc0197416a6d99bb89367dd5b1232af8dcc19f",
"LICENSE": "ee4141d02acd9ce8d5ec0b3b79fc286a7e2b2c430f8b58bc6261446c0dd9b23c",
"README.md": "ea7dbb5d4897d88a3c6da91bf38198ae4c64b7b4ea8f4775aef2cd36c17d4f5c",
"gpx_csv-datasource_linux_amd64": "f7f5377cf081dd2d9e7f430961e2a4966602e8a9a977ea7134f1d5dbcb225f50",
"img/dark.png": "9e0d577c29d983d7c258ea5704ecdc3e574ff3d16cb9762e9b7fd06a13630daa",
"img/light.png": "e71042db587b73f3b6f5e90df09b9d74213060632a3b22250f483a55c752e287",
"img/logo.svg": "0bcb07e8f33b833bc4e5ac340feb0997a71dec4c0d8f497feaac775823bbb091",
"module.js": "8227c9542931ba495d44eb41892bc02353a393210cdcebeb78469ddda2881c53",
"module.js.LICENSE.txt": "347dbeed2228865f29a62b3b23a7c78b97d65d0fe6842c394dd2c9af2b622204",
"module.js.map": "6ea7b34a636260bc60386d1a50c07906039a5b35ad748bc4c63c2255d0765543",
"plugin.json": "cd567eeb6720a4b38687247f88022e69fff45789942455697889526c8a9e4c9e"
}
}
-----BEGIN PGP SIGNATURE-----
Version: OpenPGP.js v4.10.10
Comment: https://openpgpjs.org
wrcEARMKAAYFAmOYaXsAIQkQfk0ManCIZucWIQTzOyW2kQdOhGNlcPN+TQxq
cIhm568wAgjrXk/7S8MfIJEuvkjczmQ9h22LxwlKMxMNAWoGv/U7/g48Nexy
gDuPrFIZGALfrFKOUwUCpkFIbLh6YjG3xAHxmwIFF0fD4dMccyv98W8Hpy50
dcOt70EG6ap8zs9QakcvIaNN3JLeoj8BEc0lwutxIHZdZBDEfsL6Ebd6zoY7
hgvDQzU=
=91CK
-----END PGP SIGNATURE-----

View file

@ -1,17 +0,0 @@
# CSV data source for Grafana
[![Build](https://github.com/grafana/grafana-csv-datasource/workflows/CI/badge.svg)](https://github.com/grafana/grafana-csv-datasource/actions?query=workflow%3A%22CI%22)
[![Release](https://github.com/grafana/grafana-csv-datasource/workflows/Release/badge.svg)](https://github.com/grafana/grafana-csv-datasource/actions?query=workflow%3ARelease)
[![Marketplace](https://img.shields.io/badge/dynamic/json?logo=grafana&color=F47A20&label=marketplace&prefix=v&query=%24.items%5B%3F%28%40.slug%20%3D%3D%20%22marcusolsson-csv-datasource%22%29%5D.version&url=https%3A%2F%2Fgrafana.com%2Fapi%2Fplugins)](https://grafana.com/grafana/plugins/marcusolsson-csv-datasource)
[![Downloads](https://img.shields.io/badge/dynamic/json?logo=grafana&color=F47A20&label=downloads&query=%24.items%5B%3F%28%40.slug%20%3D%3D%20%22marcusolsson-csv-datasource%22%29%5D.downloads&url=https%3A%2F%2Fgrafana.com%2Fapi%2Fplugins)](https://grafana.com/grafana/plugins/marcusolsson-csv-datasource)
[![License](https://img.shields.io/github/license/grafana/grafana-csv-datasource)](LICENSE)
> **Maintenance**: Now the plugin is being maintained by Grafana Labs. Big thanks to [Marcus Olsson](https://twitter.com/marcusolsson) for the awesome work!
A data source for loading CSV data into [Grafana](https://grafana.com).
![Screenshot](https://github.com/grafana/grafana-csv-datasource/raw/main/src/img/dark.png)
## Documentation
Full documentation for the plugin is available on the [website](https://grafana.github.io/grafana-csv-datasource).

Binary file not shown.

Before

Width:  |  Height:  |  Size: 333 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 330 KiB

View file

@ -1 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 460 460" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><circle cx="229.735" cy="229.735" r="183.477" style="fill:#3865ab;"/><path d="M229.735,-0c126.794,-0 229.735,102.941 229.735,229.735c0,126.794 -102.941,229.735 -229.735,229.735c-126.794,0 -229.735,-102.941 -229.735,-229.735c-0,-126.794 102.941,-229.735 229.735,-229.735Zm0,22.974c114.115,-0 206.762,92.646 206.762,206.761c-0,114.115 -92.647,206.762 -206.762,206.762c-114.115,-0 -206.761,-92.647 -206.761,-206.762c-0,-114.115 92.646,-206.761 206.761,-206.761Z" style="fill:#84aff1;"/><path d="M257.412,121.205c4.1,4.342 6.15,12.784 6.15,25.325l0,1.448c0,5.788 -0.181,10.069 -0.543,12.843c-0.361,2.774 -1.628,6.09 -3.798,9.949c-3.618,6.995 -12.723,10.492 -27.315,10.492c-14.592,-0 -24.24,-2.291 -28.943,-6.874c-4.703,-4.583 -7.055,-13.266 -7.055,-26.049l0,-1.447c0,-5.547 0.181,-9.768 0.543,-12.662c0.362,-2.895 1.507,-6.271 3.437,-10.13c3.618,-6.995 12.723,-10.492 27.315,-10.492c14.592,-0 24.661,2.532 30.209,7.597Zm-0,115.41c4.1,4.1 6.15,12.542 6.15,25.325l0,1.447c0,26.531 -6.994,49.203 -20.984,68.016c-11.335,15.195 -24.601,22.792 -39.796,22.792c-1.688,0 -3.196,-1.266 -4.522,-3.798c-1.327,-2.533 -1.99,-5.849 -1.99,-9.949c-0,-4.101 0.543,-7.296 1.628,-9.588c1.085,-2.291 2.472,-3.738 4.16,-4.341c1.689,-0.603 3.377,-1.568 5.065,-2.894c1.689,-1.327 4.161,-4.583 7.417,-9.769c3.256,-5.185 5.125,-11.034 5.608,-17.546c-7.96,-0.965 -13.989,-3.437 -18.09,-7.417c-4.1,-3.979 -6.15,-12.361 -6.15,-25.144l0,-1.447c0,-5.547 0.181,-9.768 0.543,-12.663c0.362,-2.894 1.507,-6.15 3.437,-9.768c3.618,-7.236 12.723,-10.853 27.315,-10.853c14.592,-0 24.661,2.532 30.209,7.597Z" style="fill:url(#_Linear1);fill-rule:nonzero;"/><defs><linearGradient id="_Linear1" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1.38182e-14,260.088,-225.669,1.59258e-14,299.698,88.1174)"><stop offset="0" style="stop-color:#f2cc0c;stop-opacity:1"/><stop offset="1" style="stop-color:#ff9830;stop-opacity:1"/></linearGradient></defs></svg>

Before

Width:  |  Height:  |  Size: 2.3 KiB

File diff suppressed because one or more lines are too long

View file

@ -1,11 +0,0 @@
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
//! Copyright (c) JS Foundation and other contributors
//! github.com/moment/moment-timezone
//! license : MIT
//! moment-timezone.js
//! version : 0.5.38

File diff suppressed because one or more lines are too long

View file

@ -1,64 +0,0 @@
{
"$schema": "https://github.com/grafana/grafana/raw/main/docs/sources/developers/plugins/plugin.schema.json",
"alerting": true,
"annotations": true,
"backend": true,
"dependencies": {
"grafanaDependency": "\u003e=8.4.7",
"grafanaVersion": "8.4.7",
"plugins": []
},
"executable": "gpx_csv-datasource",
"id": "marcusolsson-csv-datasource",
"info": {
"author": {
"name": "Grafana Labs",
"url": "https://grafana.com"
},
"build": {
"time": 1670932852698,
"repo": "https://github.com/grafana/grafana-csv-datasource",
"branch": "main",
"hash": "29675413b7a78c36ce2bea100a4d733a0eb05418",
"build": 17
},
"description": "A data source for loading CSV data",
"keywords": [
"csv"
],
"links": [
{
"name": "Documentation",
"url": "https://grafana.github.io/grafana-csv-datasource"
},
{
"name": "Website",
"url": "https://github.com/grafana/grafana-csv-datasource"
},
{
"name": "License",
"url": "https://github.com/grafana/grafana-csv-datasource/blob/main/LICENSE"
}
],
"logos": {
"large": "img/logo.svg",
"small": "img/logo.svg"
},
"screenshots": [
{
"name": "Explore (Dark)",
"path": "img/dark.png"
},
{
"name": "Explore (Light)",
"path": "img/light.png"
}
],
"updated": "2022-12-13",
"version": "0.6.3"
},
"logs": true,
"metrics": true,
"name": "CSV",
"type": "datasource"
}

Some files were not shown because too many files have changed in this diff Show more