Add MQTT URL to environment variables and refactor simulation components
This commit is contained in:
@@ -6,10 +6,7 @@ const MqttEvents = () => {
|
||||
const { setTouch, setTemperature, setHumidity } = useDrieUIValue();
|
||||
useEffect(() => {
|
||||
|
||||
const client = mqtt.connect("ws://192.168.0.192:1884", {
|
||||
username: "gabby",
|
||||
password: "gabby"
|
||||
});
|
||||
const client = mqtt.connect(`ws://${process.env.REACT_APP_SERVER_MQTT_URL}`);
|
||||
|
||||
client.subscribe("touch");
|
||||
client.subscribe("temperature");
|
||||
|
||||
Reference in New Issue
Block a user