Show IOT's temperature info in real time

Hi,
I want the my web page show IOT device1, device2, device3’s temperature in real time.
My though is create three topic iot:1, iot:2, iot3 for each device.
Then use push(transport, topic, event, payload) method so the chanel client in my webpage will got the temperature info and show them in real time.

But with this method, the iot devices will also received this messge right? How to avoide this?
The idea way of message flow should be
iot device -> Phx.Server -> java scipt chanel client.

Thanks

If you want to communicate something, which shall not be broadcast to your iot devices, then send the message on a channel your iot devices are not part of.

Push is only 1:1 for cli/server for that connected browser tab/device. Broadcast on the server is what publishes to everyone so pushing on the existing channel is all you need

I see, I am using pubsub for message sending. Maybe pure message sending through process is better.