question

bobke avatar image
bobke asked

Help with use of 4G router +Rpi Venus+ GSM remote power-on-off +VRM

I have Venus on RPI on my boat connected to SmartShunt, Solar MPPT and Ruuvo sensors.

When I am not on the boat I want to watch some data: condition off batteries, Ruuvo data and solar info on VRM.

I want to add a 4G router connected to the Rpi and a remote (4G) power-on/off switch.

The goal is to have some information once a day and avoid the risk of extreme power consumption or to much data traffic from Venus to VRM server (limit 4G costs).

With the remote power on-off switch I can switch power to the router and maybe the RPi. or at least the screen. Should the RPI stay 24/7 on power? What would be a good solution (VRM frequency and other parameters?)

At least I can switch off the router from time to time.

Maybe somebody has already similar configuration and can give me some ideas?

VRMVenus OS
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

10 Answers
matt1309 avatar image
matt1309 answered ·

Hi @Bobke

How are you planning to connect to the remote switch if the remote switch turns the internet on/off?

The power consumption of a router and a pi will be very small. Even sun in the winter should manage those loads. I personally would leave it running 24/7, and just have power consumption be a priority when purchasing the 4g router.

I'd guess <16w for the router and <10w for pi? I suppose you could use a timer switch to turn router on and off. And Gx (raspi) would store data and send when connections resumed ie router turned on. To me it feels like a lot of effort for small power consumption savings.

In terms of remote switches I like shelly smart switches but they're wifi based.

Victron offer a 4g modem I believe which may be slightly less power consumption but it'll be far less flexible that a 4g router setup I'd imagine.


2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

bobke avatar image
bobke answered ·

Hi,

I think I will use a 4g 202 switch and connect the rpi and the router (a Strong 300V2) to it. I can leave the Rpi screen off. I will start with a 24/7 situation. If after some time I notice that I get into problems, I can switch it all off and start some time schedule.

I like to have some help on the best values for some specific parameters for this case. I want to have some results (battery state of service and start battery), produced sun energy (mppt) and the ruuvo figures once a day.

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

matt1309 avatar image
matt1309 answered ·

I know smart shunt and MQTT store some history, I'm not sure on the ruuvo. So you may be able to not have any gx device/pi on 24/7. If you dont need a 24/7 and just turn it on intermittently for data to be sent to VRM.

Worth a test maybe. However if you've got panels on the boat and there's no other loads on you may as well use the power to leave pi on 24/7 and then you wont need to worry about timing switches etc.

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

bobke avatar image
bobke answered ·

related questions.

I did some tests resulting in some new questions.

1.ERROR I made: I did a remote shutdown an the only solution to reboot the RPI was a locally power up. So I learned that RPI must stay connected

2. In my 4G router I have a simcard from provider A. When I use remote connections from other places where I use other providers (not provider A) everything works excellent.

But I use on other locations sometimes a 4G router where i use a so called DUO-SIM (same number as in the other 4G router connected to the RPI) and that conflicts. To avoid this I wonder if I can use following procedure:

in Victron Venus disable VRM communication (disable logging in VRM online Portal) by remote console

use the other 4G router as long as needed and after finishing that

enable VRM communication again (enable logging in VRM Portal)

I hope this is a good way to do it. but suggestions welcome

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

bobke avatar image
bobke answered ·

@matt1309 After reading your reaction again I think now that my solution will not properly work.

If I understand it well I need a continuous powered RPI but I can switch off temporarily the 4G router.

Data are than saved locally (memory or usb-stick???) and communicated to the VRM server when the router is online again.I think I will correct my connections so I can use the G202 switch to power on/off the 4G router.

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

matt1309 avatar image
matt1309 answered ·

Hi @Bobke

I can't help much with the conflicting SIMs. I've not heard of DUO sim before. Does the DUO sim disable the connection of router 1 if you're using it on another router? Or does it just have the same/shared IP? If it's just shared IP I imagine the VRM would still work and remote console should still work as the data connection should be via a tunnel to Victron's cloud. If however it disables router 1's connection altogether then maybe not.

My house uses 4g connection for VRM remote console I can access remotely no problem (due to the tunnelling done behind the scenes). For other non victron services I get a server on the 4G network to connect to a VPS i rent using openvpn. I can then use IPTables to forward and connections from the VPS to the server running on the 4g network (most 4G networks are behind NAT, this "backwards" VPN technique resolves that, but victron already has a form of tunnel setup so shouldnt be the cause of your issue but thought i'd share just in case it did ever help).



You'll have to test it but i believe Venus os stores data locally when connections are lost. (If you go to settings -> VRM online portal: Then scroll down you'll see the data stored. I'm imagine you can tweak this to store to USB but I'm not 100% sure how).

I suppose the only downside of this setup is you wont be able to control/edit the setup once the 4g router is turned off. I suppose you could set a window of when it's on during the day.

I'd definitely work out how much power the 4g router is using. You may find it's so small that it's not worth shutting it down at all.





2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

macjl avatar image
macjl answered ·

Hello,

I have same kind of installation. I use the MPPT load to power the raspberry + 4G router.

With this setup, I can make that the power is autmotatically shut if the batteries becomes too low, and restore back power when the sun charged the batteries enough. It may be a solution if you have a load output on your MPPT.

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

bobke avatar image
bobke answered ·

@matt1309
The duo sim is a copy of the original simcard. I can use one of both but never the two together.

As already mentioned, I will change my configuration as follows:
use a remote 4G switch (with a simple cheap simcard) just to receive a On and a OFF command to switch the power of the router.

One Simcard with unlimited data is in the 4G router connected to my RPI with access to VRM server.

.If I like to use my duo-sim (in a mobile router) I switch (in remote) off the router in my boat. VRM data will be saved (on an usbstick in my RPI). When I finished the use of my mobile router I switch on (remote) my router on board and I think communication with VRM server will be restarted.

The RPI wit Venus stays permanently switched on.

@ macjl

If your batteries are to low, I am not sure you can restart the RPI, that was the problem I had when I did a remote shutdown of the RPI. I could not restart the RPI in remote mode.

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

macjl avatar image
macjl answered ·

If you shut off the raspberry with a system command, the raspberry is still powered. Only the OS is off. But if the power source is lost, it will reboot when the power will be back.

That works for me. For example, my raspberry + router were shut down, 8 days ago, because the battery was under 12v. Then, yesterday, after some days of sun, the battery was at 14v, then the raspberry restarted, and began to push data to VRM again.

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

bobke avatar image
bobke answered ·

A sudden power cut off of the RPI will in most cases be OK. But sometimes it can go wrong and the SD card can be damaged. That is what I want to avoid. So I try to keep the RPI under power. Although my Trojan batteries are 12 years old, I hope that even in these dark winter days my solar panels can produce enough energy. But your experience gives me good hope that I can switch off the 4G router from time to time.

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.