Heatermeter 4: automatically joining the same wifi after power off?


 

Riku Naskali

TVWBB Member
Hi,

I'm not sure if Heatermeter should remember the wifi configuration after powering it off, but mine doesn't.

I've successfully configured it to join an existing password protected wifi network, but I'll have to do it every time after I've turned it off.

It's no fun lugging around my laptop and rj45 wire just for that...
 
It SHOULD reconnect automatically. Not sure if the source of your problem is in your settings or perhaps the HM is somehow restoring a default configuration at every boot rather than a backup of your customized config? Those would be the first two directions I would explore... Perhaps do a manual backup of your settings? Are the WIFI settings changed (default?) after reboot?
 
Every other setting is remembered, so I do not think that's the case.

Wifi settings seem also the same, but it says wifi is disabled or not associated after reboot. Only way to turn it on is to do a new scan, even clicking "enable" doesn't work by itself.

The network is password protected, but I'm thinking it should remember the password too?
 
That's certainly odd. You may want to look in Status -> Kernel Log and see if you have something like this at the 12 second mark or if there's some sort of error
Code:
[   12.276366] cfg80211_rtw_del_virtual_intf
[   12.467790] cfg80211_rtw_del_virtual_intf
[   12.616359] cfg80211_rtw_add_virtual_intf, ifname=wlan0, type=2
[   12.618344] ndev=  (null)
[   12.629117] cfg80211_rtw_set_power_mgmt
[   14.239444] cfg80211_rtw_change_iface, old_iftype=6, new_iftype=2
[   14.247339] cfg80211_rtw_flush_pmksa
[   14.250736] cfg80211_rtw_change_station
[   15.464162] cfg80211_rtw_change_station
[   15.466720] 
[   15.466733] =>cfg80211_rtw_connect
[   15.469972] privacy=1, key=  (null), key_len=0, key_idx=0
[   15.471536] bssid=4c:e6:76:50:7e:20
[   15.473066] matched by bssid
[   15.474562] rtw_cfg80211_set_wpa_version, wpa_version=2
[   15.476086] rtw_cfg80211_set_auth_type, nl80211_auth_type=0
[   15.477622] rtw_cfg80211_set_cipher, ucast=1, cipher=0xfac04
[   15.479132] rtw_cfg80211_set_cipher, ucast=0, cipher=0xfac04
[   15.480648] rtw_cfg80211_set_key_mgt, key_mgt=0xfac02
[   15.482040] cfg80211_rtw_connect, ie_len=22
[   15.483424] got wpa2_ie
[   15.484820] set ssid:dot11AuthAlgrthm=2, dot11PrivacyAlgrthm=4, dot118021XGrpPrivacy=4
[   15.581046] rtw_cfg80211_indicate_connect
[   15.604733] cfg80211_rtw_change_station
[   15.629351] rtw_cfg80211_set_encryption, : param->u.crypt.set_tx ==1 
[   15.632838] cfg80211_rtw_set_default_key
[   15.659640] cfg80211_rtw_change_station
Also check system log for any errors. If it just doesn't look like it is coming up at all, you may have to ssh in and check /etc/config/wireless to see if it has your wifi information correctly.
 
Thanks,

I'll check into it before next cook.

Should it also rejoin a wireless network if it loses the connection for some reason? I've got some range issues and after I've lost connectivity, I've had to manually re-enable wireless again with my laptop.
 
Thanks,

I'll check into it before next cook.

Should it also rejoin a wireless network if it loses the connection for some reason? I've got some range issues and after I've lost connectivity, I've had to manually re-enable wireless again with my laptop.

I've power cycled my wireless router during a cook and my HM always seems to reconnect..
 
I have this:

[ 13.604467] cfg80211_rtw_del_virtual_intf
[ 13.817283] cfg80211_rtw_del_virtual_intf
[ 13.969256] cfg80211_rtw_add_virtual_intf, ifname=wlan0, type=2
[ 13.971335] ndev= (null)
[ 13.995650] cfg80211_rtw_set_power_mgmt
[ 14.022513] cfg80211_rtw_set_channel
[ 14.729357] cfg80211_rtw_set_txpower
[ 15.961472] cfg80211_rtw_change_iface, old_iftype=6, new_iftype=2
[ 15.970269] cfg80211_rtw_flush_pmksa
[ 15.972912] cfg80211_rtw_change_station
[ 19.916219] EXT4-fs (mmcblk0p4): warning: mounting unchecked fs, running e2fsck is recommended
[ 20.025908] EXT4-fs (mmcblk0p4): mounted filesystem without journal. Opts: (null)

