I thought about a "auto discovering", of the (slave) devices.
For that i created 2 files in /etc/avahi/services/:
<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">Modbus Slave 1 (Klimaanlage)</name>
<service>
<type>_modbus._tcp</type>
<port>502</port>
<txt-record>slave_id=1</txt-record>
<txt-record>device=Klimaanlage</txt-record>
</service>
</service-group>
<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">Modbus Slave 2 (Stromzaehler)</name>
<service>
<type>_modbus._tcp</type>
<port>502</port>
<txt-record>slave_id=2</txt-record>
<txt-record>device=Stromzaehler</txt-record>
</service>
</service-group>
Any thoughts about, to create such file while installing/building?
I know, that its up to the end user to fill in the correctly IDs/slaves etc.
But why not advertise the service regardless?
I thought about a "auto discovering", of the (slave) devices.
For that i created 2 files in
/etc/avahi/services/:Any thoughts about, to create such file while installing/building?
I know, that its up to the end user to fill in the correctly IDs/slaves etc.
But why not advertise the service regardless?