Serial Gateway and MQTT Broker
Maybe this is enough for your requirement:
@FotoFieber Thanks for the suggestion, I got that working. I have had to change MyController to read an MQTT gateway. Problem now is MyController can't read the MQTT format of this script. Any suggestions or tips ?
MyController does such a great job with handling MySensors' data, it would be a pity to loose that functionality.
The script uses the serial protocol and should be compatible with the mysesnosrs mqtt-gateway. Are the pub/sub-topics set correct?
@FotoFieber MyController is getting the MQTT msg, but doesn't like it's format, i've had continuous error msg like below:
2017-02-16 18:17:34,657 ERROR [Thread-4] [org.mycontroller.standalone.provider.mysensors.MySensorsProviderBridge:60] Unable to process this rawMessage:RawMessage(gatewayId=2, data=2;0;1;0;23;36, subData=mysensors/1/out/, isTxMessage=false, networkType=MY_SENSORS)
org.mycontroller.standalone.message.RawMessageException: Unknown message format, Topic:mysensors/1/out/, PayLoad:2;0;1;0;23;36
at org.mycontroller.standalone.provider.mysensors.MySensorsRawMessage.updateMQTTMessage(MySensorsRawMessage.java:114) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
MyController is set up with the correct topic, as seen in above Topic:/mysensors/1/out/ (i've also tried without the ending /).
2;0;1;0;23;36 Is a correct message according to the serial API. I don't know anything about your controller...sorry
Maybe the controller needs the ; translated to / in the topic?
Have you tried to switch pub/sub topic?
@Frank-C Current approach of MyController on MQTT see only payload on message. Other data(nodeId, sensorIds, etc) from topic. Kindly create a request on MyController issue page. I will address this. If we address this I am not going to create separate service to parse serial-to-real-mqtt service type.
@jkandasa Thanks for the follow up. I can see MyController is modifying the serial message into a customized MQTT msg (as you have said).
MyController works great with the serial so it would be good to keep that as is, and if we had an independent service to publish to a separate MQTT broker would be very helpful?
@Frank-C cool, we will go with independent service.