Czy wolisz polską wersję strony elektroda?
Nie, dziękuję Przekieruj mnie tamQuote:
6 [BTN] Instant touch reaction instead of waiting for release (aka SetOption 13)
p.kaczmarek2 wrote:Hello, have you checked our docs?
https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/flags.mdQuote:6 [BTN] Instant touch reaction instead of waiting for release (aka SetOption 13)
as per RSSI, I can add it to HA discovery if you want. Do you know what would be the HA yaml type for that?
p.kaczmarek2 wrote:Yes, it seems it should be easy to add that to the HA discovery. The unit here is dBm. I will try to include it in the tomorrows update.
int WifiGetRssiAsQuality(int rssi)
{
int quality = 0;
if (rssi <= -100) {
quality = 0;
} else if (rssi >= -50) {
quality = 100;
} else {
quality = 2 * (rssi + 100);
}
return quality;
}mdi:access-pointmdi:wifip.kaczmarek2 wrote:Setting the icon does not work for me. Maybe I got JSON wrong:
Still, with this code:
Code: c Expand Select all Copy to clipboard
case HASS_RSSI:
cJSON_AddStringToObject(info->root, "dev_cla", "signal_strength");
cJSON_AddStringToObject(info->root, "stat_t", "~/rssi");
cJSON_AddStringToObject(info->root, "unit_of_meas", "dBm");
//cJSON_AddStringToObject(info->root, "icon_template", "mdi:access-point");
break;
I got that result:
Ignore -1 value, it's a placeholder for simulator:
p.kaczmarek2 wrote:Hello @erdeidominik1999, as far as I remember, there are two options:
1. In safe mode, you should get a "do unsafe boot" button on the http GUI, but I am not sure.
2. In safe mode, you can use this command:
p.kaczmarek2 wrote:You need to have a network connection via (for example) cable at the same time, and it should work, I think.... if it's not working, let me know, there might be a bug that I need to fix
int WifiGetRssiAsQuality(int rssi)
{
int quality = 0;
if (rssi <= -100) {
quality = 0;
} else if (rssi >= -50) {
quality = 100;
} else {
quality = 2 * (rssi + 100);
}
return quality;
}TL;DR: OpenBeken already pushes Wi-Fi RSSI (-30 to -100 dBm) every ~30 s via MQTT; “just tick the ‘broadcast self-state’ box first” [Elektroda, p.kaczmarek2, post #20773421] Auto-discovery works in Home Assistant when you set device_class: "signal_strength". Why it matters: Native metrics let you spot connectivity drops before automations fail.
• MQTT topic:
startDriver MQTT.
The firmware then publishes RSSI automatically every cycle [Elektroda, p.kaczmarek2, post #20773421]<device_name>/rssi under the configured base topic. Example: obk_plug/rssi [OpenBeken Docs, 2023].device_class: signal_strength, unit_of_meas: dBm, and the topic pointer. HA creates the sensor instantly [Elektroda, p.kaczmarek2, post #20776177]2*(RSSI+100) and request the dev branch that exposes /rssi_percent via discovery [Elektroda, erdeidominik1999, post #20783688]setFlag 6 1 then save. This removes the “wait for release” delay [Elektroda, p.kaczmarek2, post #20775464]device_class: signal_strength is present, HA uses its built-in antenna icon automatically [Elektroda, ShellDude, post #20779543]startFlashSafe 0 from the minimal command page, then upload a corrected autoexec and reboot [Elektroda, p.kaczmarek2, post #20780542]