Hello! Is there any way to report the wifi signal to home assistant?
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-point
mdi:wifi
p.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;
}