Hardwire ESP device to HA (raspberryPi / MiniPC / ...) - NO Wifi OR Ethernet / Poe

Hi there:)

(I’m new to this forum as post author, so please tell me if something is wrong with the question)


About my problem:

My goal is to get an home assistant instance running completely offline without any internet connection as well as without any local network (wifi / ethernet / poe) but including sensors and other devices (preferably EspHome compatible devices) to build my own “smart home” for my camper.

  • The reason why I want the system to work fully offline should be clear by now: I want to be able to move with the system to “any place on earth” without restrictions using my system. It should just need electricity (also as little as possible). I already know that this should be possible, just have to figure something out about the clock drifting maybe…

  • The reason why I don’t want any wireless connections: I just want it as reliable as possible and don’t want to rely on any router putting out a stable connection 100% of time. (Maybe other wireless systems could work, but as I said I would like to use EspHome devices mostly, which afaik only connect via wifi or ethernet to HA)

  • The reason why I also want it to work without any local network at all: 2 main reasons. First I would like to not need to use a router with maybe multiple switches and poe injectors at all because of the current they would draw all the time, even if nothing is really used at the time.


To sumarize:

My dream setup would be to have HA running on a miniPC or raspberryPi, which is somehow hardwired connected via some 2-wire bus connection (can bus / modbus / rs485 / uart / …) to a tree network of EspHome devices all connected via the two bus wires.

Afaik to the date of today nothing like this exists already and therefore I#m asking here if anybody has seen / heard anything about some similar systems?

I am almost sure the system like this will not work out of the box and maybe not at all, but I would still be very grateful for any tip I can get her in this forum pushing me in the right direction!

Thank U all! :pray:t3:

No.
The Home Assistant UI is a web server.

That’s okay I guess, but maybe there is a way to connect to devices (or just one master device hardwired via e.g. exposed GPIO pins of the RaspberryPi ?! :eyes:

Home Assistant uses an internet connection to retrieve updates. And it needs an internet connection for a NTP source to set the time (if you have a capable firewall/router you may be able to intercept the NTP traffic and route it to a local NTP source).

You could theoretically run HA and a browser on the same machine and communicate over localhost. It is not the way it is designed to be run, but you could try.

You can also (via a custom component) access the GPIO pins on a pi if that is your host.

With Firmata you can communicate with arduino devices over serial.

HA is only useful if it has/sees a network stack. That NTP problem can be worked around, if you base would be a ARM SBC, make sure it has an RTC working. I bought a handful os RTC modules that plug onto the GPIO header of RaspberryPis (3 and 4), enabling the driver is easy. Having a proper and accurate enough time/wallclock is quite crucial. Otherwise you probably shouldn’t starting with Home Automation I think.

10 years ago I lived in 2 countries, my real home had 500kbit/s DSL, so basically carrying a large HDD with me as copy/clone/transfer although long nightly automated transfers could handle part of the datasync, backup etc.
Then I stopped with DSL and got a more or less flatfee 4G-for-homes ISP, 25Mbps up/down, so certain offline methodology I could stop using, but ‘more-or-less flatfee’ is still not like a real fixed cable internet.
Beside that I copied/cloned the whole system to a robot funproject, with a cheap 4G dongle and a minimum plan (1GB/month or unlimited but 128kbps or just 32kbps based connection VodafoneGmbH has when you used the 1GB).

Because the robot was solar powered, I put everything on a RaspberryPi3B and a ArduinoNano. My own serial cable protocol and a Huawei 4G USBdongle to connect to ‘internet’. But the Wifi of the RaspberryPi3B is hotspot for the local network, so I connected my tablet to it.

Now I type this on a NanoPi-R6C which has 8GB RAM and 32GB eMMC. It is below 1Watt idle, about 10Watt full load, 5V powered. If I want, I can move all virtual machines from my Pi4 to this NanoPi-R6C right now. That is 6 VMs, including a router. The router is my own, but OpenWRT is likely easier. The HA VM is 1G RAM and 2 cores allocated, 5G storage. It runs influxDB, Node-RED, Domoticz, you name it. I would practice/test online, then plan for offline. I haven’t tested what happens if HA is cut-off from internet for longer time, But I sure will. And because of the NTP, probably see why this is needed. It seems to me that this is because older Raspberries have no RTC (Pi5 and others have) so even on a PC with big lithium coin-cell I would opt for disabling this HA specific NTP. Note that I run HA Supervised on ARM, so maybe different. An it is a VM, the VM host provides a virtual RTC to HA.

This guy rewired his rv using esphome.

`https://www.reddit.com/r/homeassistant/comments/1bnzwz5/replaced_rv_control_with_ha/

Looking at their set up, you are basically creating your own plc. They can be bought pre built, kincony can be used with mqtt to communicate with HA. You could likely get away with a crossover connection via ethernet. You should also be able to connect an rtc module to it.

https://www.kincony.com/product/plc

You can also extend the plc with breakout relay / senor boards. A few of their boards use esp32’s and can be flashed with esphome but I don’t think it’s possible with the plc units.

1 Like

Just a follow-up what I suggested: After that post I dis-allowed internet access for that that VM that runs HA Supervised on a VM (on RPi4 now). I actually forgot already and wanted to run a Debian apt update but it didn’t work of course as it could find any Debian repo/mirror.
I have clicked the Energy desktop of that VM HA instance about 10 times since dis-allowing internet access, did not notice anything strange, it all works fine. It also seems storage hunger of HA is also a bit less as I don’t see warnings (the VM is deliberately limited on rootfs storage size).
The system actually uses no wireless/cordless/RF, is/was not a goal, but good as well. I use ser2net and a ‘TCP/IP port multiplier’ prototyped in Node-RED, so I can let multiple systems fetch DSMR telegrams via TCP/IP.