I have a thermostat that controls the AC/Heat upstairs which is located on my bedroom wall. Right below that I have another Millivolt thermostat for the gas fireplace in my bedroom. If I want to upgrade the fireplace thermostat to a smart wifi that needed a c wire can I pull the 24 volts from the other thermostat? Thanks
This is possible, but it will take some additional components, or a smart thermostat made for the purpose. The main issue is that a regular smart thermostat is going to use power provided to it on the R wire and the C wire. You can think of those as positive and negative (but it's not really because its alternating current). When the thermostat takes an action to turn on heat, what it really does is connect the R wire to the W wire. That is connecting 24v to the W wire, and that is just incompatible with the millivolt system.
So, yes, you can run an R and C wire from the existing thermostat to power the new one, but then you also need to wire up some additional relays to provide the signaling the millivolt system expects. The basic idea is that the 24v that the thermostat switches would be used to drive a relay to provide the contact closure the millivolt system expects. The relays would need to be properly spec'ed for the job.
If you happen to have a smart thermostat made for millivolt that requires 24v only to power itself, that would be very straight forward. I just don't know if such a thermostat exists.