Hi mwittig,
thanks for your Response. I tried a little bit around yesterday and also had the idea to doe this with as Shell script. This Looks ver similiar to yours. Bur I wasn’t able to integrate this into pimatic. So I found another solution. I wrote a small python script (my very first) which should run as daemon. This python script act as as subscriber, take the Messages, split them and send every value as a provider, with a different topic. Find attached the script, may be some other can participate.
#!/usr/bin/env python3
import paho.mqtt.client as mqtt
def on_connect(client, userdata, flags, rc):
client.subscribe("#")
def on_message(client, userdata, msg):
if msg.topic == “ebus/bai/Status01”:
Status01_1,Status01_2,Status01_3,Status01_4,Status01_5,Status01_6 = msg.payload.decode().split(";")
client.publish(“maho/Status01_01”, str(Status01_1))
client.publish(“maho/Status01_02”, str(Status01_2))
client.publish(“maho/Status01_03”, str(Status01_3))
client.publish(“maho/Status01_04”, str(Status01_4))
client.publish(“maho/Status01_05”, str(Status01_5))
client.publish(“maho/Status01_06”, str(Status01_6))
if msg.topic == “ebus/bai/Status02”:
Status02_1,Status02_2,Status02_3,Status02_4,Status02_5 = msg.payload.decode().split(";")
client.publish(“maho/Status02_01”, str(Status02_1))
client.publish(“maho/Status02_02”, str(Status02_2))
client.publish(“maho/Status02_03”, str(Status02_3))
client.publish(“maho/Status02_04”, str(Status02_4))
client.publish(“maho/Status02_05”, str(Status02_5))
if msg.topic == “ebus/bai/ReturnTemp”:
ReturnTemp_1,ReturnTemp_2,ReturnTemp_3 = msg.payload.decode().split(";")
client.publish(“maho/ReturnTemp_01”, str(ReturnTemp_1))
client.publish(“maho/ReturnTemp_02”, str(ReturnTemp_2))
client.publish(“maho/ReturnTemp_03”, str(ReturnTemp_3))
client = mqtt.Client()
client.connect(“192.168.1.46”,1883,60)
client.on_connect = on_connect
client.on_message = on_message
client.loop_forever()