Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ALR LoRa firmware for home assistant enabled AUTO DISCOVERY
#1
here is KinCony firmware for ALR LoRa board - ALR. it support control relay , monitor DS18B20 temperature and 4 channel analog input, 1 channel digital input state in home assistant by MQTT. You not need config any code for home assistant yaml. Because we have design firmware enabled MQTT auto discovery for home assistant.
   

here are two ALR board.  one work as RECEIVER(gateway), another work as TRANSMIT(read sensor state, control relay), just set DIP switch on PCB, let two board same DIP state, so that they will communication with each other, easy!

   

RECEIVER(gateway) board's LCD displayer will show MQTT broker connection state, LoRa signal value and how many LoRa package have received.
TRANSMIT board's LCD displayer will show DS18B20 temperature value,  LoRa signal value and how many LoRa package have sent.

   

here is two firmware BIN file for different board:
for RECEIVER board:
.zip   ALR-RECEIVER-20240904.ino.merged.zip (Size: 614.04 KB / Downloads: 87)
for TRANSMIT board: 
.zip   ALR-TRANSMIT_20240904.ino.merged.zip (Size: 606.17 KB / Downloads: 65)

download firmware by ESP32 DOWNLOAD TOOL:
   
chose ESP32-S3 and USB mode.

   
chose RECEIVER board's firmware and set address to 0x0

   
chose TRANSMIT board's firmware and set address to 0x0

set router's wifi ssid, password, mqtt broker ip, mqtt port, mqtt username, mqtt password for RECEIVER board via USB-C cable.

config json command:
{
  "wifi_name":"KinCony",
  "wifi_psw":"a12345678",
  "mqtt_ip":"192.168.3.124",
  "mqtt_port":"1883",
  "mqtt_user":"mqtt",
  "mqtt_psw":"123"
}

   
serial port debug tool download:

.zip   UartAssist.zip (Size: 468.4 KB / Downloads: 62)

after config complete and reboot. you can see KinCony ALR board is showed on home assistant DEVICE list:
   

you can add these entities to home assistant dashboard.
   
Reply
#2
Hello, I have problems to write code and now I need to test original firmware.
While uploading my installed code is not removed.
The flash tools says finish, but I hear the my old code (which reboots ever second) was not overwritten.
-----------------------
In the flasher cmd windows I see following prompt:
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
NO XMC flash detected!
SPI_BOOT_CRYPT_CNT 0
SECURE_BOOT_EN False

is stub and send flash finish
-------------------------------
it detects following info:
AP: DCDA0C7B7EE5 STA: DCDA0C7B7EE4
BT: DCDA0C7B7EE6 ETHERNET:
---------------------

The display keeps dark.
Any Idea what I should do?

Thanks, Martin
Reply
#3
All fine. I found problem..I did not check mark the box of the bin file :-)
Reply
#4
ok
Reply
#5
(09-05-2024, 12:42 AM)admin Wrote: here is KinCony firmware for ALR LoRa board - ALR. it support control relay , monitor DS18B20 temperature and 4 channel analog input, 1 channel digital input state in home assistant by MQTT. You not need config any code for home assistant yaml. Because we have design firmware enabled MQTT auto discovery for home assistant.


here are two ALR board.  one work as RECEIVER(gateway), another work as TRANSMIT(read sensor state, control relay), just set DIP switch on PCB, let two board same DIP state, so that they will communication with each other, easy!



RECEIVER(gateway) board's LCD displayer will show MQTT broker connection state, LoRa signal value and how many LoRa package have received.
TRANSMIT board's LCD displayer will show DS18B20 temperature value,  LoRa signal value and how many LoRa package have sent.



here is two firmware BIN file for different board:
for RECEIVER board:
for TRANSMIT board: 

download firmware by ESP32 DOWNLOAD TOOL:

chose ESP32-S3 and USB mode.


chose RECEIVER board's firmware and set address to 0x0


chose TRANSMIT board's firmware and set address to 0x0

set router's wifi ssid, password, mqtt broker ip, mqtt port, mqtt username, mqtt password for RECEIVER board via USB-C cable.

