Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MQTT: Server not configured #69

Open
Maartenf2 opened this issue Dec 7, 2023 · 3 comments
Open

MQTT: Server not configured #69

Maartenf2 opened this issue Dec 7, 2023 · 3 comments

Comments

@Maartenf2
Copy link

I have this issue where no data is sent to MQTT:

My broker is well configured, as I use it for Zigbee2MQTT also.

Any extra config step needed?

2023-12-07 11:33:13 DEBUG Starting new HTTP connection (1): 192.168.1.63:80
2023-12-07 11:33:14 DEBUG http://192.168.1.63:80 "GET /device/getParam?dev_id=1&dev_type=35&dev_code=3351&type=3&param_addr=5035&param_num=10&param_type=1&token=419e2a77-b8c0-458f-b3f5-8615fbdf0d27&lang=en_us&time123456=1701945193 HTTP/1.1" 200 149
2023-12-07 11:33:14 DEBUG HTTP Status code 200
2023-12-07 11:33:14 DEBUG Payload Status code 1
2023-12-07 11:33:14 DEBUG Payload Dict: {'result_code': 1, 'result_msg': 'success', 'result_data': {'param_value': 'FF FF 00 55 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF '}}
2023-12-07 11:33:14 DEBUG Data length: 20
2023-12-07 11:33:14 DEBUG Changing transaction state from 'SENDING' to 'WAITING FOR REPLY'
2023-12-07 11:33:14 DEBUG Modbus payload: ['00', '5b', '00', '00', '00', '17', '01', '03', '14', 'FF', 'FF', '00', '55', 'FF', 'FF', 'FF', 'FF', 'FF', 'FF', 'FF', 'FF', 'FF', 'FF', 'FF', 'FF', 'FF', 'FF', 'FF', 'FF']
2023-12-07 11:33:14 DEBUG Requested Size: 8, Returned Size: 8
2023-12-07 11:33:14 DEBUG Modbus payload: ['14', 'FF', 'FF', '00', '55', 'FF', 'FF', 'FF', 'FF', 'FF', 'FF', 'FF', 'FF', 'FF', 'FF', 'FF', 'FF', 'FF', 'FF', 'FF', 'FF']
2023-12-07 11:33:14 DEBUG Requested Size: 21, Returned Size: 21
2023-12-07 11:33:14 DEBUG Changing transaction state from 'WAITING FOR REPLY' to 'PROCESSING REPLY'
2023-12-07 11:33:14 DEBUG RECV: 0x0 0x5b 0x0 0x0 0x0 0x17 0x1 0x3 0x14 0xff 0xff 0x0 0x55 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff
2023-12-07 11:33:14 DEBUG Processing: 0x0 0x5b 0x0 0x0 0x0 0x17 0x1 0x3 0x14 0xff 0xff 0x0 0x55 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff
2023-12-07 11:33:14 DEBUG Factory Response[ReadHoldingRegistersResponse: 3]
2023-12-07 11:33:14 DEBUG Adding transaction 91
2023-12-07 11:33:14 DEBUG Getting transaction 91
2023-12-07 11:33:14 DEBUG Changing transaction state from 'PROCESSING REPLY' to 'TRANSACTION_COMPLETE'
2023-12-07 11:33:14 DEBUG Using Inverter Time: 2023-12-7 11:33:12
2023-12-07 11:33:14 INFO Inverter: Successfully scraped in 2.486299 secs
2023-12-07 11:33:14 WARNING MQTT: Server Error; Server not configured
MQTT: Server Error; Server not configured

@cartman10
Copy link

Hi, I'm having the same issue. Any update here ?

@BM118
Copy link

BM118 commented May 15, 2024

I am also having the same issue.

new install of the latest HA full OS, installed the MQTT from the addons, setup the MQTT integration, setup another addon that uses this setup (core-mosquitto) and it works fine, but this addon keeps throwing this error. When I look at the logs in MQTT it shows it is connecting, but it doesn’t seem to be working properly.

Any ideas?

