smar000 / evoGateway

Python script for listening in and responding to evohome heating control radio messages
46 stars 17 forks source link

Traceback on ZONE_TEMPERATURE on line 723 / 904 #32

Closed FrankvdAa closed 3 years ago

FrankvdAa commented 3 years ago

Hi,

I'm receiving below error when running evohome-Listener:

2021-02-15 19:52:07 | | ERROR | '1' on line 723 [Command ZONE_TEMPERATURE, data: '--- 037 I --- 01:204708 --:------ 01:204708 30C9 027 0007D80107640207A90306530405C60505FB06064D070621080788', port: 1] Traceback (most recent call last): File "evogateway.py", line 723, in process_received_message COMMANDSmsg.command_code File "evogateway.py", line 904, in zone_temperature mqtt_publish("{}/{}".format(zones[zone_id], msg.source_name), "temperature",temperature) KeyError: 1

Running latest release (v2.1.0) of evohome-Listener without MQTT configured.

Please let me know if you need anything else or want me to run additional tests.

Regards,

Frank

smar000 commented 3 years ago

It looks as if it doesn't have your zones data. Please check your devices.json file.

FrankvdAa commented 3 years ago

I was indeed running with an empty devices.json to discover all devices. In that case I guess it's normal to get this error?

smar000 commented 3 years ago

Yes. The system doesn't know what zone to assign the data it is receiving to, and so can't push to correct mqtt topic (in theory it is of course possible, and probably would have been better, to just default to the device ID for the mqtt topic if the zone is not defined...).

Other thing you could do is to disable mqtt whilst you are discovering (don't define mqtt host in the config file).

FrankvdAa commented 3 years ago

Yes. The system doesn't know what zone to assign the data it is receiving to, and so can't push to correct mqtt topic (in theory it is of course possible, and probably would have been better, to just default to the device ID for the mqtt topic if the zone is not defined...).

Other thing you could do is to disable mqtt whilst you are discovering (don't define mqtt host in the config file).

That's the thing; I've disabled MQTT by setting all variables to empty value.

smar000 commented 3 years ago

Sorry, I just saw that I had missed replying to your last message.

I am moving the code over to use the evohome_rf library for its back-end (see the experimental version in the gw_evohome_rf branch). If your problem persists in that version, will be better to look at it there.

smar000 commented 3 years ago

Migration to the ramses_rf library is now complete. Please let me know if you still have issues, otherwise I will close the open issue.

Thanks.

FrankvdAa commented 3 years ago

I see that MQTT is now required?

2021-06-05 12:09:11,867 [551] MQTT Server details not found. Exiting...

As I don't have MQTT running, I cannot test; removing all MQTT config options results in the same error.

smar000 commented 3 years ago

I see that MQTT is now required?

Yes, on the basis that the primary purpose of the script is to provide an mqtt to evohome interface. If that is not what you are using it for, can you advise how you see using the script? If it is just for occasional visual monitoring of the the communications, it may be easier to just use the client.py script in the ramses_rf library?

If you have real use case, I am happy to look into removing the mqtt requirement and operate in a view only mode, but will have to check the code for any implications.

FrankvdAa commented 3 years ago

I used it for testing while the TX of evofw3 firmware wasn't working. As that has been fixed, I have no real need for this anymore, so don't bother removing the MQTT requirement just for me ;-)

I will close the ticket. Thanks for your help.