Hi
This started as a question but ended as a series of updates & tests that might help others.
If you can’t find the link to install the Deck Configurator in Home Assistant it can be found below:
https://my.home-assistant.io/redirect/supervisor_addon/?repository_url=https%3A%2F%2Fgithub.com%2FLocalBytes%2Fhass-addons&addon=f0d5d1e0_localdeck-configurator
First post:
I run HAOS and it is up to date patch wise, running 2024.9.1. My LocalDeck has just arrived today, which I’ve added to my network and ESPHome has also found the device.
I installed the LocalDeck configurator, as per the online tutorial, but when I click on either the “LocalDeck configurator” sidebar in the configurator or the “OPEN WEB UI” in the add ons I receive a 500 error message, as can be seen below:
Error: [GET] “/api/hassio_ingress/hx-truncated-api/index-files”: 500 Internal Server Error
I’ve restarted HA and I’ve also rebooted the VM HA is running on without luck. The add-in says it is running and it is taking 0% CPU and 0.2% RAM. I I stop the addin and click on the “LocalDeck configurator” sidebar link HA correctly says the add-on isn’t running and starts it for me, but I just get the same 500 error. I’ve cleared my cache, tried a different browser etc too but without any luck.
In the LocalDeck HA logs if I restart the LocalDeck software I see a few messages like the one below, which might be related to my issue:
[nuxt] [request error] [unhandled] [500] ENOENT: no such file or directory, scandir ‘/homeassistant/esphome’
[nuxt] [request error] [unhandled] [500] ENOENT: no such file or directory, scandir ‘/homeassistant/esphome’
I do not have ESPHome installed on the same VM as HAOS, could this be related? ESPHome devices communicate with HA ok though, including Local Bytes plugs.
Edit:
I’ve found if I create a directory called “/homeassistant/esphome” on HAOS I can get past the 500 error above when I click the “LocalDeck configurator” sidebar. I now get a message saying “LocalDeck Files” but with nothing else on the page. I’ve re-installed LocalDeck but this makes no difference. I’m feeling frustrated tbh, this could be a good product but where is the documentation?
Edit:
A bit more progress made. I took the LocalDeck’s yaml file from the VM running ESPHome (which, in my case, came from the venv directory in the user’s home folder, but this will be different for others). I put the yaml file on the VM running HAOS, in the directory I created earlier, ‘/homeassistant/esphome’. The LocalDeck configurator allows me to open the yaml file and create buttons etc. I copied the updated yaml file to the VM running ESPHome, compiled it and sent to the LocalDeck. The LoclaDeck connects, allows me to ping it 4 times and then does nothing & doesn’t connect to HA. I’ve used ESPHome and the USB interface to put a ‘blank’ LocalDeck config back on, which connects to HA ok and allows continuous pinging.
Another note, is that in the LocalBytes configurator, if the reset button is pressed to provide a ‘default’ config, the yaml file is set to default. However the buttons that have been setup before reset was pressed still exist on the configurator’s display. Stopping and restarting the configurator re-loads the default yaml file, which I think should happen when reset is pressed anyway.
I’ve been using the LocalBytes supplied USB PSU, which has a tendency to fall out of the LocalDeck. I had to go through a few USB data cables to find one that would fit the LocalDeck’s side USBC port, and even then it isn’t a good fit. The rear port is ok, but I want to use the side port.
Edit:
I’ve used the configurator to just control 1 HA device, copied to my ESPHome server, compiled and is now working correctly on the Deck. Selecting devices in the configurator device dropdown doesn’t always work, when a device is selected the device isn’t always populated, meaning I had to manually enter by looking up in HA. The lack of documentation is, for me, damaging the product, and the poorly fitting USB connection needs addressing.
Edit:
If I configure 1 HA device in the configurator I can control the device ok. If I add a few devices, ironically all of which are LocalBytes ESPHome plugs, the code generated by the configurator compiles and uploads to the deck ok but the deck can only be pinged for 20 pings or so and then stops working. The ip side of the deck isn’t up long enough to get any logs. If I press buttons on the deck the led will flash but the unit doesn’t connect to HA. All devices I’ve added are “found” in HA but the deck configurator, and I’ve not changed any tickboxes for led options. I’ve copied the entire yaml file from the configurator to my ESPHome VM without editing the file in any way.
If I connect to the deck via serial and look at the logs the wifi disconnect occurs around the “Component api cleared Warning flag time”:
I can ping the deck from a PC here
[11:12:07][D][api:102]: Accepted 192.168.2.71 (My HAOS VM IP)
[11:12:07][D][esp-idf:000][wifi]: W (15795) wifi:
[11:12:07][D][esp-idf:000][wifi]: m f null
[11:12:07]
[11:12:07][D][esp-idf:000][wifi]:
[11:12:07]
I can no longer ping the deck from a PC here
[11:12:07][W][component:170]: Component api cleared Warning flag
[11:12:27][D][number:012]: ‘Brightness’: Sending state 1.000000
[11:12:30][D][esp32.preferences:114]: Saving 1 preferences to flash…
[11:12:30][D][esp32.preferences:143]: Saving 1 preferences to flash: 0 cached, 1 written, 0 failed
[11:12:53][safe_mode:041]: Boot seems successful; resetting boot loop counter
[11:12:53][D][esp32.preferences:114]: Saving 1 preferences to flash…
[11:12:53][D][esp32.preferences:143]: Saving 1 preferences to flash: 0 cached, 1 written, 0 failed
[11:13:27][D][number:012]: ‘Brightness’: Sending state 1.000000
[11:14:27][D][number:012]: ‘Brightness’: Sending state 1.000000
[11:14:37][W][api.connection:129]: didn’t respond to ping request in time. Disconnecting…
[11:14:37][W][component:157]: Component api set Warning flag: unspecified
The deck is within 6 feet of an AP and no other devices in the area disconnect, including the Local Bytes plugs I have. If I upload a default config, or just setup 1 button, the deck performs ok and doesn’t disconnect from WiFi. if I upload a config with 14 buttons configured the IP connectivity fails and it never reconnects issue occurs.
Back to the serial interface to upload a default config again so I can access the deck via wifi…
Edit:
I might as well use this page to document my testing…
Principle here is to use the localdeck configurator to create configs to see at what level of buttons added the deck cause wifi/ip to fail. As each change requires an ESPHome re-compile this will take a while…
1) Default localdeck config, no buttons configured. Works correctly, can ping the deck for a long time and it connects to HA fine.
2) Default localdeck config + button 1 setup. Button1 works on HA Local Bytes plug and I can ping the deck for over an hour.
3) Default localdeck config + button 1 + button 2 setup. Works correctly, can ping for many seconds.
3b) As above, default localdeck config + button 1 + button 2 setup using LocalBytes plugs that didn’t work in other configs, out of interest. Works correctly, can ping for many seconds.
4) As above, default localdeck config + 8 buttons setup, all HA/localbytes plugs. One of the LocalBytes devices that works in HA but when I search for it in the deck configurator it finds the device but when clicking on it the configurator doesn’t populate the device field with the results. If I manually type the device ID in to the configurator it finds & accepts the device. The device ID for this item is “switch.esp_w_plug7_yaml_lounge_tv”. Deck needed a PSU removal after a successful upload to be able to be pinged again. Device responds to 3 pings and then drops off the network. To use the device again I need to use ESPHome and a serial cable as ip isn’t up for very long.
On using the USB serial interface the deck logs this:
[13:31:19][D][api:102]: Accepted 192.168.2.71 (HAOS IP)
[13:31:19][W][component:170]: Component api cleared Warning flag
[13:31:19][D][api.connection:1389]: Home Assistant 2024.9.1 (192.168.2.71): Connected successfully
[13:31:56][D][number:012]: ‘Brightness’: Sending state 1.000000
[13:32:02][D][esp32.preferences:114]: Saving 1 preferences to flash…
[13:32:02][D][esp32.preferences:143]: Saving 1 preferences to flash: 0 cached, 1 written, 0 failed
[13:32:08][safe_mode:041]: Boot seems successful; resetting boot loop counter
[13:32:08][D][esp32.preferences:114]: Saving 1 preferences to flash…
[13:32:08][D][esp32.preferences:143]: Saving 1 preferences to flash: 0 cached, 1 written, 0 failed
[13:32:19][D][api.connection:146]: Home Assistant 2024.9.1 (192.168.2.71): Sending keepalive failed 1 time(s), will retry in 1000 ms
[13:32:20][D][api.connection:146]: Home Assistant 2024.9.1 (192.168.2.71): Sending keepalive failed 2 time(s), will retry in 1000 ms
[13:32:21][D][api.connection:146]: Home Assistant 2024.9.1 (192.168.2.71): Sending keepalive failed 3 time(s), will retry in 1000 ms
[13:32:22][D][api.connection:146]: Home Assistant 2024.9.1 (192.168.2.71): Sending keepalive failed 4 time(s), will retry in 1000 ms
[13:32:23][D][api.connection:146]: Home Assistant 2024.9.1 (192.168.2.71): Sending keepalive failed 5 time(s), will retry in 1000 ms
[13:32:24][D][api.connection:146]: Home Assistant 2024.9.1 (192.168.2.71): Sending keepalive failed 6 time(s), will retry in 1000 ms
[13:32:25][D][api.connection:146]: Home Assistant 2024.9.1 (192.168.2.71): Sending keepalive failed 7 time(s), will retry in 1000 ms
………
[13:33:18][W][api.connection:143]: Home Assistant 2024.9.1 (192.168.2.71): Sending keepalive failed 59 time(s), will retry in 1000 ms
[13:33:19][E][api.connection:140]: Home Assistant 2024.9.1 (192.168.2.71): Sending keepalive failed 60 time(s). Disconnecting…
[13:33:19][W][component:157]: Component api set Warning flag: unspecified
5) As above, default localdeck config + 8 buttons setup, all HA/localbytes plugs. I’ve picked 8 devices as in test 4 but all the devices were found by type ahead in the deck configurator, to see if this makes a difference. It didn’t, the deck responds to a few pings and then fails with exactly the same log output as above.
6) As above, default localdeck config + 4 buttons setup, all HA/localbytes plugs. Trying a number of buttons above 2 (that works) and lower than 8 (that fails). Deck works correctly in HA and can be pinged for several minutes without dropping comms.
7) As above, default localdeck config + 7 buttons setup, all HA/localbytes plugs. Trying a number of buttons above 4 (that works) and lower than 8 (that fails). Deck worked for about 2 minutes on first boot and then failed. Subsequent boots allow the device to be pinged 3 or 4 times before failing. The logs are as in test 4.
8) As above, default localdeck config + 6 buttons setup, all HA/localbytes plugs. Trying a number of buttons above 4 (that works) and lower than 7 (that fails). Testing 6 buttons is the same as 7 it fails. The logs are as in test 4 and I only get 3 or 4 pings to the deck after booting before it stops responding.
9) As above, default localdeck config + 5 buttons setup, all HA/localbytes plugs. Trying a number of buttons above 4 (that works) and lower than 6 (that fails). Results are the same, I get to ping the deck a few times before it fails and the logs are as test 4.
I think WiFi is staying connected, it is the ip response that is failing. My AP reports a connected device, even though I can’t ping the deck. I can ping other devices on the same AP/vlan/SSID, including Local Bytes plugs, fine with no drops. My wifi utilisation on the AP is less than 10% and I live in the middle of nowhere so interference is not an issue, nor is locally generated RF interference.
Here is an example of the ping responses I see from my ESPHome server. I run a /23 network so all devices are on the same network, no routing is required.
From HomeControl (192.168.2.78) icmp_seq=37 Destination Host Unreachable
64 bytes from LocalDeck1 (192.168.3.151): icmp_seq=38 ttl=64 time=1734 ms
64 bytes from LocalDeck1 (192.168.3.151): icmp_seq=39 ttl=64 time=711 ms
64 bytes from LocalDeck1 (192.168.3.151): icmp_seq=40 ttl=64 time=3.73 ms
64 bytes from LocalDeck1 (192.168.3.151): icmp_seq=41 ttl=64 time=120 ms
64 bytes from LocalDeck1 (192.168.3.151): icmp_seq=42 ttl=64 time=19.0 ms
64 bytes from LocalDeck1 (192.168.3.151): icmp_seq=43 ttl=64 time=41.0 ms
64 bytes from LocalDeck1 (192.168.3.151): icmp_seq=44 ttl=64 time=81.7 ms
64 bytes from LocalDeck1 (192.168.3.151): icmp_seq=45 ttl=64 time=4.15 ms
64 bytes from LocalDeck1 (192.168.3.151): icmp_seq=46 ttl=64 time=34.1 ms
64 bytes from LocalDeck1 (192.168.3.151): icmp_seq=47 ttl=64 time=28.5 ms
From HomeControl (192.168.2.78) icmp_seq=99 Destination Host Unreachable
From HomeControl (192.168.2.78) icmp_seq=99 Destination Host Unreachable
From HomeControl (192.168.2.78) icmp_seq=99 Destination Host Unreachable
10) As above, default localdeck config + 4 buttons setup, all HA/localbytes plugs. Trying a number of buttons above 4 (that works) and lower than 5 (that fails). As I can’t use 4.5 buttons I’ll use 4 buttons (again) and and leave the deck running to see how stable it is. After running for hours the 4 device’s setup code is very stable. I can leave a ping running against the deck with no dropped packets and the error log on the device shows all is well. HA activity initiated from the deck works quickly. I can use every button on my deck but only configure 4 to be used with Home Assistant at any one time.
End of tests.
I’ve not had a deck crash, I can always access the deck via USB, even if the ip side of the deck appears unresponsive.
Edit:
I found a thread that mentions commenting out these lines in the yaml config file that the deck configurator generates and ESPHome uses to create a config on the deck. I’ve completed this after taking the config from the localdeck configurator, compiled the code and uploaded to the deck. The lines to comment out are:
wifi:
power_save_mode: none
esp32_improv:
status_indicator: improv_status
authorizer: keypad_button_01
improv_serial: {}
Commenting out the lines survives going through the configurator again, which is good.
Commenting out these lines has allowed me to create code for 8 buttons on the deck and the deck stay connected to wifi. I’ll continue to test but things are looking better so far.
Edit:
After a couple of hours I’ve not had any disconnects on the deck since I made the changes above. I suggest adding commenting out the lines above is added to the configurator, as an option, as this would have saved me hours of work. I’ve also printed labels for the unit, which opens an issue in that the LocalDeck Configurator editor and the printed buttons are not ‘WYSIWYG’, I’ve had to drop the font size on the configurator 3 points lower to fit inside the buttons as compared to what the configurator shows via a web page. The deck is usable now though, which is the main thing.
I note, in other posts, that the side mounted USB socket clearance issue I mentioned above will be fixed in future units.
Thanks