Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - greg79

Pages: [1]
General Discussion / List of bricklet API functions
« on: November 26, 2017, 09:02:10 »
I'm in the process of creating a Python script that allows any sensor bricklet to be connected. To achieve this, I need a list of bircklet IDs, UIDs, name and the functions to register the device and the one to acquire sensor data, something like this:

brickletDevices = [
[259, "Ambient Light Bricklet 2.0",BrickletAmbientLight(uid, ipcon), BrickletAmbientLight.get_illuminance()]



At the moment I have to copy and paste the API functions manually from each bricklet's page which is tedious and time consuming. Is there a list of Python API methods and functions somewhere? The code would enumerate the connected bricklets, compare their ID against the list and print out the name, ID, and the acquired data.

The setup: I have a RPi3 running the Brick Daemon and bricklets connected.The RPi is connected to the local network and so is my terminal (macbook). I have managed to SSH into the RPi successfully and check both the version of the daemon and check the config file (there's none, it uses default values).
Code: [Select]
Config file '/home/pi/.brickd/brickd.conf' not found, using default values
Using the following config values:
  listen.address           =
  listen.plain_port        = 4223
  listen.websocket_port    = 0
  listen.mesh_gateway_port = 4240
  listen.dual_stack        = off
  authentication.secret    =
  log.level                = info
  log.debug_filter         =

Both the RPi and my laptop are connected to the same WIFI access point, Brick Viewer is set to 'localhost' and port 4223. When I hit 'connect', it doesn't yield any error, it just doesn't do anything. The whole setup was tested yesterday and worked fine (I saw the bicklets connected, I could see their UID too).
I have also tried:

- restart the daemon on both machines

- use a different WIFI network

- use '' as an address instead of 'localhost'

What am I doing wrong?

Pages: [1]