Olá,
Obrigado pelo retorno!
Ele instala normalmente.
O Recompilar fica carregando alguns segundo e depois para. E mesmo assim, quando clico em iniciar aparece essa tela.
Olhando os arquivo no github, vi que algum serviço usa a porta 5000. Eu tenho outro addon que usa essa mesma porta.
Abrir os aquivos desse outro addon e consegui alterar para outro porta e listado com o netstat, a porta 5000 agora está livre.
Seguindo o tutorial do Github, tbm tentei rodar no prompt, mas ele para na tela de debug.
bachelddd@ha:~/smsUps$ python3 smsUPS.py
********** dmslabs smsUPS v.0.39j
Starting up… 2022-02-01 10:35:25
Path: /home/hameassistant/smsUps
hassio_token:
Getting Config Parser.
Existe secrets.ini
Reading secrets.ini
Getting Config Parser.
Existe secrets.ini
False
NORMAL MODE
SMSUPS_SERVER: True
SMSUPS_CLIENTE: True
IP: 192.168.2.160
UPS_ID: 01
UPS_NAME: SMS
UPS_NAME_ID: ups_SMS_01
ALLOW_SHUTDOWN: True
info / Error! Code: OSError, Message, [Errno 6] No such device or address
MQTT connected with result code 0
Connected to 192.168.2.160
Subscribe Topics: (‘home/ups/cmd’, 0), (‘home/ups_SMS_01/cmd’, 0), (‘home/ups_SMS_01/json’, 0), (‘home/ups_SMS_01/batterylevel’, 0), (‘home/ups_SMS_01/BateriaBaixa’, 0), (‘home/ups_SMS_01/BateriaEmUso’, 0)
I was unable to open the serial port /dev/ttyUSB0
WEB SERVER Starting …
Loop start!
No UPS Data
Dados UPS Publicados…2022-02-01 10:35:28.447530
Port: 4443
Host: 0.0.0.0
- Serving Flask app ‘webserver’ (lazy loading)
- Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
- Debug mode: on
- Running on all addresses.
WARNING: This is a development server. Do not use it in a production deployment.
- Running on http://192.168.2.160:4567/ (Press CTRL+C to quit)
- Restarting with stat
Traceback (most recent call last):
File “smsUPS.py”, line 1574, in
dl.writeJsonFile(FILE_COMM, upsData)
NameError: name ‘FILE_COMM’ is not defined
********** dmslabs smsUPS v.0.39j
Starting up… 2022-02-01 10:35:29
Path: /home/bachelddd/smsUps
hassio_token:
Getting Config Parser.
Existe secrets.ini
Reading secrets.ini
Getting Config Parser.
Existe secrets.ini
False
NORMAL MODE
SMSUPS_SERVER: True
SMSUPS_CLIENTE: True
IP: 192.168.2.160
UPS_ID: 01
UPS_NAME: SMS
UPS_NAME_ID: ups_SMS_01
ALLOW_SHUTDOWN: True
info / Error! Code: OSError, Message, [Errno 6] No such device or address
MQTT connected with result code 0
Connected to 192.168.2.160
Subscribe Topics: (‘home/ups/cmd’, 0), (‘home/ups_SMS_01/cmd’, 0), (‘home/ups_SMS_01/json’, 0), (‘home/ups_SMS_01/batterylevel’, 0), (‘home/ups_SMS_01/BateriaBaixa’, 0), (‘home/ups_SMS_01/BateriaEmUso’, 0)
I was unable to open the serial port /dev/ttyUSB0
WEB SERVER Starting …
Loop start!
Port: 4443
No UPS Data
Host: 0.0.0.0
Dados UPS Publicados…2022-02-01 10:35:32.729842
- Debugger is active!
- Debugger PIN: 732-268-763
Traceback (most recent call last):
File “/home/bachelddd/smsUps/smsUPS.py”, line 1574, in
dl.writeJsonFile(FILE_COMM, upsData)
NameError: name ‘FILE_COMM’ is not defined
smsUPS.log:
2022-02-02 10:50:25,777 DEBUG LOG file: /home/bachelddd/smsUps/smsUPS.log
2022-02-02 10:50:25,779 DEBUG ********** dmslabs smsUPS v.0.39j
2022-02-02 10:50:25,779 DEBUG Starting up…
2022-02-02 10:50:25,779 DEBUG Path: /home/bachelddd/smsUps
2022-02-02 10:50:25,780 DEBUG Running inside HASSIO False
2022-02-02 10:50:25,780 DEBUG env1:
2022-02-02 10:50:25,780 DEBUG Existe secrets.ini
2022-02-02 10:50:25,784 WARNING Reading secrets.ini
2022-02-02 10:50:25,786 DEBUG Config: SMSUPS_FULL_POWER use default: 1450
2022-02-02 10:50:25,786 DEBUG Existe secrets.ini
2022-02-02 10:50:25,788 DEBUG Config: ALLOW_SHUTDOWN use default: True
2022-02-02 10:50:25,789 DEBUG Config: DEVELOPERS_MODE use default: False
2022-02-02 10:50:25,790 DEBUG PORTA secrets: /dev/ttyUSB0
2022-02-02 10:50:25,790 DEBUG SMSUPS_SERVER: True
2022-02-02 10:50:25,790 DEBUG SMSUPS_CLIENTE: True
2022-02-02 10:50:25,790 DEBUG MQTT_HOST: 192.168.2.160
2022-02-02 10:50:25,791 DEBUG IP: 192.168.2.160
2022-02-02 10:50:25,791 INFO os.name: posix
2022-02-02 10:50:25,792 DEBUG info / Error! Code: OSError, Message, [Errno 6] No such device or address
2022-02-02 10:50:25,792 INFO Starting MQTT 192.168.2.160
2022-02-02 10:50:25,793 DEBUG mqttStart MQTT_PASSWORD: ******
2022-02-02 10:50:25,802 DEBUG MQTT connected with result code 0
2022-02-02 10:50:25,803 INFO Subscribe Topics: (‘home/ups/cmd’, 0), (‘home/ups_SMS_01/cmd’, 0), (‘home/ups_SMS_01/json’, 0), (‘home/ups_SMS_01/batterylevel’, 0), (‘home/ups_SMS_01/BateriaBaixa’, 0), (‘home/ups_SMS_01/BateriaEmUso’, 0)
2022-02-02 10:50:26,814 INFO Port /dev/ttyUSB0 - is open: True
2022-02-02 10:50:28,617 DEBUG cmd:Name / str: 49 ff ff ff ff bb 0d / Q: False
2022-02-02 10:50:30,321 DEBUG response: b’3a4d332053454e4f4944414c20322e30270d’
2022-02-02 10:50:30,321 DEBUG cmd:Info / str: 46 ff ff ff ff be 0d / Q: False
2022-02-02 10:50:32,025 DEBUG response: b’3b3131352f3232303030303031323630e20d’
/ 2-02-02 10:50:32,025 DEBUG UPS Info: M3 SENOIDAL 2.0’
2022-02-02 10:50:32,025 DEBUG UPS Info: M3 SENOIDAL 2.0’ /
2022-02-02 10:50:33,550 DEBUG LOG file: /home/bachelddd/smsUps/smsUPS.log
2022-02-02 10:50:33,550 DEBUG ********** dmslabs smsUPS v.0.39j
2022-02-02 10:50:33,550 DEBUG Starting up…
2022-02-02 10:50:33,550 DEBUG Path: /home/bachelddd/smsUps
2022-02-02 10:50:33,550 DEBUG Running inside HASSIO False
2022-02-02 10:50:33,551 DEBUG env1:
2022-02-02 10:50:33,551 DEBUG Existe secrets.ini
2022-02-02 10:50:33,553 WARNING Reading secrets.ini
2022-02-02 10:50:33,554 DEBUG Config: SMSUPS_FULL_POWER use default: 1450
2022-02-02 10:50:33,554 DEBUG Existe secrets.ini
2022-02-02 10:50:33,556 DEBUG Config: ALLOW_SHUTDOWN use default: True
2022-02-02 10:50:33,557 DEBUG Config: DEVELOPERS_MODE use default: False
2022-02-02 10:50:33,558 DEBUG PORTA secrets: /dev/ttyUSB0
2022-02-02 10:50:33,558 DEBUG SMSUPS_SERVER: True
2022-02-02 10:50:33,558 DEBUG SMSUPS_CLIENTE: True
2022-02-02 10:50:33,558 DEBUG MQTT_HOST: 192.168.2.160
2022-02-02 10:50:33,559 DEBUG IP: 192.168.2.160
2022-02-02 10:50:33,559 INFO os.name: posix
2022-02-02 10:50:33,559 DEBUG info / Error! Code: OSError, Message, [Errno 6] No such device or address
2022-02-02 10:50:33,560 INFO Starting MQTT 192.168.2.160
2022-02-02 10:50:33,560 DEBUG mqttStart MQTT_PASSWORD: ******
2022-02-02 10:50:33,563 DEBUG MQTT connected with result code 0
2022-02-02 10:50:33,564 INFO Subscribe Topics: (‘home/ups/cmd’, 0), (‘home/ups_SMS_01/cmd’, 0), (‘home/ups_SMS_01/json’, 0), (‘home/ups_SMS_01/batterylevel’, 0), (‘home/ups_SMS_01/BateriaBaixa’, 0), (‘home/ups_SMS_01/BateriaEmUso’, 0)
2022-02-02 10:50:34,569 INFO Port /dev/ttyUSB0 - is open: True
2022-02-02 10:50:36,372 DEBUG cmd:Name / str: 49 ff ff ff ff bb 0d / Q: False
2022-02-02 10:50:38,076 DEBUG response: b’3a4d332053454e4f4944414c20322e30270d’
2022-02-02 10:50:38,076 DEBUG cmd:Info / str: 46 ff ff ff ff be 0d / Q: False
2022-02-02 10:50:39,781 DEBUG response: b’3b3131352f3232303030303031323630e20d’
/ 2-02-02 10:50:39,781 DEBUG UPS Info: M3 SENOIDAL 2.0’
2022-02-02 10:50:39,781 DEBUG UPS Info: M3 SENOIDAL 2.0’ /