Are you using Home Assistant in your van?

You could also (probably) get the speed from CanBus. ESPHome has a canbus integration: https://esphome.io/components/canbus/ I looked at doing this but the van isn’t stored at home so I didn’t really get far at all before some other project popped up.

Some guy is controlling his sprinter electric seats from HA using this :)

Need to play around with some means of interfacing that doesn't have that horrible lag that you get when pairing with a bluetooth speaker
If you use a TV they can often compensate for audio lad by buffering video.
 
I saw some of that on the other thread dpsuk999 and it's exactly what I aspire to achieve.

I'm going to spend a bit of time today trying to talk to my Teltonika (I think I may have cracked it, but I've thought that before!) but I see you've already managed it.

If I don't get any joy would you be happy to give me some pointers?

I also really like your dashboard layout. I haven't spent much time on doing the 'pretty' work yet as I'm trying to figure out the 'make it work' stuff still. Is that from the standard set or is it a plugin like mushroom?

Honestly, I just looked at your "router" dashboard again and it's so very close to my own goal that it's scary! I wouldn't even have thought of the slider to switch SIMs - but that's absolutely the way to do it.
 
You could also (probably) get the speed from CanBus. ESPHome has a canbus integration:

Yes, I've seen that. I was considering trying it as you can pull other info such as the D+ signal so you could build more complex logic - e.g. if the van is moving and the engine isn't running then it's either being towed or being stolen. Add a presence sensor which I can leave in the van if it is being legitimately towed and we know all is good. Otherwise trigger all the security devices and notify me.

There are just too many things that are 'possible' - for now I'm going to try (really hard :D) to focus on the useful stuff and I'm sure as I learn and explore that this will turn into a form of mild illness where I'm going to have E-ink displays showing me the current price of digestive biscuits in the nearest supermarket on my planned route....
 
I saw some of that on the other thread dpsuk999 and it's exactly what I aspire to achieve.

I'm going to spend a bit of time today trying to talk to my Teltonika (I think I may have cracked it, but I've thought that before!) but I see you've already managed it.

If I don't get any joy would you be happy to give me some pointers?

I also really like your dashboard layout. I haven't spent much time on doing the 'pretty' work yet as I'm trying to figure out the 'make it work' stuff still. Is that from the standard set or is it a plugin like mushroom?

Honestly, I just looked at your "router" dashboard again and it's so very close to my own goal that it's scary! I wouldn't even have thought of the slider to switch SIMs - but that's absolutely the way to do it.
Sure no problem. When you press either of the sim buttons it then tells you how much data you have used, nearly every page has on my dashboard has further buttons to delve deeper 🤣
 
IMG_6696.webp

Subscribers  do not see these advertisements

 
Same for my 2 Fogstar batteries, it tells me status and how much energy both on Ah and kWh of energy I’ve used also knowing the exactly how much water I have in my tanks too via 2 water meters, one on the in and the other on the pump outlet
 
Holy crap! That's a lot of effort and automation. More than my house!

Err... That's a lot of gizmos. How many watts does your van use just sitting there? 😅
 
It's built. It's awesome! I found a really good, inexpensive metal enclosure for it and am thinking of building a second one as the HA device as I suspect it's going to eat through microSD cards otherwise.
microSD cards are OK for messing around with, but for a more resilient system HDD, and now, SSD have 'wear levelling' built in.

I don't run HA, but I do use Node-RED and my Home control system has been running 24/7 for the past two years with no problems.

From another Forum (Node-RED), it seems that HA Users are starting to get problems with older RPi 32 bit devices because NodeJS stopped supporting 32 bit devices in V22. Node-RED will carry on supporting NodeJS 20 until April 2026 as they use 'unofficial' builds. Even numbered NodeJS versions are LTS (Long Term Support).

Long story short - don't use RPi 32 bit devices as they are/will go out of support. Or, don't update!
 
pull data from my Teltonika router (so far without success) as I need the GPS speed
I haven't started delving into that yet, but (and don't know if you are using it!) Teltonika have a RestAPI you can get data from. Used to do this on the previous Router.


