for expanders I2C IO
I need to read about them. I’m still new this is my first Home Automation implementation and I would like to learn as much as I can and choose the best way to create my HA experience…
Also have you confirmed the second one is ttyACM1?
Try deleting ttyACM0 from your config, can you then see ttACM1 ok?
Before spending too much money on Arduino or cabling parts I would start off simple and make a test rig. I would still recomend having a look into the Sonoff-Tasmota firmware all you need to install is Mosquitto and setup WiFi and it is pretty much set and forget after that.
When I conncect using Putty (“dmesg” command) i see ATM0 and ATM1 so there is no connection error.
For sonoff Tasmota - I have one configured myself couple of days ago and it work flawless using MQTT. This is a good method, but I still would like to have everything wired and controlled by Rpi / Arduinos because this way I can avoid problems like password change issue / sonoff crash / wifi signal problems / new software update errors / security issues. When I use method with FTP’s I don’t need to deal with so much problems that can occurs during some years of using HA, plus maintain standard installation up and running even when something bad happen.
Thanks nickrout, I don’t have experience with shields but I think it will be not so easy to control Pin inside Shield using Home Assistant (MQTT will work but setup will be hard).
I will try to create some custom components like arduino2.py today. Maybe this helps.
I’ve created custom component and works great. The files are placed in GIT repo. If someone want to connect more than one Arduino my custom components will work Arduino Boards extension.
Tomorrow I will provide some images how this works.
Nice project you got, and as @nickrout said, it’s envious that u can wire you house.
In my opinion wiring your entire house from a central location for all sensors isn’t the best. Except you want to use voltage balancing in signal transmission coupled with STP cabling.
If you don’t it will only input noise into your system, especially if u have stuffs like washing machine, dryers, HVAC or other high inductive loads on in the house. In short any strong EMC generator.
The desire to avoid WiFi is legit as I will do same, but instead of trying to have all the twisted pair cables run to the center, I would follow the advice of @nickrout and use the ESP chips over Twisted pair Ethernet cables using MQTT. Besides, the idea of using USB is a lot of work. There is a possibility the allocated name might change when the Pi reboots, or the connection being flaky over time. USB is not as rugged as Ethernet that is properly crimped or punched down.
What you can do is run a single network cable to each location, and connect an ESP chip to that cable to manage that location. Like each location having its own ESP chip over the network. Ethernet will help you manage the long runs, and this will ensure your signals are legit and less prone to interference.
This to me is not only better but more reliable and robust. I get Its not the cheapest, but could be depending on how u allocate the chip to the locations. You don’t want a system that just works, you need a system that is robust and future prove. With the Ethernet cable, u can easily expand over time as more things come up by simply changing the chip that manages that location.
You said it might be hard software wise, but there are tons of code out there based on ESP MQTT that u can modify for your use case. You got time, so why the rush? Better you build something robust now and safe you a headache in the future, than just rush it and u potentially regret it later on.
Thank you for advice @Odianosen25 I want to achieve best results so I will consider your idea. Please tell me is there some scheme / sketch to show how to build this kind of installation? I have some experience in Home Assistant but I still don’t choose the best way to build whole installation. The idea of ESP looks good because when technology change - you can just change hardware and system will be up to date. Question is, shoud I use ESP in every room in light + electricity slot and how to connect them in reality?
If you got the cash, I will advice each room having their own ESP with the associated shield for cabled Ethernet. The ESP can then be connected to the relay and sensors needed for that room.These sensors can be the window or door for that room. That to me is the best approach, and it allows the MQTT topics to be better managed also.
As to the schematic, I haven’t built one before so not sure how to show you one. But since you have a light and sensors schematic, all you need to do is to edit it so each light connects to its room ESP. An Added advantage is that the ESP could also be used to sense contact closure for dumb low voltage wall switches, so either HA or the wall switch (while also reporting to HA) can control the lights locally.
I think this is the idea @nockrout, @Odianosen25, @wills106 talked about. From arduino you have relays that control 5v > 230 V cirquit. You can switch relays on or off, plus you can control switches and sensor directly in each room. Sensor is connected to 230V (if Sonoff / Shelly) or 3,3 V separate UTP cable (mySensors, Arduino). These MQTT hardware can be controlled over Internet or Wifi.
I am a bit confused by your Diagram.
Are you suggesting for example to be able to switch a relay on/off with both an Arduino and a Sonoff / ESP at the same time? I don’t understand the green wires from the Arduino to the relays.
If you use a Sonoff T1 Wall switch it is self contained, the relay to switch the light bulb on/off is built in to the wall switch.
You can turn the light on / off by either physically touching the switch or by using mqtt.
Don’t Worry about the 10/100BaseT IEE802.3u and Ethernet. They are there just to get the point across that I am referring to using the Cat 5/5e/6 for it’s intended purpose.
Home Assistant using Cat 5 or what ever to the switch.
Switch connects to each Ethernet Shield (Running MQTT Client) in Room 1, Room 2 etc.
Ethernet Shield - Arduino
Arduino has sensors, relays, switches etc
Arduino passes sensor states back to Ethernet Shield.
Ethernet Shield converts sensor state into MQTT.
Ethernet Shield sends MQTT back down the ethernet cable where Mosquitto passes it to Home Assistant and does it’s thing.