zivillian / ism7mqtt

GNU General Public License v3.0
57 stars 11 forks source link

refresh interval not respected #84

Closed alexkno79 closed 1 month ago

alexkno79 commented 10 months ago

Hi, I've set the refresh interval to 15 seconds as I currently have an issue with my heating and needed some more detailes protocols. I've noticed that infact the setting does have no effect on the actual interval the ism7 sends the updates. Even with 15 secnds the updates are received in intervals of 40 to 80 seconds, same as when it was set to 60 seconds by default.

I then used the smartset PC app (using the proxy) to protocol my data with 10 seconds and this actually worked (updates received for fast changing values in intervals of 6 seconds to 15 seconds).

I can see the xml used by ism7mqtt correctly sets the is-flag to 15. But it seems this is not effective.

Comparing the xml used by ism7mqtt and the one from smartset app, I can see slight differences. The main ones seem to be:

-utf8 vs utf16 encoding (likely not the reason) -the app bundles some values in in-flag (also unlikely, but possible) -the app always uses the se-flag

the latter seems to me the most reasonable reason. As the responses from ism7 to the requests with se="" carry se="0" while the ones responding to requests with se="A;1" seem to carry the same reference se="A;1". So maybe the ism7 uses this to distguish between the different requests and to keep track of them.

below the request as sent by the smartset PC app:

<?xml version="1.0" encoding="utf-8"?><tbreq bn="300" gw="1" ae="true" ty="push"><ird se="A;4" ba="0x8" in="370" is="10" /><ird se="A;9" ba="0x8" in="371" is="10" /><ird se="E;0;1;2;3;5" ba="0x8" in="10067 10068 2 13 367" is="10" /><ird se="A;6" ba="0x8" in="10071" is="10" /><ird se="A;7" ba="0x8" in="22" is="10" /><ird se="A;8" ba="0x8" in="10063" is="10" /></tbreq> and then the one ism7mqtt created (I shortened several parameters for better readability...)

<?xml version="1.0" encoding="utf-16"?><tbreq xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" bn="3" gw="1" ae="false" ty="push"><ird in="13" se="" ba="0x8" is="15" /><ird in="14" se="" ba="0x8" is="15" /><ird in="22" se="" ba="0x8" is="15" /><ird in="367" se="" ba="0x8" is="15" /><ird in="370" se="" ba="0x8" is="15" /><ird in="371" se="" ba="0x8" is="15" /><ird in="371" se="" ba="0x8" is="15" /><ird in="410" se="" ba="0x8" is="15" /><ird in="551" se="" ba="0x8" is="15" /><ird in="550" se="" ba="0x8" is="15" /><ird in="553" se="" ba="0x8" is="15" /><ird in="552" se="" ba="0x8" is="15" /><ird in="554" se="" ba="0x8" is="15" /><ird in="10010" se="" ba="0x8" is="15" /><ird in="10013" se="" ba="0x8" is="15" /><ird in="10028" se="" ba="0x8" is="15" /><ird in="10063" se="" ba="0x8" is="15" /><ird in="10071" se="" ba="0x8" is="15" /><ird in="34" se="" ba="0x8" is="15" />......<ird in="10900" se="" ba="0x8" is="15" /><ird in="10899" se="" ba="0x8" is="15" /></tbreq>

zivillian commented 1 month ago

Sorry for the late reply - do you (by accident) still have the proxy log and can upload it?

It would also be great if you could try again with the latest binaries as they alway set se attribute.

alexkno79 commented 1 month ago

Hi,

thanks for looking into it. Unfortunately I don't have the old proxy logs anymore. Currently I am on vacation so maybe next week I could try to gather them again when home and thus I could use my PC with smartset.

But the good news: new version (using master branch from docker buildt on 25th Aug) it seems the new logic is working fine.

I used time interval of 20sec and during the water heatup period (7:00-7:15) where many volatile values update, I can see for bundle BN=5 (topic Wolf/..../CGB-2_0x8) that the interval is applied. There are updates in 15 to 35 sec intervals. Attached the related debug log extract filtered for bundle Id 5.

So I assume the issue is solved! Many thanks again for this great work!!!!

_ism7mqtt_v17_logs.txt

zivillian commented 1 month ago

I close this as solved - feel free to reopen or create a new issue if you found out that something is still broken.