Using HM on two WiFi networks


 

Paul Frere

TVWBB Member
We have a lake home and a city home, each with wifi but with separate SSIDs of course.

After a lot of experimentation last month I figured out how to edit the config.txt file that was working in the city to work a the lake. I will now be making a second microSD with a config.txt file to suit the city SSID.

1) Is this the right approach? I have never before had a device that had to be hard-coded with SSID and PWD. Am I missing something?

2) I am confused by the # commenting of the confg.txt wifi section. From reading I understand that the software picks up the configuration when it boots, then comments out the ssid and pwd lines. My lake-home config.txt now has the two lines commented out. The config.txt for the city will not have the # marks when I insert the microSD, but I assume that it will get the # marks added.

3) So when I go to use the "lake" microSD after using the HM in the city, will I first have to un-comment the ssid and pwd lines? And vice-versa? Do I really have to edit the config.txt every single time the HM travels from one SSID to another??

This is so complicated that I'm hoping/suspecting that I am missing something big, like how to just get the HM to connect automatically. Really hoping... :)

Suggestions?
 
The problem is that it is locked to a single wifi configuration and that it doesn't fall back to AP mode if it can't connect. In fact, nothing in the software can even tell if wifi is configured at all, just failing to connect because the network doesn't exist at all, or maybe someone just turned on a hair dryer and it lost connection for a moment. If you *are* on the network with the HeaterMeter, then you can just go into the webui and tell it to switch to AP mode, or enter the credentials for another wifi network you want it to connect to, no editing of SD card files.

What happens if you forget to do that and you're already at LAKE? Well what would be the solution for any other wifi device that doesn't have a valid wifi network to connect to any more? You reset the config. That is done through the LCD menus using the "Reset config?" option. This resets allllllll the configuration, Pi and HeaterMeter back to default. You have to wait for the Pi to boot though before you can use it, because otherwise the HeaterMeter can't tell the Pi "Hey, the user just said to reset config". After reset, you'll have an access point called HeaterMeter you can connect to and either tell it to join LAKE or just leave it in AP mode.

In addition to editing the config.txt on the SD card (which is inconvenient because you have to unscrew everything), you can just insert a USB mass storage device (thumbdrive) with a config.txt on it that has the wifi settings. Insert it before power up because it looks during the boot sequence.

Regarding commenting out, you can have both configs in the text file like this one, which does nothing:
Code:
#wifi_ssid=city
#wifi_password=citypassword
#wifi_ssid=lake
#wifi_password=lakepassword

If you want to switch to LAKE remove the two in front of the lake info:
Code:
#wifi_ssid=city
#wifi_password=citypassword
wifi_ssid=lake
wifi_password=lakepassword

If this is on the SD card it will put the # back after it updates the setting. On a USB stick, it leaves them uncommented which means the stick can be used multiple times without needing a computer to reactivate. The idea here being you can have a stick with each config you want and just put the one you want in and boot up.

It would be really nice if there was a wifi manager that would allow multiple configurations to be saved, and would connect to one it finds and falls back to AP when none exist. We don't have that though and I certainly don't want to write the webui for configuring that because woof what a pain that would be. :eek:
 
Thanks very much. The USB config.txt is a good solution, much less hassle than pulling the internal microSD. Should I remove the config.txt from the internal microSD to force the software to check the USB or is the USB checked first/default?

Probably there are very few of us who cook with two different ssids! :) So a more elegant solution would not be worth your effort.
 
Probably there are very few of us who cook with two different ssids! :) So a more elegant solution would not be worth your effort.
Haha I think you're absolutely wrong about that (that it would be worth the effort). Sure, it would be nice, but it really is a lot of effort, I don't think it is a very common use case, and there are ways around it that aren't terribly inconvenient. It is just not a good time vs usefulness ratio.

I think the sd card overrules everything... oops nope just looked it up, the SD card goes first, then the USB stick can overwrite that. If the SD card already has been read / used once, it never works again until you reactivate it though, so even if you edit both, only the USB one will work twice... and you'll only see the USB config as "working" because it will overwrite the SD card config immediately. You don't need to specifically edit the SD card to disable any config in there.
 
OK, let, me make sure I understand;

*The config.txt on the microSD is a don't care.
*I make two USB sticks, one with the "city" parameters and one with the "lake" parameters. In both cases the parameter lines are not commented out.
*The software boots and copies the config.txt to the microSD, picks up the parameters then comments them out on the microSD but does not alter the USB version of the file.
*So from that point I can swap between the two USB sticks/between the two SSIDs without any more file editing.

Right?

Small feature request: Give me some way to know what the HM's IP address is. Right now, if I miss it during the boot I am blind/don't know if the DHCP or the AP route was taken.

Again, thanks for all that you do.
 