[18:13:18] INFO: Configured'core-mosquitto' mqtt broker.
[18:13:18] INFO: Generated config file.
2024-05-15 18:13:19 INFO Starting SunGather 0.3.8
2024-05-15 18:13:19 INFO Loaded config: config.sg
2024-05-15 18:13:19 INFO Loaded registers: //registers-sungrow.yaml
2024-05-15 18:13:19 INFO Registers file version: 0.2.0
2024-05-15 18:13:19 INFO Logging to console set to: DEBUG
2024-05-15 18:13:19 DEBUG Inverter Config Loaded: {'host': '10.0.0.22', 'port': 502, 'timeout': 15, 'retries': 3, 'slave': 1, 'scan_interval': 60, 'connection': 'sungrow', 'model': None, 'smart_meter': False, 'use_local_time': False, 'log_console': 'DEBUG', 'log_file': 'OFF', 'level': 1}
2024-05-15 18:13:19 DEBUG Checking Modbus Connection
2024-05-15 18:13:19 INFO Modbus client is not connected, attempting to reconnect
2024-05-15 18:13:19 INFO Connection: ModbusTcpClient(10.0.0.22:502)
2024-05-15 18:13:19 DEBUG Connection to Modbus server established. Socket ('172.30.33.3', 33549)
2024-05-15 18:13:34 DEBUG Connection to Modbus server established. Socket ('172.30.33.3', 42825)
2024-05-15 18:13:37 DEBUG load_registers: read, 4999:1
2024-05-15 18:13:37 DEBUG Connection to Modbus server established. Socket ('172.30.33.3', 51949)
2024-05-15 18:13:37 DEBUG Connection to Modbus server established. Socket ('172.30.33.3', 46193)
2024-05-15 18:13:37 DEBUG Current transaction state - IDLE
2024-05-15 18:13:37 DEBUG Running transaction 1
2024-05-15 18:13:37 DEBUG Connection to Modbus server established. Socket ('172.30.33.3', 46019)
2024-05-15 18:13:37 DEBUG Connection to Modbus server established. Socket ('172.30.33.3', 49755)
2024-05-15 18:13:37 DEBUG SEND: 0x0 0x1 0x0 0x0 0x0 0x6 0x1 0x4 0x13 0x87 0x0 0x1
2024-05-15 18:13:37 DEBUG New Transaction state 'SENDING'
2024-05-15 18:13:37 DEBUG Changing transaction state from 'SENDING' to 'WAITING FOR REPLY'
2024-05-15 18:13:37 DEBUG Changing transaction state from 'WAITING FOR REPLY' to 'PROCESSING REPLY'
2024-05-15 18:13:37 DEBUG RECV: 0x0 0x1 0x0 0x0 0x0 0x5 0x1 0x4 0x2 0x24 0x82
2024-05-15 18:13:37 DEBUG Processing: 0x0 0x1 0x0 0x0 0x0 0x5 0x1 0x4 0x2 0x24 0x82
2024-05-15 18:13:37 DEBUG Factory Response[ReadInputRegistersResponse: 4]
2024-05-15 18:13:37 DEBUG Adding transaction 1
2024-05-15 18:13:37 DEBUG Getting transaction 1
2024-05-15 18:13:37 DEBUG Changing transaction state from 'PROCESSING REPLY' to 'TRANSACTION_COMPLETE'
2024-05-15 18:13:37 WARNING Unknown Type Code Detected: 9346
Unknown Type Code Detected: 9346
2024-05-15 18:13:37 INFO Closing Session: ModbusTcpClient(10.0.0.22:502)
2024-05-15 18:13:37 INFO Loading Export: exports\mqtt
2024-05-15 18:13:37 ERROR Failed loading export: 'NoneType' object has no attribute 'replace'
Please make sure mqtt.py exists in the exports folder
Failed loading export: 'NoneType' object has no attribute 'replace'
Please make sure mqtt.py exists in the exports folder
2024-05-15 18:13:37 DEBUG Checking Modbus Connection

@BM118
Copy link

BM118 commented May 15, 2024

Managed to get it working, but it doesn’t seem to do what i expected it to do. I expected it to discover the model of my inverter, but if you let it do this, it seems to not discover the model and throws this error. If you specify the model number exactly, it started fine and no errors about the MQTT server. It appears the model and subsequently the serial number must be discovered before it can publish to MQTT which causes this error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants