I’m really struggling with Modbus integration under HA. I have setup two VMs in a Win10 box. I started first with Oracle VirtualBox but pulling out data from a Modbus controller seems to be pain in the b**t. I posted about this problem in here.
I’m using Moxa NPORT tcpip-rs485 converter which works nicely with different Modbus softwares (e.g. Modbus Poll, Modbus Master). I even made a stress test with MB Poll and no problems with polling my Modbus controller.
Now I have installed VMware virtual machine on the same WIn10 box. Polling the Modbus controller works but serial port crashes after 1-2min. I get following error message and HA stops polling:
I’m using exactly the same configuration.yaml in both VMs:
modbus:
- name: "Ouman EH686 autotalli"
# close_comm_on_error: false
type: serial
baudrate: 38400
bytesize: 8
method: rtu
parity: N
stopbits: 1
port: /dev/ttyS1
delay: 0
timeout: 5
# retry_on_empty: true
# message_wait_milliseconds: 450
sensors:
- name: "Autotalli T (°C)"
address: 64
count: 1
input_type: holding
scan_interval: 5
slave: 1
unit_of_measurement: °C
scale: 0.01
precision: 1
I just tested this configuration in Virtualbox and polling worked OK but then I restarted VirtualBox and polling didn’t work any more. I didn’t change anything, just restarted VB and HA.
Setting up a serial port in VMware is very simple:
So you can’t change that many parameters.
I would need help from an expert and I know there are guys on this forum who are experts in Modbus.
Now when Modbus is not working properly in VMs it seems that virtual machines don’t seem to work in my case. I have ordered a NUC which I will get next week.
Big question is how to install HA in the NUC? So, is HA Container the only way to go?