As discussed on Discord, I had it working both on an ESP8266 with WiFi as well as on an Arduino Uno with an ethernet shield. The MQTT libraries and the code for translating the messages forth and back was identical.
If I find the code and manage to tidy it up a little bit I can share it via github.
What is the hardware you are using to control the roller shutters? Any two relay board with snubber filter? I’m looking for something like Shelly 2.5 but wired (without wifi).
At the beginning I planned to use these very wide spread dirty-cheap relay modules as they can be found on Aliexpress and so on (two-channel because one channel for up and one for down).
But I was not happy with the fact that I design an own board but have to add another cheap-a** chinese module to it. So meanwhile I think I will design the relays directly into my node board. Doing so, I can either solder the relay directly onto my board or I can use a relay socket so that I could exchange the relays later on (if necessary).
As snubbers I will use premade modules (R+C+Varistor) which I will solder directly on my board.
Hey -
I have a boiler system which has a CAN interface which is used with a proprietary standard.
I want to read out everything on Home Assistant and possible alter variables e.t.c.
The manufacturers Estyma, also do some really nice cheap boiler controls, and whilst I was originally planning to implement controls in KNX, if I could talk to their CAN system using Home Assistant, I’d be tempted to use their CAN bits, which are really good value.
Obviously there are cheaper ways out of this with homebrew stuff, but this is an off-the-shelf robust solution, and time is also a factor…
There are a couple of homebrew projects, where they have written Python code to build devices that will interface with the CAN code of the boiler controls… I think I am probably out of my depth and it would be worth trying to find someone to pay to write something to take the output from the boiler and translate it into home assistant usable form, but the fact that someone has reverse engineered the protocol, or obtained it, as it is proprietary and is using it in another project gives me hope that it can be done, even if I don’t quite have the skills to do it:
Kematics Pelle project looks promising…
The project has a good Wiki on the CAN protocol:
Another project here:
Any idea where to start on this! Anyone interested in taking it on as a job?
I think this is a good approach. ESPHome already talks CAN. I have a setup like this running for our car. Works nicely. Even if you want to use CAN as your home automation bus, this is a great solution. You don’t have to connect your bus wire physically to your Home Assistant hardware. Instead you use an ESP as a bridge and put it wherever your bus is accessible. You can even create multiple bus lines that are not directly connected (i.e. in different parts of the house). The needed hardware is extremely cheap.
Hm, on the one hand I agree with you because of exactly the arguments you mentioned.
On the other hand: what do one expect from HA? If we say that the (physical) interface support should happen on totally independent external projects (like ESPhome), HA will only be a frontend with an API.
I think this should not be the claim of HA - it already supports interfaces natively (Serial, Modbus). Why not CAN bus as well? Most stuff (arbitration, error handling, etc…) is handled by the Linux driver or by the python-can library. So on HA side it would be “only” ID and data handling.
I know that HA can not support every manufacturer-specific interface OOTB/natively. But CAN bus is kind of standard like Modbus.
Other thing to be taken into account then relaying on “external” projects:
the user has to take additional steps to get it working (set up an ESP-board, including programming, soldering…)
problems can be either on HA-side or an the other side (ESPhome). So where to report? Who will be willing to help?
what if a community-driven project like ESPhome is canceled?
when HA develops to be only a frontend for external integrations, HA won’t be able to run in a stand-alone environment.
@Jpsy I agree with your points! These points are definitely one of the advantages when one wants to de-centralize a system.
But my concerns from above will still remain. And it looks to me as if this becomes more a political as a technical decision
Just read about the ”WiCAN” crowdfunding campaign from MeatPi Electronics on Crowd Supply for an an open source ESP32-C3 based CAN adapters with either USB or OBD-II/OBD2 in (addition to Wi-Fi and BLE support) which made me want to request for an integration based on python-can or similar?
I started investigating into the topic of CAN-bus as part of my home automation and think the idea is still great.
I bought a Canable USB-to-CAN from Aliexpress and flashed the original firmware from canable.io → Candlelight, so gs-usb onto it.
When connecting it to a spare raspberry pi with raspbian, I see the interface with ip link list, but in Home Assistant (running with Home-Assistant OS on another raspberry pi), I can’t see the interface.
I thought after your PR, that all the modprobes are activated or do I miss something here?
What is needed to get the canable running on Home Assistant OS?
Do I have to activate some additional drivers? If yes, where to put the configs?
I hope this topic is still being worked on, as I think the option to have Home Assistant with CAN bus is really interesting, especially as an alternative to KNX.
As far as I’ve done my research, there is no real “wired” alternative to KNX available, which is a possibility for further USP.
Hi, no the PR was only to include the driver support for different type of can adapters
You still need to modprobe it…
I do it in a python script that i load with a custom component, you can do it for example in an automation on startup HA
Btw, i use SLCAN firmware on it, i had better experience with it
if you use candlelight firmware, then i dont think you need to use the slcand/ifconfig commands, but i believe you still need to modprobe it
you also see i do the canutils.apk manually, i do for tools like candump, cansend etc…
seems canutils is not part of the edge alpine main repo, only from the community
I’ve now added the python_scripts functionality and added an “modprobe_canbus.py” script inside /config/python_scripts/modprobe_canbus.py with the content as described.
This script is started on HA startup with an Automation.
How can I check if it is working now?
When I open up the Terminal via the Terminal addon (supervisor addon “Terminal & ssh”) there is still no can interface showing up when I enter “ip link list”.
Is it a problem that I’m using Home Assistant OS?
I found something on another discussion where you’ve been involved
Has it something to do with me “looking” inside the wrong system with the terminal addon?
When I enter “slcand” or “candump”, there is no package even after restarting HA with the Python script.
Sorry for the inconvenience, I think I haven’t fully understood the Home Assistant structure yet…
Can you check with ssh addon with lsmod if the module is actually loaded? It should be listed there… Or try to run the python script first from ssh addon… Normally a candump inside ssh addon after installing canutils should give you indeed the dump visible
lsmod shows
gs_usb → used by: 0
can_dev → used by: 1 gs_usb
But this was actually already showing before I did the python script, so I’m not sure if the script did anything at all.
It doesn’t show slcan, can_raw or can
How do I start the python script from the ssh addon?
I can cd to the /config/python_scripts folder and there is the modprobe_canbus.py but when I try to start it with python3 modprobe_canbus.py
It only errors with bash: python3: command not found