koalatux / koubachi-pyserver Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
May you please give me an example of how to define several koubachi devices?
I have installed the server, but when I push the button on my Koubachi, I get this:
192.168.86.88 - - [14/Jul/2020 20:35:38] "PUT /v1/smart_devices/0006668015b6?locale=en HTTP/1.1" 200 -
[2020-07-14 20:35:44,465] ERROR in app: Exception on /v1/smart_devices/0006668015b6/readings [POST]
Traceback (most recent call last):
File "/home/pi/.local/share/virtualenvs/koubachi-pyserver-1kINM90X/lib/python3.7/site-packages/flask/app.py", line 2446, in wsgi_app
response = self.full_dispatch_request()
File "/home/pi/.local/share/virtualenvs/koubachi-pyserver-1kINM90X/lib/python3.7/site-packages/flask/app.py", line 1951, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/pi/.local/share/virtualenvs/koubachi-pyserver-1kINM90X/lib/python3.7/site-packages/flask/app.py", line 1820, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/home/pi/.local/share/virtualenvs/koubachi-pyserver-1kINM90X/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/home/pi/.local/share/virtualenvs/koubachi-pyserver-1kINM90X/lib/python3.7/site-packages/flask/app.py", line 1949, in full_dispatch_request
rv = self.dispatch_request()
File "/home/pi/.local/share/virtualenvs/koubachi-pyserver-1kINM90X/lib/python3.7/site-packages/flask/app.py", line 1935, in dispatch_request
return self.view_functionsrule.endpoint
File "/home/pi/koubachi-pyserver/src/koubachi_pyserver/app.py", line 171, in add_readings
handle_readings(mac_address, convert_readings(mac_address, body_parsed))
File "/home/pi/koubachi-pyserver/src/koubachi_pyserver/app.py", line 95, in handle_readings
write_to_csv(mac_address, readings, directory=output['directory'])
File "/home/pi/koubachi-pyserver/src/koubachi_pyserver/app.py", line 115, in write_to_csv
with open(file_path, 'x') as file:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/koubachi_sensor_readings/0006668015b6_button.csv'
192.168.86.88 - - [14/Jul/2020 20:35:44] "POST /v1/smart_devices/0006668015b6/readings?locale=en HTTP/1.1" 500 -
[2020-07-14 20:35:47,453] ERROR in app: Exception on /v1/smart_devices/0006668015b6/readings [POST]
Traceback (most recent call last):
File "/home/pi/.local/share/virtualenvs/koubachi-pyserver-1kINM90X/lib/python3.7/site-packages/flask/app.py", line 2446, in wsgi_app
response = self.full_dispatch_request()
File "/home/pi/.local/share/virtualenvs/koubachi-pyserver-1kINM90X/lib/python3.7/site-packages/flask/app.py", line 1951, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/pi/.local/share/virtualenvs/koubachi-pyserver-1kINM90X/lib/python3.7/site-packages/flask/app.py", line 1820, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/home/pi/.local/share/virtualenvs/koubachi-pyserver-1kINM90X/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/home/pi/.local/share/virtualenvs/koubachi-pyserver-1kINM90X/lib/python3.7/site-packages/flask/app.py", line 1949, in full_dispatch_request
rv = self.dispatch_request()
File "/home/pi/.local/share/virtualenvs/koubachi-pyserver-1kINM90X/lib/python3.7/site-packages/flask/app.py", line 1935, in dispatch_request
return self.view_functionsrule.endpoint
File "/home/pi/koubachi-pyserver/src/koubachi_pyserver/app.py", line 171, in add_readings
handle_readings(mac_address, convert_readings(mac_address, body_parsed))
File "/home/pi/koubachi-pyserver/src/koubachi_pyserver/app.py", line 95, in handle_readings
write_to_csv(mac_address, readings, directory=output['directory'])
File "/home/pi/koubachi-pyserver/src/koubachi_pyserver/app.py", line 115, in write_to_csv
with open(file_path, 'x') as file:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/koubachi_sensor_readings/0006668015b6_button.csv'
192.168.86.88 - - [14/Jul/2020 20:35:47] "POST /v1/smart_devices/0006668015b6/readings?locale=en HTTP/1.1" 500 -
What am I doing wrong?
with the (full) shutdown of the 'koubachi cloud' (https://labs.koubachi.com) the encryption keys can no longer be downloaded. Is there any alternative to obtain those keys in the future or must devices, where the keys were not stored before the shutdown, be considered as e-waste now?
All dependencies are available as Debian packages in Debian buster. Update the README.md with instructions on how to install these dependencies without using pip.
Please also test on a Raspberry Pi with Raspbian Buster.
The current README.md only documents running a development server. Please add documentation about running properly in production.
because my father can use his koubachi sensors for 2 months now with koubach-pyserver without issues he asks if there is a possibility to donate a bit to your project. irrc paypal would be preferred. Further I can provide a small bash script which provides monthly/weekly graphs of the sensor data based on the csv files for those not using some sort of 'homecloud'. I may post it as a gist somewhere.
Hi,
Koubachi-pyserver is up and running on my Raspbian Buster and I am very glad. I've managed to export csv into xml that can be read by my home automation box (eedomus). One question though, is it possible to configure the delay between reports sent by the koubachi sensor ? I've tried to change the "transmit_interval" value in get_device_config class of app.py with no luck.
Thanks and congrats for your work !
I couldn't find the polling interval configuration anywhere. It seems to be set in app with an value imported from sensors. Also there is a class "Sensor" declared in sensors which includes this setting, but there is no configuration for this option. I would be great if this feature could be added or if the configuration could be set in app with the other configuration settings.
Pycrypto has seen its last update five years ago. It has open security issues (although patched in Debian, but not on pypi). Evaluate alternatives and move away from it.
Possible alternatives:
Hi, koubachi-pyserver is running well on my Raspberry Pi 3 - but both of my Sensors lost connection today.
I tried to reach the server from other devices with curl -sSf -o /dev/null http://myraspi:8005/ && echo "server is OK"
- all fine!
But both Sensors are showing orange blinking LED, saying "I cannot reach my server".
I am not able to connect to the Sensors as described here since none of my devices is willing to establish a connection to one of the Sensor.
Win 10pro 20H2 and Android 11 are showing up the Sensor's SSID koubachi_config (xxxxxx) but are not willing to connect - macOS 11.1 doesn't even show the Sensors.
If anyone has any ideas I would be very happy - thanks!
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.