I read the source code for turnkey and found some clues in /home/pi/scripts/raspberry-pi-turnkey/wpa/wpa.log
:
Successfully initialized wpa_supplicant
wlan0: CTRL-EVENT-SCAN-FAILED ret=-512 retry=1
nl80211: deinit ifname=p2p-dev-wlan0 disabled_11b_rates=0
p2p-dev-wlan0: CTRL-EVENT-TERMINATING
nl80211: deinit ifname=wlan0 disabled_11b_rates=0
wlan0: CTRL-EVENT-TERMINATING
In /home/pi/scripts/raspberry-pi-turnkey/wpa/test.conf
I see the ESSID that I selected via the web UI, there’s a commented out line with my password: #psk="hunter2"
followed by what looks like an encrypted of hashed password psk=6229...3a91
.
Tracing the turnkey source code, this is the output of wpa_passphrase
, which is something I had never heard of before, but based on the man page, it seems legit. Next in the source I see that there’s a hardcoded wireless interface name “wlan0” but that matches up with my working hestiapi system.
Then I took a different, smarter approach. I logged into my production hestiapi and did a git diff
on turnkey in the ~/scripts/
directory. It turned out, I missed setting an important variable. I fixed this up and then booted and voila! Turnkey could get on the wifi.
So I’ve pushed that fix up to kick off a new build. However, I’m not through yet. I’m not getting the flame/snowflake/fan icons, the UI just remains on the “Off” screen. The info still doesn’t have any idea what IP address the thermostat has, but it did show it on the screen when it was booting up, so I was able to SSH into it and poke around. Openhab2 was running, and I didn’t see anything wrong in journalctl -e
other than hostapd.service not being able to start (I’d expect that to be disabled by turnkey, but apparently not). hostapd wasn’t actually causing any network problems, so I just stopped it manually for now.
It’s cold, so I’m going to swap back to my working SD card for now. It might be a week or two before I’m able to get back to troubleshooting this, as life is getting between me and debugging my thermostat. When I do come back to this, I plan on looking at openhab.log and hopefully that’ll have some clues because that’s pretty much the only other place I can think of to look.