McMelloW hat geschrieben: ↑Samstag 4. Januar 2020, 12:29
This is the contents of the config_default.ini
Code: Alles auswählen
[GENERAL]
DEBUG = 1
HOST = 0.0.0..r
PORT = 9501
[MYSQL]
SQL = 1
SQL_HOST = 127.0.0.1
SQL_DB = iSpindle
SQL_TABLE = Data
SQL_USER = iSpindle
SQL_PASSWORD = ohyeah
SQL_PORT = 3306
[CSV]
CSV = 1
OUTPATH = /home/pi/iSpindel/
DELIMITER = ;
NEWLINE = \r\n
DATETIME = 1
The OUTPATH exist. What about the owner/right for this folder Owner is pi. Rights are: rwxr-xr-x
Did also a new Set Fermentation Start.
Hello
Well, the python script iSpindle.py first looks for the configuration (.ini file) in the ~/iSpindel-Srv /config/iSpindle_config.inil file if this file is not present then it looks in the same folder for iSpindle_default.ini.
Please remove the HOST and PORT values in your default.ini just to prevent others from making the same mistake. HOST and PORT are retrieved from the database and not from the .ini file:
Is this output done life, everytime the iSpindle sends a message it is added to the CSV file as well?
Yes, the data just received by the iSpindle.py is written in the database and added to the .csv file at the same time. if you run the script manually you should see:
Code: Alles auswählen
[fritz@ARCHPC iSpindel-TCP-Server]$ python2 /home/fritz/github/iSpindel-TCP-Server/iSpindle.py
waiting for connection... listening on port: 9501
...connected from: ('127.0.0.1', 44026)
waiting for connection... listening on port: 9501
sh: /usr/local/bin/sendmail.py: File o directory non esistente
('127.0.0.1', 44026) received:'{"name":"Supposta000","ID":578XXXX,"token":"*onlybeer","angle":36.01368,"temperature":21.4375,"temp_units":"C","battery":4.202294,"gravity":1.047791,"interval":900,"RSSI":-55}\r\n'
('127.0.0.1', 44026) Input Str is now:{"name":"Supposta000","ID":578XXXX,"token":"*onlybeer","angle":36.01368,"temperature":21.4375,"temp_units":"C","battery":4.202294,"gravity":1.047791,"interval":900,"RSSI":-55}
('127.0.0.1', 44026) Sent ACK.
('127.0.0.1', 44026) Time elapsed: 0.001058
('127.0.0.1', 44026) Supposta000 (ID:578XXXX) : Data Transfer OK.
('127.0.0.1', 44026) - closed connection
('127.0.0.1', 44026) - writing CSV
('127.0.0.1', 44026) Recipe Name not found - CSV Error: 'NoneType' object has no attribute '__getitem__'
('127.0.0.1', 44026) - CSV data written.
('127.0.0.1', 44026) Reading last recipe name for corresponding SpindelSupposta000
('127.0.0.1', 44026) Recipe Name not found - CSV Error: 'NoneType' object has no attribute '__getitem__'
('127.0.0.1', 44026) - writing to database
('127.0.0.1', 44026) - DB data written.
Ciao