Jump to content
View in the app

A better way to browse. Learn more.

Tinkerunity

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Geschrieben

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...

Geschrieben

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)

 

Geschrieben
  • Autor

...und das funktioniert wunderbar :)

 

Vielen Dank!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Gast
Reply to this topic...

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.