database is not beeing updated with values
polpas opened this issue · comments
I followed your tutorial everything fine koubachi config.yml at correct destination with format as example.
database when start docker is created without errors.
I've been 3 days with project running and have no values in charts. the information from the yaml is not showed for examle the name of the koubachi in the charts as a data information.
I'm sending you the yml of my koubachi so you can see if any issues in the structur
config.txt
e
according to your logs, readings have been received with a POST request.
is the ./readings/koubachi.db
sqlite db really empty?
the charts should use GET requests to receive values, kinda like this:
[GIN] 2022/01/13 - 15:28:55 | 200 | 162.702526ms | 192.168.1.100 | GET /v1/smart_devices/0006666f77bb/rssi
[GIN] 2022/01/13 - 15:28:56 | 200 | 111.866576ms | 192.168.1.100 | GET /v1/smart_devices/0006666f77bb/temperature
[GIN] 2022/01/13 - 15:28:56 | 200 | 58.356173ms | 192.168.1.100 | GET /v1/smart_devices/0006666f77bb/soil_temperature
[GIN] 2022/01/13 - 15:28:57 | 200 | 4.989018642s | 192.168.1.100 | GET /v1/smart_devices/0006666f77bb/battery_voltage
[GIN] 2022/01/13 - 15:28:57 | 200 | 108.747552ms | 192.168.1.100 | GET /v1/smart_devices/0006666f77bb/light
if you run the docker image without -v
or --volume
for the readings you will always lose the database with every container restart.
also make sure your port is exposed using -p
.
images of logs aren't really helpful. could you check and see for errors using docker logs
.
i.E. docker logs $(docker ps -q --filter publish=8005 --filter volume=/app/readings)
docker ps -q --filter publish=8005 --filter volume=/app/readings
should return the correct container ID if the port and volume are correct.
When I config koubachi the first communication with the server is
PUT /v1/smart_devices/000666806f61?locale=en
Is this command well performed?
could you please show the logs using docker logs
looks like you are receiving readings. is the database file writable by docker? restarting the container after removing the database file should create a new one. if there are no rows in the device and sensors tables they should be created automatically, manually entering data is not recommended.
the only other option that i can recommend is debugging the code locally to find the root cause.
I have bought another koubachi and it populates the values in database without issues. My 1st device is broken.