Looks like you need to Authenticate before pulling the Data. Postman is good for getting to the bottom of the API calls, it will show headers, responses, etc, etc. Sign up for a free account, my always go to when fathoming this stuff out. Mindboggling at first, but if you are in to this stuff, it gets easier with use - especially if you leave your previous calls available. (Have to with the state of my memory these days!!)
 
OMG ... keep Lenny HB away from this thread otherwise he'll have loads of new projects and he still hasn't finished his existing ones! :LOL:
 
Interesting...

No, I didn't know about that CeeJay13 - thank you.

So far I've tried MQTT and setting up Modbus TCP server/client and passing data through Data To Server - all of which has failed miserably!

I've send a PM to dpsuk999 to point me in the right direction as it always seems that there are six different ways of achieving the same thing!

In the meantime I've successfully setup BatMon and am pulling all the Fogstar data through and can switch charge/discharge on/off from HA. Really easy to do (once you've figured out that the MAC address it auto populates in the config is WRONG!!!)

Another step forward and another thing ticked off the 'to do' list.

Want to figure out how to create those nice little toggle switches instead of the massive buttons from the button card next...
 
I like being tucked up in bed and asking alexa to put the kettle on. Turning the heating on before we leave the pub is useful too.
 
Oooh! made some progress.

I fiddled around with the Teltonika Data to Server parameters and can now see the data in MQTT Explorer (this is the Modbus TCP server/client experiment)

Still struggling to pull that into HA though. I created some sensors but the topic path doesn't seem to be right (or maybe they shouldn't be sensors at all - I'm just basing it on what I did for the Victron kit)

Subscribers  do not see these advertisements

 
I'm off to the Pi shop later to buy a Pi5, an M2 hat and an SSD...
Well, that was a faff...

Pi needs a standard Raspbian SD card to boot up. Write/verify - 20 minutes gone.

SSH in then do the update/upgrade.... 20 more minutes gone. Reboot

