NOTE: This will probably only work for Radius customers in the greater Copenhagen area. You need to write to kundesupport@radiuselnet.dk to get your decryption keys. You should get 2 keys. If you only get 1, write back and ask them for 2.
IMPORTANT NOTE: This does not work yet. The software serial reads the data correctly, but the decryption fails for some reason.
This sketch was made for a Heltec CubeCell (HTCC-AB01), based on the ASR650x MCU. See Heltec Docs
- Install support for the CubeCell Boards: https://github.com/HelTecAutomation/ASR650x-Arduino/blob/master/InstallGuide/debian_ubuntu.md
- Use the
secrets.h.TEMPLATE
to create your ownsecrets.h
file with your meter and device info. - In the arduino IDE:
- Select the CubeCell Board (HTCC-AB01)
- Select your frequency plan (Probably EU868)
- Set RGB to "Deactivate"
- Set NETMODE to "OTAA"
- Flash your code to the board.
- Connect the antenna to the board.
- Connect a small lipo battery to the battery socket.
- Connect pins:
- Kamstrup upper left <-> CubeCell
GND
- Kamstrup lower left <-> CubeCell
VIN
- Kamstrup upper center <-> CubeCell
0
- Kamstrup upper left <-> CubeCell
If working, the LED should:
- Blink white three times on start-up
- Blink green when decrypt succeeds, once per successful read.
- Blink red once when decryption fails.
- Blink blue 3 times when sending to TTN.
- Blink red 3 times if no valid frames were read before timeout.
- Make the KamstrupSerial into an object instead of a bunch of standalone functions.
- Clean up the code...
Adapted from Claustn to use Lora,TTN instead of WiFi,MQTT.
Claustn adapted his code from Asbjoern.