mwcam Posted June 12, 2015 at 09:59 AM Posted June 12, 2015 at 09:59 AM Hallo Forum, ich möchte zu folgendem Aufbau meiner Wetterstation: LAN->Raspberry->USB->MasterBrick mit div. Bricklets noch eine "Außenstelle" hinzufügen: StepDown Brick->MasterBrick mit div. Bricklets->WiFi Ext. Auf dem Raspberry laufen ein aktuelles Raspian und die aktuellen Versionen von brickv und brickd. Ebenfalls läuft das Beispielprojekt weather_station.py ohne Probleme. Über brickv kann ich über WiFi auf die Außenstelle zugreifen. Jetzt die Python (absoluter) Anfängerfrage: Wie kann ich in meinem Python Script eine zweite IPconnection für den "Außensensor" hinzuzufügen? Bereits Danke vorab für Eure Mühe und schöne Grüße, mwcam Sorry, falls ich diesen Punkt im Forum irgendwo ünerlesen habe... Quote
Malik Posted June 13, 2015 at 03:28 PM Posted June 13, 2015 at 03:28 PM Ich habe es so gemacht: HOST1 = "localhost" HOST2 = "192.168.1.20" #------ if __name__ == "__main__": ipcon1 = IPConnection() ipcon1.connect(HOST1, PORT) ipcon2 = IPConnection() ipcon2.connect(HOST2, PORT) Quote
mwcam Posted June 15, 2015 at 06:24 AM Author Posted June 15, 2015 at 06:24 AM ...und das funktioniert wunderbar Vielen Dank! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.