config json command:
{
  "wifi_name":"KinCony",
  "wifi_psw":"a12345678",
  "mqtt_ip":"192.168.3.124",
  "mqtt_port":"1883",
  "mqtt_user":"mqtt",
  "mqtt_psw":"123"
}


serial port debug tool download:


after config complete and reboot. you can see KinCony ALR board is showed on home assistant DEVICE list:


you can add these entities to home assistant dashboard.
I have followed the instructions posted above and found them to be pretty easy to follow be connecting a few dots in places where it was unclear to me, I'm a novice here, so there are gaps in my knowledge that can be challenging to overcome at times. Ultimately, I believe I have the UART Assist working with the board after using the ESP download tool to load the reciever firmware. When I connect the UART Assist at 921600 baud and match the other settings found in the forum, I get a "begin LoRa Initializing OK!" message. Then I modify the Wifi and MQTT settings and click Send, but I get no confirmation, should I be getting something back or should the board display itself show something other than "KinCony"?
Reply
#6
Am I able to use other LoRa enabled boards for transmitting and only use this one as the reciever and mqtt gateway to connect to Home Assistant? I was hoping to use smaller boards such as the Heltec ESP32 LoRa V3 Development Board with 915 MHz Antenna Integrated WiFi Bluetooth SX1262 CP2102. I had assumed that they would communicate just fine so long as they have the same LoRa frequency, but maybe that is not the case.
Reply
#7
Do you have connected with DS18B20 sensor?
Reply
#8
(01-05-2025, 01:23 AM)admin Wrote: Do you have connected with DS18B20 sensor?

No, I have no sensors connected to the board. I do not have a DS18B20 currently, but I could connect any number of I2C sensor boards.

I only have one of these KinCony Gateways, but I was hoping to use one of these on each of my installations of Home Assistant as the master gateway to recieve LoRa communication from other LoRa boards like the one I listed above.

I am also having issues with my internet, so I will work on that first and see if it helps.

My appologies for asking questions that are likely already clearly understood by those who are famililar with this type of technology, but my expertice is not in the area of software or computer science. I hope any questions I ask, and their answers, can be helpful to other novices who are struggling to figure this stuff out.
I do not have the temperature sensor that can directly plug into the Gateway and I am currently located in Ecuador, where I have limited access to purchase it or have it shipped in. If I want to get a sensor hooked up to my LoRa reciever board to test its function with Home Assistant, can I hook it up to Arduino IDE and upload a sketch with programming for one of the I2C boareds, BME680, that I do have on hand? If I do this, will it overwrite any portion of the firmware (I don't think so, but want to confirm) or the WiFi credentials I loaded usingt he UART Assistant?
Reply
#9
(01-05-2025, 01:23 AM)admin Wrote: Do you have connected with DS18B20 sensor?

No, I have no sensors connected to the board. I do not have a DS18B20 currently, but I could connect any number of I2C sensor boards.

I only have one of these KinCony Gateways, but I was hoping to use one of these on each of my installations of Home Assistant as the master gateway to recieve LoRa communication from other LoRa boards like the one I listed above.

I am also having issues with my internet, so I will work on that first and see if it helps.

My appologies for asking questions that are likely already clearly understood by those who are famililar with this type of technology, but my expertice is not in the area of software or computer science. I hope any questions I ask, and their answers, can be helpful to other novices who are struggling to figure this stuff out.
I do not have the temperature sensor that can directly plug into the Gateway and I am currently located in Ecuador, where I have limited access to purchase it or have it shipped in. If I want to get a sensor hooked up to my LoRa reciever board to test its function with Home Assistant, can I hook it up to Arduino IDE and upload a sketch with programming for one of the I2C boareds, BME680, that I do have on hand? If I do this, will it overwrite any portion of the firmware (I don't think so, but want to confirm) or the WiFi credentials I loaded usingt he UART Assistant?

I wanted to add a note that I have checked on my WiFi router and the LoRa board is not seen as an attached device after uploading the WiFi network id and password using UART Assistant. I assume that it should attach to the network even if it does not have LoRa data to forward via MQTT to HA.
Reply
#10
because our firmware design for read DS18B20, so if you connect with DS18B20 as our photo, the LCD will show the value.
Reply


Forum Jump:


Users browsing this thread: