GithubHelp home page GithubHelp logo

avanseti / smartsensor Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 2.0 26.68 MB

SmartSensor: a sensor to be used as sensor and actuator within existing buildings.

License: GNU General Public License v3.0

C++ 86.78% HTML 0.20% C 2.46% CMake 0.47% Shell 0.15% Python 9.71% JavaScript 0.24%
arduino embedded-software hardware-designs iot low-power xbee

smartsensor's People

Contributors

dependabot[bot] avatar macsnoeren avatar michelmegens avatar therealflobo avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

timboooh

smartsensor's Issues

Hardware version 1.0 issues

The following issues have been found that will be fixed as soon as possible:

  • USB connector wrong type. At this moment the pins have been mirrored.
  • Tacticle switches wrong package. At this moment 90 degrees rotated that results in continuous reset.
  • All MOSFETs have been connected reversed, resulting in always switched one via de diode.
  • The light sensor has been connected reversed. Make sure the correct package is used!

SmartNetwork crashes when Influx database is not available

0|SmartNet | Traceback (most recent call last):
0|SmartNet |   File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 421, in _make_request
0|SmartNet |     six.raise_from(e, None)
0|SmartNet |   File "<string>", line 3, in raise_from
0|SmartNet |   File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 416, in _make_request
0|SmartNet |     httplib_response = conn.getresponse()
0|SmartNet |   File "/usr/lib/python3.8/http/client.py", line 1348, in getresponse
0|SmartNet |     response.begin()
0|SmartNet |   File "/usr/lib/python3.8/http/client.py", line 316, in begin
0|SmartNet |     version, status, reason = self._read_status()
0|SmartNet |   File "/usr/lib/python3.8/http/client.py", line 277, in _read_status
0|SmartNet |     line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
0|SmartNet |   File "/usr/lib/python3.8/socket.py", line 669, in readinto
0|SmartNet |     return self._sock.recv_into(b)
0|SmartNet | socket.timeout: timed out
0|SmartNet |
0|SmartNet | During handling of the above exception, another exception occurred:
0|SmartNet |
0|SmartNet | Traceback (most recent call last):
0|SmartNet |   File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
0|SmartNet |     self.run()
0|SmartNet |   File "/usr/lib/python3.8/threading.py", line 870, in run
0|SmartNet |     self._target(*self._args, **self._kwargs)
0|SmartNet |   File "/home/maurice/.local/lib/python3.8/site-packages/paho/mqtt/client.py", line 3591, in _thread_main
0|SmartNet |     self.loop_forever(retry_first_connection=True)
0|SmartNet |   File "/home/maurice/.local/lib/python3.8/site-packages/paho/mqtt/client.py", line 1756, in loop_forever
0|SmartNet |     rc = self._loop(timeout)
0|SmartNet |   File "/home/maurice/.local/lib/python3.8/site-packages/paho/mqtt/client.py", line 1164, in _loop
0|SmartNet |     rc = self.loop_read()
0|SmartNet |   File "/home/maurice/.local/lib/python3.8/site-packages/paho/mqtt/client.py", line 1556, in loop_read
0|SmartNet |     rc = self._packet_read()
0|SmartNet |   File "/home/maurice/.local/lib/python3.8/site-packages/paho/mqtt/client.py", line 2439, in _packet_read
0|SmartNet |     rc = self._packet_handle()
0|SmartNet |   File "/home/maurice/.local/lib/python3.8/site-packages/paho/mqtt/client.py", line 3033, in _packet_handle
0|SmartNet |     return self._handle_publish()
0|SmartNet |   File "/home/maurice/.local/lib/python3.8/site-packages/paho/mqtt/client.py", line 3327, in _handle_publish
0|SmartNet |     self._handle_on_message(message)
0|SmartNet |   File "/home/maurice/.local/lib/python3.8/site-packages/paho/mqtt/client.py", line 3570, in _handle_on_message
0|SmartNet |     on_message(self, self._userdata, message)
0|SmartNet |   File "/home/maurice/SmartSensor/SmartNetwork/smartnetwork/smartnetwork/smartnetwork.py", line 79, in <lambda>
0|SmartNet |     self.mqtt.on_message    = lambda client, userdata, msg:       self.mqtt_on_message(client, userdata, msg)
0|SmartNet |   File "/home/maurice/SmartSensor/SmartNetwork/smartnetwork/smartnetwork/smartnetwork.py", line 119, in mqtt_on_message
0|SmartNet |     self.process_node_data(plJson)
0|SmartNet |   File "/home/maurice/SmartSensor/SmartNetwork/smartnetwork/smartnetwork/smartnetwork.py", line 231, in process_node_data
0|SmartNet |     node = self.get_node_from_id(data["id"])
0|SmartNet |   File "/home/maurice/SmartSensor/SmartNetwork/smartnetwork/smartnetwork/smartnetwork.py", line 172, in get_node_from_id
0|SmartNet |     records = self.query.query(org=self.org, query=query)
0|SmartNet |   File "/home/maurice/.local/lib/python3.8/site-packages/influxdb_client/client/query_api.py", line 100, in query
0|SmartNet |     response = self._query_api.post_query(org=org, query=self._create_query(query, self.default_dialect, params),
0|SmartNet |   File "/home/maurice/.local/lib/python3.8/site-packages/influxdb_client/service/query_service.py", line 258, in post_query
0|SmartNet |     (data) = self.post_query_with_http_info(**kwargs)  # noqa: E501
0|SmartNet |   File "/home/maurice/.local/lib/python3.8/site-packages/influxdb_client/service/query_service.py", line 338, in post_query_with_http_info
0|SmartNet |     return self.api_client.call_api(
0|SmartNet |   File "/home/maurice/.local/lib/python3.8/site-packages/influxdb_client/api_client.py", line 341, in call_api
0|SmartNet |     return self.__call_api(resource_path, method,
0|SmartNet |   File "/home/maurice/.local/lib/python3.8/site-packages/influxdb_client/api_client.py", line 171, in __call_api
0|SmartNet |     response_data = self.request(
0|SmartNet |   File "/home/maurice/.local/lib/python3.8/site-packages/influxdb_client/api_client.py", line 386, in request
0|SmartNet |     return self.rest_client.POST(url,
0|SmartNet |   File "/home/maurice/.local/lib/python3.8/site-packages/influxdb_client/rest.py", line 304, in POST
0|SmartNet |     return self.request("POST", url,
0|SmartNet |   File "/home/maurice/.local/lib/python3.8/site-packages/influxdb_client/rest.py", line 183, in request
0|SmartNet |     r = self.pool_manager.request(
0|SmartNet |   File "/usr/lib/python3/dist-packages/urllib3/request.py", line 79, in request
0|SmartNet |     return self.request_encode_body(
0|SmartNet |   File "/usr/lib/python3/dist-packages/urllib3/request.py", line 171, in request_encode_body
0|SmartNet |     return self.urlopen(method, url, **extra_kw)
0|SmartNet |   File "/usr/lib/python3/dist-packages/urllib3/poolmanager.py", line 330, in urlopen
0|SmartNet |     response = conn.urlopen(method, u.request_uri, **kw)
0|SmartNet |   File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 719, in urlopen
0|SmartNet |     retries = retries.increment(
0|SmartNet |   File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 376, in increment
0|SmartNet |     raise six.reraise(type(error), error, _stacktrace)
0|SmartNet |   File "/usr/lib/python3/dist-packages/six.py", line 703, in reraise
0|SmartNet |     raise value
0|SmartNet |   File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 665, in urlopen
0|SmartNet |     httplib_response = self._make_request(
0|SmartNet |   File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 423, in _make_request
0|SmartNet |     self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
0|SmartNet |   File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 330, in _raise_timeout
0|SmartNet |     raise ReadTimeoutError(
0|SmartNet | urllib3.exceptions.ReadTimeoutError: HTTPConnectionPool(host='localhost', port=8086): Read timed out. (read timeout=9.999623824842274)

Hardware: SuperCap not current limited!

The used supercap is not current limited and will blow the fuse. Please make the hardware fix and put a resistor. In the new design, the resistor will be implemented.

SmartNetwork crash

|SmartNet | During handling of the above exception, another exception occurred:
0|SmartNet | 
0|SmartNet | Traceback (most recent call last):
0|SmartNet |   File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
0|SmartNet |     self.run()
0|SmartNet |   File "/usr/lib/python3.8/threading.py", line 870, in run
0|SmartNet |     self._target(*self._args, **self._kwargs)
0|SmartNet |   File "/home/maurice/.local/lib/python3.8/site-packages/paho/mqtt/client.py", line 3591, in _thread_main
0|SmartNet |     self.loop_forever(retry_first_connection=True)
0|SmartNet |   File "/home/maurice/.local/lib/python3.8/site-packages/paho/mqtt/client.py", line 1756, in loop_forever
0|SmartNet |     rc = self._loop(timeout)
0|SmartNet |   File "/home/maurice/.local/lib/python3.8/site-packages/paho/mqtt/client.py", line 1164, in _loop
0|SmartNet |     rc = self.loop_read()
0|SmartNet |   File "/home/maurice/.local/lib/python3.8/site-packages/paho/mqtt/client.py", line 1556, in loop_read
0|SmartNet |     rc = self._packet_read()
0|SmartNet |   File "/home/maurice/.local/lib/python3.8/site-packages/paho/mqtt/client.py", line 2439, in _packet_read
0|SmartNet |     rc = self._packet_handle()
0|SmartNet |   File "/home/maurice/.local/lib/python3.8/site-packages/paho/mqtt/client.py", line 3033, in _packet_handle
0|SmartNet |     return self._handle_publish()
0|SmartNet |   File "/home/maurice/.local/lib/python3.8/site-packages/paho/mqtt/client.py", line 3327, in _handle_publish
0|SmartNet |     self._handle_on_message(message)
0|SmartNet |   File "/home/maurice/.local/lib/python3.8/site-packages/paho/mqtt/client.py", line 3570, in _handle_on_message
0|SmartNet |     on_message(self, self._userdata, message)
0|SmartNet |   File "/home/maurice/SmartSensor/SmartNetwork/smartnetwork/smartnetwork/smartnetwork.py", line 79, in <lambda>
0|SmartNet |     self.mqtt.on_message    = lambda client, userdata, msg:       self.mqtt_on_message(client, userdata, msg)
0|SmartNet |   File "/home/maurice/SmartSensor/SmartNetwork/smartnetwork/smartnetwork/smartnetwork.py", line 119, in mqtt_on_message
0|SmartNet |     self.process_node_data(plJson)
0|SmartNet |   File "/home/maurice/SmartSensor/SmartNetwork/smartnetwork/smartnetwork/smartnetwork.py", line 231, in process_node_data
0|SmartNet |     node = self.get_node_from_id(data["id"])
0|SmartNet |   File "/home/maurice/SmartSensor/SmartNetwork/smartnetwork/smartnetwork/smartnetwork.py", line 172, in get_node_from_id
0|SmartNet |     records = self.query.query(org=self.org, query=query)
0|SmartNet |   File "/home/maurice/.local/lib/python3.8/site-packages/influxdb_client/client/query_api.py", line 100, in query
0|SmartNet |     response = self._query_api.post_query(org=org, query=self._create_query(query, self.default_dialect, params),
0|SmartNet |   File "/home/maurice/.local/lib/python3.8/site-packages/influxdb_client/service/query_service.py", line 258, in post_query
0|SmartNet |     (data) = self.post_query_with_http_info(**kwargs)  # noqa: E501
0|SmartNet |   File "/home/maurice/.local/lib/python3.8/site-packages/influxdb_client/service/query_service.py", line 338, in post_query_with_http_info
0|SmartNet |     return self.api_client.call_api(
0|SmartNet |   File "/home/maurice/.local/lib/python3.8/site-packages/influxdb_client/api_client.py", line 341, in call_api
0|SmartNet |     return self.__call_api(resource_path, method,
0|SmartNet |   File "/home/maurice/.local/lib/python3.8/site-packages/influxdb_client/api_client.py", line 171, in __call_api
0|SmartNet |     response_data = self.request(
0|SmartNet |   File "/home/maurice/.local/lib/python3.8/site-packages/influxdb_client/api_client.py", line 386, in request
0|SmartNet |     return self.rest_client.POST(url,
0|SmartNet |   File "/home/maurice/.local/lib/python3.8/site-packages/influxdb_client/rest.py", line 304, in POST
0|SmartNet |     return self.request("POST", url,
0|SmartNet |   File "/home/maurice/.local/lib/python3.8/site-packages/influxdb_client/rest.py", line 183, in request
0|SmartNet |     r = self.pool_manager.request(
0|SmartNet |   File "/usr/lib/python3/dist-packages/urllib3/request.py", line 79, in request
0|SmartNet |     return self.request_encode_body(
0|SmartNet |   File "/usr/lib/python3/dist-packages/urllib3/request.py", line 171, in request_encode_body
0|SmartNet |     return self.urlopen(method, url, **extra_kw)
0|SmartNet |   File "/usr/lib/python3/dist-packages/urllib3/poolmanager.py", line 330, in urlopen
0|SmartNet |     response = conn.urlopen(method, u.request_uri, **kw)
0|SmartNet |   File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 719, in urlopen
0|SmartNet |     retries = retries.increment(
0|SmartNet |   File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 376, in increment
0|SmartNet |     raise six.reraise(type(error), error, _stacktrace)
0|SmartNet |   File "/usr/lib/python3/dist-packages/six.py", line 703, in reraise
0|SmartNet |     raise value
0|SmartNet |   File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 665, in urlopen
0|SmartNet |     httplib_response = self._make_request(
0|SmartNet |   File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 387, in _make_request
0|SmartNet |     conn.request(method, url, **httplib_request_kw)
0|SmartNet |   File "/usr/lib/python3.8/http/client.py", line 1256, in request
0|SmartNet |     self._send_request(method, url, body, headers, encode_chunked)
0|SmartNet |   File "/usr/lib/python3.8/http/client.py", line 1302, in _send_request
0|SmartNet |     self.endheaders(body, encode_chunked=encode_chunked)
0|SmartNet |   File "/usr/lib/python3.8/http/client.py", line 1251, in endheaders
0|SmartNet |     self._send_output(message_body, encode_chunked=encode_chunked)
0|SmartNet |   File "/usr/lib/python3.8/http/client.py", line 1011, in _send_output
0|SmartNet |     self.send(msg)
0|SmartNet |   File "/usr/lib/python3.8/http/client.py", line 951, in send
0|SmartNet |     self.connect()
0|SmartNet |   File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 187, in connect
0|SmartNet |     conn = self._new_conn()
0|SmartNet |   File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 171, in _new_conn
0|SmartNet |     raise NewConnectionError(
0|SmartNet | urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7fe0720dc4f0>: Failed to establish a new connection: [Errno 111] Connection refused

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.