And then nothing...
 
Hmm, looks like it wasn't getting IP address from my hotspot. Changed the setting to static and now appears to be working fine. Strange :o

Edit: I spoke too soon, it doesn't work. When I click the wifi tab on Heatermeter, it just says "wireless is disabled or not associated" after reboot :(

I can't even enable it by clicking "enable", I'll have to do a new scan and another setup, the it'll work.
 
Last edited:
Well that's crazy that it always works if you scan & join but not after a reboot. It might be one of the options, like forcing the BSSID, channel, the HT mode, the HT capab, basic rate, anything. Something that happens to get set by the scan but not by the boot. Unfortunately there's not a way to dump the current iw interface information that produces any worthwhile information. Your AP isn't set to like only allow 40MHz channels or some other sort of restriction is it?
 
Well I got it working...

By changing my wireless ap to a proper router, previously I was using a hotspot created by my Android phone. Maybe there's something wrong with the Android's way of creating a hotspot.

But now I have another problem, there's no graph in Heatermeter web page! It was normal with my two test cooks, but now there's nothing. Everything else works, but the graph is empty. I saved the graph from my first real cook and it's empty.

I can load my two test cooks' graphs and they look fine. Maybe I'll reflash the software...
 
Well I got it working...

By changing my wireless ap to a proper router, previously I was using a hotspot created by my Android phone. Maybe there's something wrong with the Android's way of creating a hotspot.

But now I have another problem, there's no graph in Heatermeter web page! It was normal with my two test cooks, but now there's nothing. Everything else works, but the graph is empty. I saved the graph from my first real cook and it's empty.

I can load my two test cooks' graphs and they look fine. Maybe I'll re-flash the software...

I had this problem once... try forcing a refresh of the browser and/or clear the browser cache, or try another browser... I think that's how I got over the no graph issue.... I had tried re-flashing the software myself and that didn't fix it....
 
Ah probably what was happening was Android may assign a random BSSID and OpenWrt was trying to associate with that specific one, which changed every time you joined.

The new issue I'm not sure what you've got going on but try clearing the browser cache and reloading the page. If not, then you'll need to see if there's a javascript error that's causing it to bail out.
 
Hmm

The graph's back now that I've got internet access on my Heatermeter. Maybe the graph fails since Heatermeter can't sync time with NTP server? Normally I don't have internet access for my Heatermeter...

Anyway, I disabled the NTP server, let's see if it has an effect...
 
It should work, internet connection or not. It has been a while since I tried it without one. If there's no internet access the graph just starts at Midnight Jan 1 1970, adjusted for time zone so here it would show a cryptic 7 or 8pm on bootup. Maybe the browser doesn't like times before 1970 (which is the javascript time 0)? Either way, it shouldn't be an issue for a proper browser.
 
Well I doubt it was a browser issue, the graph was empty with both Firefox and Chrome and also with my Android phone. If it comes back, I'll check the logs.
 
If I am connecting directly to the HM with my phone (using HM as the AP) I have to go into the settings and use the option to sync time with browser. This then allows me to see the graph. Can't remember where the setting is exactly in the interface but this should fix the issue your having. I don't have to do this when I connect the HM to my home wireless because NTP kicks in and automatically sets the time.
 
Well, smoking again.

Definitely need to sync time with browser in system, otherwise the graph is empty.

Is this something that could be fixed? I'm not saying I'm too lazy to click one box now that I know how to fix it :)
 
Yeah that's bizarre. I know this works at my Dad's house and his NTP time doesn't sync either. I just faked it locally and just as you say there is no graph. The error is occurring in the database which reports: end time: did you really mean month 71? (where 71 is the number of seconds your HeaterMeter has been running). I can't explicitly request the data by using different time formats either, because it is hard coded to not return any data that's before 1980. A HeaterMeter with no time set is operating on January 1st 1970.

As a workaround you can go to System -> Startup and enable the "luci_fixtime" service. This means your time won't ever be right unless you set it using the button, but at least you should get a graph.
 

 

Back
Top