Functionised the updates from domoticz, added switch statement to test for topic type