Auto/Default AP


 

J. Winn

TVWBB Fan
Im taking the smoker/HM on a field trip tomorrow. If the HM boots up and doesn't find my wifi will it go in to AP mode or is there a way to set this type of behavior up?
 

RalphTrimble

TVWBB Diamond Member
There is no way for the HM to automatically go into AP mode. You will have to go into the wifi config and change it manually to AP mode and back to client when you return home.
 

Matt Fine

TVWBB Member
I haven’t tested it yet, but the new version of the software is supposed to be able to pull a temporary network config off a USB stick. You could setup the stick to put it into AP mode, or to configure it for the network you are visiting.
 

J. Winn

TVWBB Fan
I haven’t tested it yet, but the new version of the software is supposed to be able to pull a temporary network config off a USB stick. You could setup the stick to put it into AP mode, or to configure it for the network you are visiting.

Do you know will it revert back to my old settings if booted without USB or do the settings get overwritten with whats on the usb? Also, can there be anything else on the USB or or the config file only? Also, maybe I didnt look hard enough but whats the format for the config.txt? Thanks!

Edit: Found the config.txt format.
 
Last edited:

RalphTrimble

TVWBB Diamond Member
I haven't used this feature but here is how I understand it should work.

You put a config file on a USB stick and if the HM sees this config present when it boots it will load the config from the USB. If you remove the USB stick and reboot the HM it should load the default config from the HM.

I don't think it should be a problem having other files in the USB stick, but maybe you should look through the HM wiki to see if the details are laid out there....
 

Bryan Mayland

TVWBB Hall of Fame
It will not revert back to the old settings after you remove the USB, the USB settings overwrite the internal ones so after the first time it boots you can remove the USB stick and it will keep that configuration. If you want to go back to the other settings, you have to edit the file on the USB stick to a new configuration and boot again with it inserted. I did look at making a way for the settings to be able to be rolled back (aka non-persistent) but the problem was that they'd be stored in a RAM-based staging area. That works great until you edit any other bit of configuration which will then gather up these bits too and persist them to storage and prevent you from being able to roll back.
 

RalphTrimble

TVWBB Diamond Member
Well that's a bummer... So that means you need to have a thumb drive for your default config and another for the alternate config to pull this off... or keep a backup of both and swap them on the thumb drive.
I hope some day we end up with a method to store multiple configs on the rPi and load them at will, there has to be a way to get that done...
 

Bryan Mayland

TVWBB Hall of Fame
Yeah you can either have two USB drives or have one with a config.txt with both configurations and comment one out to swap them. It certainly isn't very convenient, but it is a lot better than having to open up the case and pull the SD card out to edit the config to change it. I'm pleased that people are taking their HeaterMeters on the go and sharing / showing off their devices with friends but I just don't see it as a very common usage worth putting more time into.
 

Matt Fine

TVWBB Member
I use mine on two different networks. My solution to date has been to use two WiFi adapters, one configured for each ssid. Now that I am switching to a pi zero, I am going to have to try the dual usb drive method. Or just get a second HM.
 

RalphTrimble

TVWBB Diamond Member
I know you (Bryan) said adding a menu entry to the HM to select the config was a no go due to the amount of programming for that and because the HM doesn't communicate with the rPi on that level. But what about through the HM config web page, wouldn't it be possible to add the ability to "save config" and "load config" from the web gui? That would work as long as you remember to change configs before you leave the active network...
 

Matt Fine

TVWBB Member
How about a script that checks for a WiFi connection and then if it doesn’t find one, it reverts to AP mode after a couple minutes?

You could probably make it cycle through a couple of known networks, and connect to the first it finds and if none, then go to AP mode.

Hmmmm. This might be better than my two usb drive plan. I have a busy few weeks at work, but if no one else does it by early May I will take a crack at it.
 

Bryan Mayland

TVWBB Hall of Fame
That would work as long as you remember to change configs before you leave the active network...
Thus rendering it completely useless most of the time! If you could remember to plug it in and change the configuration, then why didn't you just change the configuration? There's already a quick wifi page in the webui which takes pretty much the same amount of time. Adding profiles just adds another layer of complexity and requires more code. Mostly the problem with this is that it doesn't solve the problem of showing up somewhere with your HeaterMeter in the wrong configuration and you being stuck.

I'm also not a big fan of automatically switching between AP and STA mode just because when something happens automatically, it never seems to do the right thing and you just create more headaches. I think it is better for the configuration to be explicit. If someone is going to write a proper network manager that creates/edits/saves profiles, integrates into the webui LinkMeter->Wifi cleanly, and always does what you expect without being a while [ true ] ; do shell script, I'd consider it for inclusion though. I just think there are things that people use every time they use HeaterMeter that are worth development time more than this which I think almost nobody would use. Especially if those things make this discussion obsolete.
 

 

Top