Skip to content

Commit

Permalink
Little improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-manuel committed May 5, 2024
1 parent 00a1b0d commit 14ee3e6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ It's possible to have multiple instances, but it's not automated. Follow these s
sed -i 's:dbus-mqtt-pv:'$driverclone':g' /data/etc/$driverclone/service/log/run
```
5. Change the `device_name` and increase the `device_instance` in the `config.ini`
5. Change the `device_name`, increase the `device_instance` and update the `topic` in the `config.ini`
Now you can install and run the cloned driver. Should you need another instance just increase the number in step 1 and repeat all steps.
Expand Down
8 changes: 4 additions & 4 deletions dbus-mqtt-pv/dbus-mqtt-pv.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ def main():
DBusGMainLoop(set_as_default=True)

# MQTT setup
client = mqtt.Client("MqttPv_" + str(config['MQTT']['device_instance']))
client = mqtt.Client("MqttPv_" + str(config['DEFAULT']['device_instance']))
client.on_disconnect = on_disconnect
client.on_connect = on_connect
client.on_message = on_message
Expand Down Expand Up @@ -425,9 +425,9 @@ def _n(p, v): return (str("%i" % v))
})

DbusMqttPvService(
servicename='com.victronenergy.pvinverter.mqtt_pv_' + str(config['MQTT']['device_instance']),
deviceinstance=int(config['MQTT']['device_instance']),
customname=config['MQTT']['device_name'],
servicename='com.victronenergy.pvinverter.mqtt_pv_' + str(config['DEFAULT']['device_instance']),
deviceinstance=int(config['DEFAULT']['device_instance']),
customname=config['DEFAULT']['device_name'],
paths=paths_dbus
)

Expand Down

0 comments on commit 14ee3e6

Please sign in to comment.