Giter VIP home page Giter VIP logo

koubachi-pyserver's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

koubachi-pyserver's Issues

Problems running.

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?

Test installation on Raspbian Buster

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.

Evaluate IOT backends to support

  • What IOT backends do we want to support?
  • How does the MQTT message's topic and payload look like?
  • Do we want to support REST interfaces as well?

donation missing

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.

Delay between reports

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 !

setting polling interval

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.

sudden device problems

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!

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.