That ties it all up nicely!
I need help, I can’t get decimals in my modbus temperature sensor, I have it configured with scale: 0.1 and no decimals appear
Could you post your sensor config please?
com.victronenergy.vebus_Battery temperature_61_int16_10 -3266.8 to 3266.8_/Dc/0/Temperature_no_Degrees celsius
- platform: modbus
scan_interval: 1
registers:- name: “Temperatura batería modbus”
hub: victron
data_type: uint
device_class: temperature
unit_of_measurement: “°C”
slave: 239
register: 61
scale: 0.1
- name: “Temperatura batería modbus”
Edit.
I have already found the solution
precision: 1
Well done!
If you want to make this post more useful to others who follow add your updated config and mark it as the solution.
Could really use some help here.
I have an Eastron modbus kwh-meter for my Tesla-charger.
Connected an Elfin EW11 rs485 to tcpip adapter to it.
Figured it would just be a matter of setting a hub to the right ip, port and protocol, add a sensor and be done with it. After 3 hours still nothing.
Even with logging enabled I have no idea if the hub is receiving data, nor can I check it on the Elfin itself.
Does anyone have an Elfin EW11 running in hassio and care to share both the config in hassio as well as on the device itself?
Greatly appreciated!
It would help more for you to share your modbus config and a link to the manual you have for your device please?
Hi all,
i have found this topic having really usefull information.
i have been searching for a really long time to find information to input the CCGX in HA and i could not find anywhere right information.
Using this info i think i would go for Modbus instead of MQTT.
Still i have a few troubles to know where to start now.
Does anyone have more information regarding how i can install Modbus on my HA installation? I’m rather new to this and a bit of help in how i can make the information into my dashboard would really be appreciated .
Thanks
There is no useful manual for it, other than this http://www.hi-flying.com/elfin-ew10-elfin-ew11
Regarding the hassio config it’s just de default with a different port and ip
Looking for someone with a similar setup who has gotten it to work
If you can, please post your config so I can confirm that is not the problem.
You also need the manual for the Eastron modbus kwh-meter…thats where the information to connect to the registers will be.
Cheers.
Hi to all,
i would integrate home assistant with my webserver modbus slave tcp.
Is there a possibility to see if integration is ok or not?
I’ve anything in my home assistant logs.
Configuration.yaml:
#ModBus Ave
modbus:
name: ave
type: TCP
host: 192.168.1.10
port: 502
A switch test:
- platform: modbus
coils:
- name: Switch1
hub: ave
slave: 1
coil: 13
- name: Switch2
slave: 2
coil: 14
registers:
- name: Register1
hub: ave
slave: 1
register: 11
command_on: 1
command_off: 0
Log:
Invalid config for [modbus]: extra keys not allowed @ data['modbus'][0]['host']. Got None
not a valid value for dictionary value @ data['modbus'][0]['type']. Got None
required key not provided @ data['modbus'][0]['baudrate']. Got None
required key not provided @ data['modbus'][0]['bytesize']. Got None
required key not provided @ data['modbus'][0]['method']. Got None
required key not provided @ data['modbus'][0]['parity']. Got None
required key not provided @ data['modbus'][0]['stopbits']. Got None. (See /config/configuration.yaml, line 45).
Thank you so much for any help.
Regards,
Alessandro
Hi @alessandro.bardi You have a problem in your modbus hub config.
Your ‘TCP’ is not the same as the corrrect ‘tcp’
See the docs here for the correct format for a modbus hub.
# Example configuration.yaml entry for a TCP connection
modbus:
name: hub1
type: tcp
host: IP_ADDRESS
port: 2020
Fix that and test again and you could be good to go I think!
Hi Steave,
thanks for your reply.
I’ve fix that but now i’ve these errors:
Invalid config for [switch.modbus]: required key not provided @ data['coils'][0]['slave']. Got None. (See ?, line ?).
I’m newby on modbus, i don’t know where can i take coils, slave and register numbers from my modbus.
Thank you so much.
Regards,
Alessandro
@alessandro.bardi Progress at least as the hub errors are gone.
You need to consult the manual for your modbus device to obtain that information.
I’ve this scheme and i would control only “44ABRX”:
The question is: how can i check the status of my entities?
Which code identify a single light?
Is there a guide to study the mechanism?
Thanks for your patience,
Alessandro
Hi,
finally i’ve found all registers of my lights.
I’ve a bit problem with output values of my thermostat:
Thermostat temp goes out from Modbus in HEX value like this: “80AF”
I would keeps out the first two bytes (80) and convert to decimal the others two (AF).
I’ve tried with this code but climate entitiy doesn’t create from HA.
Thanks in advance for any help,
Alessandro
When I bumped into this error "Invalid config for [switch.modbus]: required key not provided @ data[‘coils’][0][‘slave’]. Got None. (See ?, line ?). ", I didn’t have a “slave” defined. The documentation mentions ‘slave’ is optional for Modbus over TCP, but for me it was definitely “required”.
This works for me on a Sealevel 463-E :
switch:
- platform: modbus
scan_interval: 3
coils:
- name: sea0
hub: sealevel
slave: 1
coil: 0
- name: sea1
hub: sealevel
slave: 1
coil: 1
With the above, the switches will show up on the overview page and be functional.
I don’t manage to show my modbus climate on Hassio
I’ve this code on my climates.yaml:
But no climate showed on Hassio.
This is my modbus bit istructions:
The temp values are in bin or hex format?
I don’t Know, and maybe the issue is there.
Any help is apreciated.
Regards,
Alessandro
It looks like:
40128 = Use a unsigned integer /10. value= 202 - 20.2 C
40129= setpoint, you have to build the integer from the binary, combination of o/off in b13, and the SP , same format. Setpoint of 20.2 C = 202 integer in , since this will always be below 100,
then you can use a single word write on b7-b0,
You probably cannot use the Climate object, try with read/write Modbus first.
Download the Chipkin Modbus testing tool, you can build your numbers, and read/write to to modbus registers.
salve,
stò provando a far dialogare HA con un simulatore PLC server, la comunicazione avviene, e se cambio i dati sul PLC me li cambia anche nella plancia di HA, ma se volessi fare il contrario, ovvero scrivere da HA e far cambiare il valore nel PLC è possibile?