All of what you've summarized is correct except this:
*The software boots and copies the config.txt to the microSD, picks up the parameters then comments them out on the microSD but does not alter the USB version of the file.
* The software boots and copies the config.txt to the Pi's wifi config.. The difference is that the USB never overwrites the microSD config.txt, it goes directly into the Pi's wifi config.

I actually did write a whole network menu system so you could see the IP address again, and also the address of other adapters and what the current wifi config was, but ... I was developing it on a test HeaterMeter then ended up overwriting all the server side scripts during build testing and I never got back to re-writing it. It is on the todo list!
 
Why not just connect to it directly at one of the locations?
Connecting via internet is great but only needed if leave house
 
It's probably more for being able to keep your phone on the internet while still using the HeaterMeter and not because it needs to be accessible through the internet. It's a pain trying to keep my phone on the HeaterMeter AP, because it doesn't have Internet access so it keeps trying to find a better network so it hops off the HeaterMeter network.
 
Why not just connect to it directly at one of the locations?
Connecting via internet is great but only needed if leave house
You cook inside your house next to a RJ45/Cat5 connection point? I don't.

It's probably more for being able to keep your phone on the internet while still using the HeaterMeter and not because it needs to be accessible through the internet. It's a pain trying to keep my phone on the HeaterMeter AP, because it doesn't have Internet access so it keeps trying to find a better network so it hops off the HeaterMeter network.
My use is to have the HM connected to my home network so I can check it from my desktop or, rarely, from a tablet. No need to access it from the internet. Using its WAP capability would be a pain because the desktop and the tablet are not on that network. Using a phone hotspot would have the same problem. (Cooks can be 24hours or more. I just made a batch of bacon that was in the cold smoker for around 35 hours. "Cold" is relative; there is enough of a heat rise that watching the HM pit temp will tell me if the pellet smudge(A-Maze-N) is still smoking away.)
 
We have a lake home and a city home, each with wifi but with separate SSIDs of course.

Suggestions?
I am probably overlooking something very basic, but... could you not use the same SSID at both the lake home and the city home? I'm assuming the two locations are far enough apart that no device would see both signals at the same time (otherwise why have two homes :)). Or at least set up a "guest" network on the router at the lake house, using the same SSID and password as your city home (but different from that of the main lake house network), with nothing but the HM ever connecting to it. The HM would see the same SSID and use the same PW at either location, so it won't know, nor should it care, that it has been moved. Or so it seems to me.
 
Last edited:
I am probably overlooking something very basic, but... could you not use the same SSID at both the lake home and the city home? ...
We could. What you suggest is do-able. It's one of those common things where you can move the difficulty around but you can't really eliminate it. At home I would have to reconfigure at least a half-dozen devices to a new SSID. At the lake, fewer, but well above zero. But to have the HM tail wag my entire network configuration dog is a workaround, not a real fix. Brian's idea of using a couple of USB sticks is a much cleaner solution.

My HM, probes, battery, and charger ride around in a cheap pistol case (https://www.walmart.com/ip/Flambeau-Large-Pistol-Case/23578640) so carrying the USB sticks is no problem.
 
We could. What you suggest is do-able. It's one of those common things where you can move the difficulty around but you can't really eliminate it. At home I would have to reconfigure at least a half-dozen devices to a new SSID. At the lake, fewer, but well above zero. But to have the HM tail wag my entire network configuration dog is a workaround, not a real fix. Brian's idea of using a couple of USB sticks is a much cleaner solution.

My HM, probes, battery, and charger ride around in a cheap pistol case (https://www.walmart.com/ip/Flambeau-Large-Pistol-Case/23578640) so carrying the USB sticks is no problem.
True, using the same SSID at both locations is a Kludge. But setting up a guest network (unless you already have one ) would be a one-time chore, wouldn't it? Still a Kludge, but maybe only a lower-case kludge. (Caveat: I have no experience with the HeaterMeter, but lots of experience in messing up network settings and having to figure out solutions, so I will make no more suggestions. )
 
True, using the same SSID at both locations is a Kludge. But setting up a guest network (unless you already have one ) would be a one-time chore, wouldn't it? Still a Kludge, but maybe only a lower-case kludge.
Yup. Conservation of difficulty still applies. :) Agreed, lower case. Actually had I thought of that I might have tried it. I don't have/don't need guest networks but the home WAP has the capability. Not sure about the lake, but probably it has the capability too. Just giving the lake WAP a guest network that pretended to be the home network would probably work fine. Thanks for the idea.
 
Just to tie some partial ribbons on this thread, I am at our lake home and find that the Cisco router does not have a guest mode. Worse, for the Cisco routers that do have that mode: "The Guest Network Name will always follow the main network’s SSID followed by a “-guest” suffix. If you want to modify your Guest Network Name, you have to change your home wireless network name first. " So no joy there with @LarryD's good idea. Maybe that naming restriction does not exist at other vendors, but I have Cisco at home too.

I did not bring the HM/forgot, so I can't test the USB option. I'll post again when I have some results.
 

 

Back
Top