Howdy. I'm looking into getting a Puli GE-XE300 for my car. I'd like it to automatically shut down when it is in range of my home wifi network or can otherwise detect that my car is parked in my garage. Is there a way to do that? I'm thinking about hooking it up to the car's (a 2016 Leaf) main 12V accessory battery for always-on power.
If I can't do it with that device, are their similar devices that would have this functionality?
A few challenegs I see... maybe there will be some other ideas:
- how will it turn back on? You could bounce the power, but aside from that, once it is off, there won't be a good way to wake it up automatically.
- If you solve #1, how will you prevent it from shutting down again if you start it while it is still in range of your home network? You'd have to wait until you're out of range to start it.
- scanning for your home wifi network will be disruptive to your AP mode operation. Because there is only one radio, the two methods of looking for your wifi network (wifi scan, or simply attempt to connect to a knonw upstream AP) will cause the local AP to be taken down. In the case of a scan, it's temporary, but it does require that the OS puts the device into a listen/scan mode for this purpose. If you try to connect directly (as a sta mode device), the radio needs to establish the upstream connection first before it can start the AP mode (this is a major problem when you are out of range of the upstream AP because it means the radio cannot start at all -- this is due to the fact that the upstream AP determines the channel that is used. Travelmate is a tool to help with the general lack of upstream connectivity, but wouldn't really be suitable for your specific application).
Why not simply plug it into your switched accessory power (rather than the always-on)? Or, if you might need it to be always-on in some circumstances (say you're parked somewhere away from your home and need the wifi), you could connect it to the always-on supply at that time. Or do both with a toggle switch that allows you to select the operating mode.
I appreciate your thoughtful response. I would like it to be always-on when I'm away from home because it will be a relay for the Open Vehicle Monitoring System, which allows me to locate my car and turn on climate control remotely.
Having a toggle switch is a reasonable option (or I could just switch it on/off manually, as that would be able the same amount of interaction).
I'm also willing to contend with the other issues you mentioned. But it makes me wonder if there is another way. Is it possible for the Puli to receive an external command from something like Home Assistant to turn off? So #3 wouldn't be an issue. I could potentially tell Home Assistant to send an off signal when I arrive home, which would eliminate #2. Then my only issue would be turning it back on manually.
Why not wire it to the ignition switch? You can build a simple relay with feeds from the battery and a feed from the ignition-switched source to only feed power to your router when ignition is on.
Having said that, this is definitely off-topic for this forum and you should seek support elsewhere.
Because they want it off only when it is near home, even if they are not driving; which is sketchy as $#!~.
+2
You could use a following setup:
-
BLE transmitter in your garage transmitting in a loop an “off” command. Arduino, RaspberryPi, anything actually with BLE and programming capability.
-
car: Bluetooth Low Energy (BLE) + DC relay programmed so that the relay is on by default. Whenever an “off” BLE command is received, it cuts power for, say, 1 min. This way it stays off in your garage and turns on after about a minute after leaving your place. I’m not sure such a gizmo exists in the wild. Quick search only shows BLE relay without timers, so more research needed. Maybe there are some that could be reprogrammed. DIY: https://www.arduino.cc/reference/en/libraries/arduinoble/. There’re probably dozens of other boards that can do this.
The DC relay might need to be 16V because voltage in cars is about 14-15V when lead acid battery is charging. Can Puli handle that?
Thank you, I'll consider that.
I'm sorry that this has wandered off topic. Was my original question appropriate? My assumption was that this could be handled programmatically, within the device.
My standing question is "Is it possible for the Puli to receive an external command from something like Home Assistant to turn off?" Is that question appropriate to this forum? If not, is there another forum on this site that you would recommend?
Where does one get support for OpenWRT plugins?
I believe that the original ask was indeed on-topic. And yes, in theory it could be handled programatically. But due to some of the limitations I described, it may be difficult to do in the way you had originally envisioned.
Yes, in theory (again). But HA would need to know that your car/device has arrived home. There may be many approaches to this, but I think most would be off-topic here. Probably better asked in the HA forums.
If HA can detect the car, you could send a poweroff
command to the OpenWrt device in the car via ssh. Since your device would be cellularly connected, you could have a VPN back to your home network so that HA could reach the device without it having to jump onto your home's wifi network.
Big assumption here: you will be using official OpenWrt. If you're using the gl-inet vendor firmware, you need to ask them for help -- their proprietary fork of OpenWrt is materially different and not supported here.
Stuff installed from the official OpenWrt repos is usually supportable here, at least in general (although it does depend on the package and who maintains it).
Just to set appropriate expectations: keep in mind that OpenWrt is a completely open source and volunteer based project. As such, there is no guaranteed support the way there would be for a commercial product.
That said, is forum is very active and can help with many things and will almost always make a true best-effort, so most people do get their issues solved.
Just a small caveat: Puli is based on OpenWrt 21.02, so some packages might be pretty old, so it might be hard to get support for these.
That may be true for the GL-Inet fork, but OpenWrt 23.05 is supported on this device.
https://firmware-selector.openwrt.org/?version=23.05.2&target=ath79%2Fnand&id=glinet_gl-xe300
Thanks, I wasn't aware of that.
This is very useful! Thanks, everyone!
Whatever you do, minimal power requirements in the engine-off state is paramount or you will drain the starter battery if the car sits parked for a couple of days. And that's difficult, impossible for running a router directly, very hard with a more dedicated µC (the whole car needs to remain under ~100-150 mA when parked).
Noted! Thank you!
Some BLE relays on ebay claim to consume only 6mA on standby and 35mA when on. For example: https://www.ebay.co.uk/itm/186019844921
It's hard to say how tricky would it be to achieve similar levels with a DIY solution.
You could have a dedicated "powerbank" for the router. This way even if it runs out of juice, you won't kill your main 12V battery. It would need to be something that can charge relatively fast, so that means high capacity. It should be charging ideally when you're charging your car or from the main battery pack.
Thanks!
The router itself has a built-in battery, fwiw. I don't think it can charge from the main battery pack, and when the car is charging it doesn't charge the starter/12V battery (IIRC, I left it plugged in for a few weeks without driving it and the main battery died.)