ctlbox / controlbox-connector-py Goto Github PK
View Code? Open in Web Editor NEWAPI to connect to the objects running in a controlbox microcontainer on an embedded device, implementing in Python.
License: GNU General Public License v2.0
API to connect to the objects running in a controlbox microcontainer on an embedded device, implementing in Python.
License: GNU General Public License v2.0
Hi Matt,
Here's what I get when running a ControllerDiscoveryFacade
in a celery task with these discoveries:
discoveries = [
ControllerDiscoveryFacade.build_serial_discovery(sniffer),
ControllerDiscoveryFacade.build_tcp_server_discovery(sniffer, "brewpi", known_addresses=(TCPServerEndpoint('localhost', '127.0.0.1', 8332),)),
]
Traceback:
timed out
Traceback (most recent call last):
File "/home/glibersat/Sources/brewpi-env/controlbox-connect-py/controlbox/protocol/async.py", line 201, in _do
callme()
File "/home/glibersat/Sources/brewpi-env/controlbox-connect-py/controlbox/connector_facade.py", line 78, in loop
self._open()
File "/home/glibersat/Sources/brewpi-env/controlbox-connect-py/controlbox/connector_facade.py", line 64, in _open
connector.connect()
File "/home/glibersat/Sources/brewpi-env/controlbox-connect-py/controlbox/connector/base.py", line 125, in connect
self._conduit = self._connect()
File "/home/glibersat/Sources/brewpi-env/controlbox-connect-py/controlbox/connector/base.py", line 302, in _connect
self._protocol = self._sniffer(result)
File "/home/glibersat/Sources/brewpi-env/brewpiweb/controller/tasks.py", line 14, in sniffer
return determine_line_protocol(conduit, all_sniffers)
File "/home/glibersat/Sources/brewpi-env/controlbox-connect-py/controlbox/protocol/io.py", line 69, in determine_line_protocol
l = conduit.input.readline()
File "/home/glibersat/Sources/brewpi-env/controlbox-connect-py/controlbox/support/proxy.py", line 28, in wrapped
result = func(_args, *_kwargs)
File "/usr/lib/python3.5/socket.py", line 575, in readinto
return self._sock.recv_into(b)
socket.timeout: timed out
You can try that once I've updated the connector-integration branch on brewpiweb.
Guillaume
This is part of the effort to create a stable application API.
The object types on the device each are identified by a unique ID byte. This ID is mapped to the python class that provides the shadow implementation for that object. (A shadow is a remote proxy to the object.)
The framework will provide some object types out the box, and make it easy to map these to python. However, the application developer is free to define the object IDs for the types used in their application and the corresponding object shadows in python.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.