As you have seen from the responses, there are multiple ways to do what you want.
- use the switch node to check for a word contained in the topic
- have multiple
mqtt-in
nodes with different topics (I wouldn't do this, I like to have one spot for the msgs to come into NR to make maintenance easier six months down the line.)
In any case, do you control the device creating the MQTT message?
What do the parts of the topic represent?
You have a topic
pellmon/timer_hotwater_period
and
pellmon/timer_hotwater_start_1
If that repredsents a unit(pellmon) a sensor (timer a device (hotwater) and an action (period or start_1) you could dfine your topic as /unit(?)/sensor/device/action
which would result in the msg.topics being:
pellmon/timer/hotwater/period
and
pellmon/timer/hotwater/start_1
This would make it much easier to split the topic when it gets to NR. In eithor case here is a sample showing the two ideas:
[{"id":"1ec8d46.1e2feac","type":"group","z":"b02613e9.ed1bd","name":"Example using `switch` node","style":{"fill":"#ffefbf","label":true,"color":"#000000"},"nodes":["9186f60e.d98688","42d5cb10.0b9124","2aaa06d1.1ddcea","5ee57486.6cfa04"],"x":54,"y":359,"w":532,"h":162},{"id":"9186f60e.d98688","type":"mqtt in","z":"b02613e9.ed1bd","g":"1ec8d46.1e2feac","name":"","topic":"pellmon/#","qos":"2","datatype":"auto","broker":"8d5cfad5.2fc08","x":140,"y":440,"wires":[["5ee57486.6cfa04"]]},{"id":"42d5cb10.0b9124","type":"debug","z":"b02613e9.ed1bd","g":"1ec8d46.1e2feac","name":"period (switch)","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":460,"y":400,"wires":[]},{"id":"2aaa06d1.1ddcea","type":"debug","z":"b02613e9.ed1bd","g":"1ec8d46.1e2feac","name":"start (switch)","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":450,"y":480,"wires":[]},{"id":"5ee57486.6cfa04","type":"switch","z":"b02613e9.ed1bd","g":"1ec8d46.1e2feac","name":"","property":"topic","propertyType":"msg","rules":[{"t":"cont","v":"period","vt":"str"},{"t":"cont","v":"start","vt":"str"}],"checkall":"false","repair":false,"outputs":2,"x":270,"y":440,"wires":[["42d5cb10.0b9124"],["2aaa06d1.1ddcea"]]},{"id":"8d5cfad5.2fc08","type":"mqtt-broker","name":"","broker":"mqttpizw.local","port":"1883","clientid":"","usetls":false,"compatmode":false,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthRetain":"false","birthPayload":"","closeTopic":"","closeQos":"0","closeRetain":"false","closePayload":"","willTopic":"","willQos":"0","willRetain":"false","willPayload":""},{"id":"3df1483a.874ab","type":"group","z":"b02613e9.ed1bd","name":"Simulate data creation","style":{"fill":"#ffefbf","label":true,"color":"#000000"},"nodes":["b5fd4031.138768","640c83fb.1c3e94","fb79eebc.5454f"],"x":54,"y":19,"w":352,"h":122},{"id":"b5fd4031.138768","type":"inject","z":"b02613e9.ed1bd","g":"3df1483a.874ab","name":"period","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"pellmon/timer_hotwater_period","payload":"1234","payloadType":"num","x":150,"y":60,"wires":[["640c83fb.1c3e94"]]},{"id":"640c83fb.1c3e94","type":"mqtt out","z":"b02613e9.ed1bd","g":"3df1483a.874ab","name":"","topic":"","qos":"","retain":"","broker":"8d5cfad5.2fc08","x":330,"y":80,"wires":[]},{"id":"fb79eebc.5454f","type":"inject","z":"b02613e9.ed1bd","g":"3df1483a.874ab","name":"start","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"pellmon/timer_hotwater_start_1","payload":"1234","payloadType":"num","x":150,"y":100,"wires":[["640c83fb.1c3e94"]]},{"id":"e1ced345.a4e928","type":"group","z":"b02613e9.ed1bd","name":"Example using two `mqtt-in` nodes","style":{"label":true,"fill":"#ffefbf","color":"#000000"},"nodes":["61c4ee8f.9c5be8","505d81c3.1e","a97c8fcd.91c6b8","c7ec295b.ef7bc8"],"x":54,"y":159,"w":532,"h":162},{"id":"61c4ee8f.9c5be8","type":"mqtt in","z":"b02613e9.ed1bd","g":"e1ced345.a4e928","name":"","topic":"pellmon/timer_hotwater_period","qos":"2","datatype":"auto","broker":"8d5cfad5.2fc08","x":210,"y":200,"wires":[["505d81c3.1e"]]},{"id":"505d81c3.1e","type":"debug","z":"b02613e9.ed1bd","g":"e1ced345.a4e928","name":"period","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":490,"y":200,"wires":[]},{"id":"a97c8fcd.91c6b8","type":"mqtt in","z":"b02613e9.ed1bd","g":"e1ced345.a4e928","name":"","topic":"pellmon/timer_hotwater_start_1","qos":"2","datatype":"auto","broker":"8d5cfad5.2fc08","x":210,"y":280,"wires":[["c7ec295b.ef7bc8"]]},{"id":"c7ec295b.ef7bc8","type":"debug","z":"b02613e9.ed1bd","g":"e1ced345.a4e928","name":"start","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":490,"y":280,"wires":[]}]