-
Notifications
You must be signed in to change notification settings - Fork 17
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
Can only send one command to Controller #23
Comments
That's odd. I am regularly sending messages from openHAB (infact, I send a batch of 4 or 5 messages in one go every 5 minutes to get various openTherm data). Are your 3 messages showing up in your mqtt broker, and then showing up in the evolistener logs? i.e. are you sure the messages have got through? |
Yes, the three messages are being sent via MQTT. So, it seems that between step 5 and 6 at least I am missing ack=True In case it helps, I have also tried setting different THIS_GATEWAY_ID values in evogateway.cfg as I have seen several different IDs in different posts/issues, and in all cases it seems as if the first message is sent and acknowledged but not the other messages. I have configured a sleep of up to 2 seconds between commands too Any other idea to continue debugging? |
Changing the THIS_GATEWAY_ID should not make any difference, as you are receiving messages back (as confirmed by the acknowledgement of your message). I genuinely have no idea as to why your repeat commands are not working. It has been working fine for me for 2 years+. Are you 100% sure that your command messages are getting through to the listener? Each time a command message is sent, it will print this in your window, and save to the file (do a search for COMMAND_OUT in the log). Are you seeing 3 such messages in your log? Finally, what do you have in your config file for COMMAND_RESEND_TIMEOUT_SECS and COMMAND_RESEND_ATTEMPTS? |
Yes, 100% sure. So, it seems as if there is a problem decoding JSON {"command":"setpoint_override", "arguments" : {"setpoint": 16.0, "zone_id" : 1}}
Python version is 3.6.8 and Dockerfile is
I changed the container to use UTF-8 and made a test to check python is using UTF8
So it seems that this is fine. Then uncommented debug lines print(msg.payload) and print(json_data) in lines 483 and 488 and see
Then I tried to make some changes in the json.loads line but, to be honest, I don't know very well what I am doing. Do you have any idea on what might be wrong related to this UTF8 coding? |
Ah ok, you didn't mention before that you were running in a docker (shouldn't make a difference if done in exactly the same way, but introduces another potential source of problems). I had a quick look at your log above and the respective code, but nothing jumps out. It may be worth trying it out without the docker environment and see if that shows anything further. Sorry, but unfortunately I don't really have the time to spend much further on this. |
Yes, I understand this does not seem related to the script but to the environment where it is running. The changes proposed are just to catch the exception. This is working fine in my environment. At beginning of script
Line 487
|
Thanks. I'll consider it next time I'm looking at the code, but in general I don't like silently dropping errors. Better to understand the cause of the problem and then try to address that if possible (admittedly not always easy!). |
#23) Add exception handling for JSON Decode Error
I apologize in advance for what is likely inappropriate use of this commenting-on-a-closed-issue to gain some specific knowledge on the topic of using this script with docker, but can I ask whether the the end the docker approach below is now functional, @eljuanchete ?
And while on the subject, it looks as if the dockerfile above uses the script already present on the host. Is there an idiot-proof way of including even the retrieval of the (latest) script from this repository in above dockerfile? Again, apologies if inappropriate, kindly tell me what would be the appropriate way to discuss such topics :) |
Hello,
this is (IIRC) the docker file I used (more or less like yours except you are not installing ramsesrf (take into count that a new release of ramses_rf with breaking changes has just been released so maybe you should use the previous one))
FROM python:3
RUN mkdir /opt/evogateway
WORKDIR /opt/evogateway
RUN pip install pyserial
RUN pip install paho-mqtt
RUN pip install enum34
RUN pip install colorama
RUN pip install ramses_rf
COPY ./data/* /opt/evogateway/
CMD [ "python", "/opt/evogateway/evogateway.py" ]
I did not configure an automated download and perform manual upgrades
I seem to recall that I had problems while setting up the latest version due to the changes in config files, but can’t remember what was the problem and how I solved it. I just can tell that once I got it working it has been running smoothly since then
Sorry I cannot be of much help here
Best regards
… El 6 sept 2021, a las 21:57, dhuizinga ***@***.***> escribió:
I apologize in advance for what is likely inappropriate use of this commenting-on-a-closed-issue to gain some specific knowledge on the topic of using this script with docker, but can I ask whether the the end the docker approach below is now functional, @eljuanchete <https://github.com/eljuanchete> ?
Python version is 3.6.8 and Dockerfile is
FROM python:3.6.8
RUN mkdir /opt/evogateway
WORKDIR /opt/evogateway
RUN pip install --upgrade pip
RUN pip install pyserial
RUN pip install paho-mqtt
RUN pip install enum34
COPY ./data/* /opt/evogateway/
CMD [ "python", "/opt/evogateway/evogateway.py" ]
And while on the subject, it looks as if the dockerfile above uses the script already present on the host. Is there an idiot-proof way of including even the retrieval of the (latest) script from this repository in above dockerfile?
Again, apologies if inappropriate, kindly tell me what would be the appropriate way to discuss such topics :)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#23 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AGM5I4C6ZGMXXLTG6ZRT3C3UAUMKNANCNFSM4S3WO6EQ>.
Triage notifications on the go with GitHub Mobile for iOS <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Hi,
using evohome-Listener v2.0.1 (python3 version) with evofw2. I tried evofw3 uart branch but could not get it to work.
I am trying to send a setpoint to 3 zones in a loop from Openhab but only the first setpoint is sent. All other two commands are ignored. I have tried to set a delay between the 3 commands, but without luck.
The first command is acknowledged
but no more commands are sent.
evolistener.log content is
After sending the command, the MQTT topics for cul_evo_gateway/sent_command are
and evohome-Listener seems to stop sending MQTT messages anymore. It seems as if the ACK is ACKNOWLEDGED but not recognized so no more commands are processed?
I have taken a look at the code but my coding skills are not very good and could not make progress. I think that the problem is in line 1774
but I have not been able to find the exact problem.
Do not hesitate to contact for any tests you need.
Best regards
The text was updated successfully, but these errors were encountered: