I have a usecase for the kc868-a6 that requires the bluetooth to work with esphome. As soon as I enable anything bluetooth related I get fatal errors and the wifi never connects to the network.
This is the code I am trying to use that appears to corrupts the esp32.
substitutions:
name: test
mac_address: C8:47:8C:E1:E2:E2
switch:
- platform: ble_client
ble_client_id: client0
name: "enable bluetooth connection"
Any thoughts on why the esp32 does not like the bluetooth settings? After removing the bluetooth settings and reflashing I am able to connect to the controller again.
Thanks in advance.
Andy
I've defined the digital inputs and switches as in the example and also added a DS18B20 temp sensor to the I2C. But as soon as I add in yaml the Dallas configuration, the update_interval toggles the switches on and off at the interval set in the update_interval.
I saw that the I2C port is the same as the Dallas sensor but I don't know how I can connect them in a different way.
Good afternoon.
In my project, a water level sensor and a temperature sensor are connected to the KC868 A4 controller.
Please tell me which program is better to monitor the readings from the sensor. I tried to connect to Homekit, there were no problems with the temperature sensor, but I didn’t understand how to make the status bar for filling the tank with water.
Maybe tell me how best to implement control from the phone for these sensors through the 4
A4 controller?
Hello, my name is Samuel Adranyi,
I am an IoT enthusiast and content creator. I have been following your products for some time and would like to request some free samples. This is my youtube channel where I do a lot of IoT stuff and also community engagement: https://www.youtube.com/live/9bGSxDGeS5c?feature=share
I am also a Microsoft Most Valuable Professional (MVP) in the Azure and IoT Category; you can find my profile here: https://mvp.microsoft.com/en-us/PublicProfile/5003737
I want to create content around your products and educational projects for the IoT community here in Ghana.
I want to sample the KC868-A4 Bundle E. I welcome any other device or product you want me to test or create a project.
Thank you, and awaiting your kind response.
Next program works correctly when I use only one PCF8574 (adress: 0x22; I2C pins: 4,15) that controls DI inputs on the board:
1.png
But it doesn't work when I uncomment code in red frames, trying to add another PCF8574 (adress: 0x24; I2C pins: 4,15) that controls DO outputs on the board.
2.png
Correct code for using digital input PCF8574 without errors "1.png"
Code:
// Library: PCF8574_Library by RENZO MISCHIANTI
// https://mischianti.org/2019/01/02/pcf8574-i2c-digital-i-o-expander-fast-easy-usage/
#include "Arduino.h"
#include "PCF8574.h"
// Set i2c address
PCF8574 pcf8574i(0x22,4,15);
// PCF8574 pcf8574(0x24,4,15);
I bought this AM2120 Temperature and Humidity Sensor and I am not able to get it to read input sensor on my ESPHOME. I have bought AM2301 and it works fine with the same ESPHOME code as below:
- platform: dht pin: 33 model: AM2302 ## New Sensor AM2120 NOT WORKING - NA reading temperature: name: "S4-Temp" accuracy_decimals: 1 humidity: name: "S4-Humidity" accuracy_decimals: 1 update_interval: 30s
I am having difficulty for coding my script, I would like to make a GSM relay which activates the GPIO 15 relay upon the module receipt a call ! but I cannot do it can you help me?
I think my problem is from the command of call detection.
Thanks
Code:
#include <SoftwareSerial.h>
// Create software serial object to communicate with A6
SoftwareSerial mySerial(13, 34); // A6 Tx & Rx is connected to Arduino #3 & #2
int relayPin = 15; // GPIO 15 connected to the relay
void setup()
{
// Begin serial communication with Arduino and Arduino IDE (Serial Monitor)
Serial.begin(115200);
// Begin serial communication with Arduino and A6
mySerial.begin(115200);
Serial.println("Initializing...");
pinMode(relayPin, OUTPUT); // Set the relay pin as an output
digitalWrite(relayPin, LOW); // Initialize the relay as OFF
}
void loop()
{
updateSerial();
checkCall();
}
void updateSerial()
{
delay(500);
while (Serial.available())
{
mySerial.write(Serial.read()); // Forward what Serial received to Software Serial Port
}
while(mySerial.available())
{
Serial.write(mySerial.read()); // Forward what Software Serial received to Serial Port
}
}
void checkCall()
{
if (mySerial.available())
{
String response = mySerial.readString();
if (response.indexOf("+CLCC: 1,1,2,4,0") != -1) // Check if "+CLCC: 1,1,2,4,0" is present in the response
{
activateRelay();
}
}
}
void activateRelay()
{
digitalWrite(relayPin, HIGH); // Turn ON the relay
delay(5000); // Keep the relay ON for 5 seconds
digitalWrite(relayPin, LOW); // Turn OFF the relay
}
try:
# Open the RS485 serial port
ser = serial.Serial(
port=rs485_port,
baudrate=rs485_baud_rate,
parity=rs485_parity,
stopbits=rs485_stop_bits,
bytesize=rs485_data_bits,
timeout=1
)
# Send a command via RS485 in RTU mode
command = [0x64, 0x01, 0x02, 0x20, 0x00, 0x00, 0x01, 0x43, 0xCA] # Modify the command in hexadecimal format
crc = calculate_crc(command)
command.append(crc & 0xFF) # Low byte
command.append((crc >> 8) & 0xFF) # High byte
ser.write(bytes(command))
# Read the RS485 response
response_rs485 = ser.readline()
hex_response_rs485 = ' '.join(hex(byte) for byte in response_rs485)
print("RS485 Response:", hex_response_rs485)
# Close the RS485 serial port
ser.close()
except serial.SerialException as e:
print("Error opening or accessing the serial port:", str(e))
This is the code I wrote. The checksum passes, and everything else is fine. But when I run the code, it doesn't reflect any changes on the Inverter/ Motor. Please help.
The connections on the RS485 can be found in the images attached below.
Dobrý den,
chtěl bych získat zkušební bezplatný vzorek ovladače KC868-A4. Pracuji jako elektrikář v automobilovém průmyslu nákladních automobilů, kde jsme také prodejci značek TATRA Trucks CZECH a dále speciální nástavby na přání, kde jsme museli požádat o jinou firmu o vývoj hardwaru a pro daný typ zákazníka. Díky Vašemu ovladači bychom tyto věci zvládli sami a určitě bychom dokázali další udělat na nákup více kusů a vašich zařízení. Velmi bych ocenil vzorek zdarma.