openevse_esp32_firmware icon indicating copy to clipboard operation
openevse_esp32_firmware copied to clipboard

lora: Initial work at LoRaWAN support. Empty announcements.

Open kallisti5 opened this issue 4 years ago • 3 comments

This has been greatly simplified using a common LoRa library, and removing the Heltec code.

  1. If enabled for the board, LoRa is setup using the network credentials hard coded within the code (these can be pulled via the OpenEVSE storage, but just not there yet)
  2. If a LoRaWAN gateway is in range (a few miles), the device will begin to announce the OpenEVSE status. (the status is empty at the moment, need to pull from OpenEVSE still. The status information needs packed into as small a datastructure as possible)
  3. The LoRaWAN network (in my case The Things Network) will receive the data, translate it, and pass it onto any configured integrations the user specifies. (aka, Plugshare??? :-) )

kallisti5 avatar Apr 21 '20 14:04 kallisti5

Testing has been limited thus far, without a spare OpenEVSE module testing is tough since the ESP32 enters a "Unable to communicate to OpenEVSE" loop. The code was taken from another (working) project I have.

All code remains inactive however unless you build for the heltec LoRa board.

kallisti5 avatar Apr 21 '20 14:04 kallisti5

Oh.. beyond The Things Network, this code could be used to connect to any other LoRaWAN network (915 Mhz in the US). one option is Helium. https://developer.helium.com/console/cli

Not sure of the options there, however there are a ton of Helium devices out there today. https://network.helium.com/coverage

kallisti5 avatar Apr 21 '20 18:04 kallisti5

Ok. The latest patch has a bunch of fixes and actually pushes useful data over LoRaWAN :-)

The only change which is active when building non-lora enabled firmware is the addition of the "create_rapi_packed" function to input.cpp. This takes important values and packs them into a bunch of uint8's to be broadcast over LoRa. If a value could be reasonably > 255, I added a conversion factor (voltage, elapsed, temp)

Keep in mind this is all still untested. I need to short circut the OpenEVSE communication tests to try and fake the ESP32 to send some data over LoRaWAN.

kallisti5 avatar Apr 25 '20 13:04 kallisti5