Update the eeprom, reboot, change the boot order, set up VNC (I'm running headless) so that I can run Imager from the Raspbian desktop to flash the SSD with the Home Assistant image (surprisingly quick!)

Remove SD, reboot and off we go with the Home Assistant "this might take 20 minutes"

One and a half hours later...

Currently restoring the backup. Let's hope it works....

But I'm happy in my choice. I think this is the right setup given what I plan to do with it.

I got the active cooling too.

That's me financially invested now, can't just leave it as a battery monitor. Need to start doing clever stuff...
 
I'm a great believer in KISS, however...

I haven't installed the lights yet, but
There are going to be quite a few computers and micro controllers in my van :D
Have you considered running just one server with virtual machines for each of your many applications? I have had great success with Proxmox. Just one server can run all sorts of things. I have Home Asistant, Plex media server, a router (pfsense) and a general office Linux all on one server - it’s been rock solid.

Raspi 5 consumes a lot of power so a proxmox on Intel N100 runs a lot more, for similar power consumption.

For controlling things - like lighting - using ESP32 based controllers with ESPhome loaded on them is really good and offers control even if the central server is down.
 
I've seen the N100 but to be honest I'm on so many different learnung curves at the moment that it's one thing too many right now.

It may well be revisited later, but i've massively over specd my solar and my battery to the point where even with my fridge on 24/7 for the last three weeks (before the sun came out) I've struggled to get much lower than 98% SOC (from the shunt not the questionable Fogstar readings).

That's with my VenusOS Pi, my HA Pi, two ESP32 and my Pi5 "vanputer" running too and no B2B installed yet. Oh, and the Teltonika router.

I'm not overly concerned about power consumption for the moment. I'm generating far more than I consume.

Of course, if I go down the induction cooking route and start adding water pumps and other significant draws then that might need revisiting.
 
Thanks matbic - he's the one that inspired me to go down this rabbit hole!

I used his method to bring in the Victron kit - although I did need to make some minor modifications.

Just been watching his Peplink API tutorial to see if it might help me bring data in from my Teltonika router - but of course the API is just different enough that I'm not making much headway....
 
I've got several N100 (and now N150) boxes at home running HA, routers and home cloud services. I think they make me sense than a Pi5 for most situations. Already has a box, an SSD connector and cooling. With variants with twin drives or dual ethernet.

However, if I run a smart home setup in the van, it needs to be really low power. Otherwise during the winter months, my battery will be flat in a week. It'll have to be a Pi4 on SD. Which is plenty fast enough for HA.
 
Mine's all going to be hard wired with an "OFF" switch for when I'm not using the van.
 
Just been watching his Peplink API tutorial to see if it might help me bring data in from my Teltonika router - but of course the API is just different enough that I'm not making much headway....
I have a nice link from HA to my Pepwave but have not done much with Teltonika. I don’t think there is much in common between the two.

I used the REST API with my Pepwave (I prefer it to using MQTT - as you don’t need a broker running) and I think Teltonika provides one as well: https://developers.teltonika-networks.com/
This would be my suggestion for the best way forward. To call the REST api is very easy in HA but you do need to get the access token first and use it with every call. This can be done with HA. I am in my van for the next 4 weeks and don’t have a Teltonika with me but I can work out some examples for you when I get back.

As an alternative approach - Teltonika has the optional package to become an MQTT broker this seems like the simplest way to go. The last few posts here seem to have got it working. https://community.home-assistant.io/t/teltonika-rut-mqtt-config/409964

With MQTT it is very helpful to use a viewer such as: https://github.com/mqtt-viewer/mqtt-viewer or http://mqtt-explorer.com/

You can use one of these to pick out the messages you want to monitor. Sending commands to the Teltonika via MQTT might be a bit more tricky.
 
Mine's all going to be hard wired with an "OFF" switch for when I'm not using the van.
Switching HA off without shutting it down first is not a good idea. It is easy to corrupt the storage if you just disconnect the power! You can use a GPIO pin on the RasPi to trigger an automation to shut down HA - this is how I do it. Unfortunately once shut down like this a RasPi still consumes power so you then need to cut the power completely with you off switch.

This is a useful option to provide a single button to do both things: https://geekworm.com/products/geekworm-x-c1-kit

I went over the top and used this: https://geekworm.com/products/x729
It accepts a wide input voltage range so you can connect it to the van 12v directly and it has a battery so you can give HA time to shut down correctly if the power is lost. With this we just turn the Van power on/off as usual and this board keeps HA safe.

Subscribers  do not see these advertisements

 
Thanks matbic (y)

It's a learning curve, and I just learned something important!

I'm guessing you could just create a button on the HA dashboard to do the same without hardwiring stuff to the GPIO pins?

(off to try that now!)
 
Last edited:
However, if I run a smart home setup in the van, it needs to be really low power. Otherwise during the winter months, my battery will be flat in a week. It'll have to be a Pi4 on SD. Which is plenty fast enough for HA.
I agree a Pi4 is plenty powerful enough to run Home Assistant for absolutely everything except the new local voice control feature (here an Intel i3 would be the minimum).

I don’t think there is any way to keep HA going over the winter months without a mains hook up or a punchy solar setup. A RasPi4 uses about 3W when on idle, not much can be done about that. Then I guess you would need another 5W or so to run the modem/router to get remote access. So that’s going to be at least 0.6A drain on battery all the time.

My suggestion to use an Intel processor was to bring a collection of separate servers in to one so as to make it much neater to install and manage.
 
Thanks matbic (y)

It's a learning curve, and I just learned something important!

I'm guessing you could just create a button on the HA dashboard to do the same without hardwiring stuff to the GPIO pins?

(off to try that now!)
In the automation editor you will find the action you require under “home assistant supervisor” in the “other” category.
 
My suggestion to use an Intel processor was to bring a collection of separate servers in to one so as to make it much neater to install and manage.
I think this is where I will end up eventually. For the moment the Pi is fine for doing the learning. It won't be difficult to repurpose it for something later!

I haven't started with the voice stuff yet (I know it's a big thing in HA at the moment) but if I can get at least the main functions done with voice control then that would be epic!

Subscribers  do not see these advertisements

 

Join us or log in to post a reply.

To join in you must be a member of MotorhomeFun

Join MotorhomeFun

Join us, it quick and easy!

Log in

Already a member? Log in here.

Latest journal entries

Back
Top