Code Monkey home page Code Monkey logo

Comments (61)

terual avatar terual commented on May 27, 2024 1

Done! If the coming week everything keeps working I will close this issue, thanks!

from ithowifi.

arjenhiemstra avatar arjenhiemstra commented on May 27, 2024

Hmm, interesting issue.
2 things:

  1. please upgrade to the latest version 2.3.1, let's see if readout stability improves
  2. when no temp updates are posted anymore, what does the itho status page of the add-on show?

from ithowifi.

terual avatar terual commented on May 27, 2024

I have upgraded to 2.3.2 just a minute ago. I will post an update when the temperature becomes stuck again or when everything is fine.

Regarding you second question: the add-on itho status page displayed the same stuck temperature value as on the MQTT messages.

from ithowifi.

terual avatar terual commented on May 27, 2024

Unfortunately the upgrade did not fix the issue:
Schermafdruk van 2021-12-03 11 38 12

Also on the add-on itho status page the stuck temp value is visible:
Schermafdruk van 2021-12-03 11 43 28

from ithowifi.

arjenhiemstra avatar arjenhiemstra commented on May 27, 2024

Weird!

Could you post your config.json file? (you can download it on the page Debug -> file editor).
All personal info that you do not want to have shared can be removed.

Furthermore, if the temp is stuck, what is the result of for example "query status" on the debug page?

from ithowifi.

terual avatar terual commented on May 27, 2024

Here are the contents of config.json. Essentially a stock config with enabled MQTT.

{"sys_username":"admin","sys_password":"admin","syssec_web":0,"syssec_api":0,"syssec_edit":0,"api_normalize":0,"syssht30":0,"itho_rf_support":0,"rfInitOK":false,"itho_fallback":20,"itho_low":20,"itho_medium":120,"itho_high":220,"itho_timer1":10,"itho_timer2":20,"itho_timer3":30,"itho_updatefreq":5,"itho_sendjoin":0,"itho_forcemedium":0,"itho_vremoteapi":0,"nonQ_cmd_clearsQ":1,"mqtt_active":1,"mqtt_serverName":"************","mqtt_username":"************","mqtt_password":"*********","mqtt_port":1883,"mqtt_version":1,"mqtt_state_topic":"itho/state","mqtt_ithostatus_topic":"itho/ithostatus","mqtt_remotesinfo_topic":"itho/remotesinfo","mqtt_lastcmd_topic":"itho/lastcmd","mqtt_state_retain":"yes","mqtt_cmd_topic":"itho/cmd","mqtt_lwt_topic":"itho/lwt","mqtt_domoticz_active":0,"mqtt_ha_active":1,"mqtt_ha_topic":"homeassistant","mqtt_idx":1,"sensor_idx":1,"version_of_program":"005"}

The result of "Query status":

Result: 80 82 A4 01 01 17 02 02 16 02 15 00 00 07 00 24 00 00 76 BE 00 00 02 DB 34 14 99 06 5F 8E

from ithowifi.

arjenhiemstra avatar arjenhiemstra commented on May 27, 2024

Thanks!

At the moment the temp is still stuck?

Could you then also post the results of "query devicetype" en "query status format"? With that I can pinpoint the temp values

from ithowifi.

terual avatar terual commented on May 27, 2024

Yes, the temp is still stuck, I haven't rebooted since this morning.

Devicetype:

Result: 80 82 90 E0 01 25 00 01 00 1B 2E 19 01 FE FF FF FF FF FF 1D 0B 07 E1 43 56 45 2D 52 46 00 00 00 00 00 00 00 00 00 00 00 00 00 00 58

Status format:

Result: 80 82 A4 00 01 0C 80 10 10 10 00 10 20 10 10 00 92 92 29

from ithowifi.

terual avatar terual commented on May 27, 2024

And now the temp isn't stuck anymore! Since the "query devicetype" and "query status format" the temp is the correct reading! I'm not sure which one of the queries did the trick

from ithowifi.

arjenhiemstra avatar arjenhiemstra commented on May 27, 2024

according to this info the current temp is 16.31 C and Humidity is 52.73%, that is different from the values on the status page so something must be happening in the add on firmware

from ithowifi.

arjenhiemstra avatar arjenhiemstra commented on May 27, 2024

Next time it is stuck, could you go to the page 'itho settings' and look if there is still a version mentioned? (without clicking on the buttons of the debug page).
It could be that due to an i2c error the version gets lost (en then the status won't update anymore)

from ithowifi.

terual avatar terual commented on May 27, 2024

Thanks, will do

from ithowifi.

terual avatar terual commented on May 27, 2024

Unfortunately the temperature reading just got stuck again.

On the itho settings page I see the following:

Itho device type: CVE-Silent
Itho fw version: 25

Something I noticed: I saw that on the itho status page the temp variable is stuck, but Temperature says not available, whereas earlier that was the same value as in the temp field.

To get it to update again I had to press two times on Query status format and now the Temperature field is the same again as temp. The first time I clicked on Query status format nothing appeared.

from ithowifi.

arjenhiemstra avatar arjenhiemstra commented on May 27, 2024

On the itho settings page I see the following:

I'd hoped the version would be 0 but unfortunately that is not the case. This means the issue is further down the line and needs to be detected in a different way.

Something I noticed: I saw that on the itho status page the temp variable is stuck, but Temperature says not available, whereas earlier that was the same value as in the temp field.

This is useful info! Could you post the complete output of the status page next time the temp sensor value is stuck?

To get it to update again I had to press two times on Query status format and now the Temperature field is the same again as temp.

When you query the status format internally a structure gets filled with the needed info to be able to accommodate the result of the query status command. This takes some time, at max 2x the update frequency setting. Next time, please, after you captured the status page, please click it once and wait 2x the update frequency setting and see if the values return.

from ithowifi.

terual avatar terual commented on May 27, 2024

Itho status page when temp is stuck:

Label Value
temp 16.9
hum 53.2
ppmw 6395
Speed status 2
Internal fault 0
Frost cycle 0
Filter dirty 0
AirQuality (%) 200
AirQbased on 64
CO2level (ppm) 568
Indoorhumidity (%) 53
Outdoorhumidity (%) not available
Exhausttemp (°C) not available
SupplyTemp (°C) not available
IndoorTemp (°C) not available
OutdoorTemp (°C) not available
SpeedCap 63496
BypassPos (%) not available
FanInfo auto
ExhFanSpeed (%) 2
InFanSpeed (%) 0
RemainingTime (min) 0
PostHeat (%) not available
PreHeat (%) not available
InFlow (l sec) not available
ExhFlow (l sec) not available
Ventilation setpoint (%) 2
Fan setpoint (rpm) 534
Fan speed (rpm) 533
Error 0
Selection 7
Startup counter 36
Total operation (hours) 30488
Absence (min) 0
Highest CO2 concentration (ppm) 568
Highest RH concentration (%) 53
RelativeHumidity 53.23
Temperature not available

Now, when pressing once on Query status format the temperature updates again.

Edit: I updated to 2.3.3 in the meantime btw.

from ithowifi.

terual avatar terual commented on May 27, 2024

Any further ideas how to debug this?

from ithowifi.

arjenhiemstra avatar arjenhiemstra commented on May 27, 2024

Not yet, sorry had some busy weeks with work.

Interesting to see that the RelativeHumidity is still present but Temperature not. Both are being send in 1 message... Is that the case every time the issue comes up?

from ithowifi.

terual avatar terual commented on May 27, 2024

Yes, humidity has never been stuck.

Thanks for your work and your help by the way!

from ithowifi.

stale avatar stale commented on May 27, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

from ithowifi.

terual avatar terual commented on May 27, 2024

Issue is still relevant

from ithowifi.

arjenhiemstra avatar arjenhiemstra commented on May 27, 2024

nrgitho-hw2-v2.4.0-alpha9-tmpdebug.bin.zip

Sorry for not picking up this issue again sooner!

I have created a debug version, could you try it out? If you upgrade from 2.3.5 you might have to configure some parts again.

This version shows two debug values on the itho status page, I'm interested if these values change before/after the temp value gets stuck. Also the error message of the temp value itself has been suppressed (not showing "not available") but shows the raw value. Hopefully both will point in the direction of a solution.

from ithowifi.

kvandt avatar kvandt commented on May 27, 2024

Just had the same issue with 2.4.0 alpha 8. Now I installed alpha9. Let's see if the extra debug values give a clue if it happens again.
Currently they show both 12.

from ithowifi.

terual avatar terual commented on May 27, 2024

@arjenhiemstra I missed your post about the special debug version (nrgitho-hw2-v2.4.0-alpha9-tmpdebug.bin.zip). Should I try the new beta to see if the issue is resolved?

from ithowifi.

arjenhiemstra avatar arjenhiemstra commented on May 27, 2024

I'm afraid that's of no use anymore. I now have more information available and the beta1 version attached to this issue does also not help (but gave more insight in the issue). I'm now going to work on another solution and will link this issue once it is out.

from ithowifi.

arjenhiemstra avatar arjenhiemstra commented on May 27, 2024

Please try https://github.com/arjenhiemstra/ithowifi/releases/tag/Version-2.4.3-beta2

from ithowifi.

terual avatar terual commented on May 27, 2024

Installed the beta firmware: first finding with the new version is that the I2C connection is not established yet:
Itho I2C connection status: init failed - please power cycle the itho unit -

I'm going to power cycle now and report back.


After power cycling everything seems to work. I will check the coming days if the temperature keeps working.

from ithowifi.

arjenhiemstra avatar arjenhiemstra commented on May 27, 2024

Thanks!

from ithowifi.

terual avatar terual commented on May 27, 2024

I got a power outage this morning and thus a forced reset of the Itho box and wifi addon.... Up until the point before the power outage everything ssemed to be working, no stuck values. But I will continue monitor the coming days.

from ithowifi.

arjenhiemstra avatar arjenhiemstra commented on May 27, 2024

Thanks for the update!

from ithowifi.

terual avatar terual commented on May 27, 2024

This morning I saw that all the values on MQTT didn't get any update anymore.

Checking the Itho status page diplays this:
Itho I2C connection status: init failed - please power cycle the itho unit -

from ithowifi.

arjenhiemstra avatar arjenhiemstra commented on May 27, 2024

Anything in the log?

from ithowifi.

terual avatar terual commented on May 27, 2024
  25983138 I: Warning: I2C timeout, trying I2C bus reset...
  25985746 I: I2C bus could not clear: SCL clock line held low
  25987013 I: Info: I2C bus busy
  25997023 I: Warning: I2C timeout, trying I2C bus reset...
  25999694 I: I2C bus could not clear: SCL clock line held low
  26001146 I: Info: I2C bus busy
  26011163 I: Warning: I2C timeout, trying I2C bus reset...
  26013820 I: I2C bus could not clear: SCL clock line held low
  26015162 I: Info: I2C bus busy
  26025166 I: Warning: I2C timeout, trying I2C bus reset...
  26028097 I: I2C bus could not clear: SCL clock line held low
  26029441 I: Info: I2C bus busy
  26039432 I: Warning: I2C timeout, trying I2C bus reset...
  26042122 I: I2C bus could not clear: SCL clock line held low
  26043434 I: Info: I2C bus busy
  26053446 I: Warning: I2C timeout, trying I2C bus reset...
  26056178 I: I2C bus could not clear: SCL clock line held low
  26057579 I: Info: I2C bus busy
  26067579 I: Warning: I2C timeout, trying I2C bus reset...
  26070585 I: I2C bus could not clear: SCL clock line held low
  26072021 I: Info: I2C bus busy
  26082025 I: Warning: I2C timeout, trying I2C bus reset...
  26084715 I: I2C bus could not clear: SCL clock line held low
  26086091 I: Info: I2C bus busy
  26096081 I: Warning: I2C timeout, trying I2C bus reset...
  26098828 I: I2C bus could not clear: SCL clock line held low
  26100211 I: Info: I2C bus busy
  26110206 I: Warning: I2C timeout, trying I2C bus reset...
  26112985 I: I2C bus could not clear: SCL clock line held low
  26114519 I: Info: I2C bus busy
  26124532 I: Warning: I2C timeout, trying I2C bus reset...
  26127230 I: I2C bus could not clear: SCL clock line held low
  26128576 I: Info: I2C bus busy
  26138580 I: Warning: I2C timeout, trying I2C bus reset...
  26141291 I: I2C bus could not clear: SCL clock line held low
  26142677 I: Info: I2C bus busy
  26152675 I: Warning: I2C timeout, trying I2C bus reset...
  26155469 I: I2C bus could not clear: SCL clock line held low
  26157099 I: Info: I2C bus busy
  26166830 I: Warning: I2C timeout, trying I2C bus reset...
  26169522 I: I2C bus could not clear: SCL clock line held low
  26170855 I: Info: I2C bus busy
  26180860 I: Warning: I2C timeout, trying I2C bus reset...
  26183591 I: I2C bus could not clear: SCL clock line held low
  26184945 I: Info: I2C bus busy
  26194956 I: Warning: I2C timeout, trying I2C bus reset...
  26197718 I: I2C bus could not clear: SCL clock line held low
  26199152 I: Info: I2C bus busy
  26209095 I: Warning: I2C timeout, trying I2C bus reset...
  26211794 I: I2C bus could not clear: SCL clock line held low
  26213146 I: Info: I2C bus busy
  26223146 I: Warning: I2C timeout, trying I2C bus reset...
  26225881 I: I2C bus could not clear: SCL clock line held low
  26227256 I: Info: I2C bus busy
  26237255 I: Warning: I2C timeout, trying I2C bus reset...
  26240014 I: I2C bus could not clear: SCL clock line held low
  26241454 I: Info: I2C bus busy
  26251655 I: Warning: I2C timeout, trying I2C bus reset...
  26254479 I: I2C bus could not clear: SCL clock line held low
  26255782 I: Info: I2C bus busy
  26265795 I: Warning: I2C timeout, trying I2C bus reset...
  26268514 I: I2C bus could not clear: SCL clock line held low
  26269910 I: Info: I2C bus busy
  26279914 I: Warning: I2C timeout, trying I2C bus reset...
  26282682 I: I2C bus could not clear: SCL clock line held low
  26284091 I: Info: I2C bus busy
  26294090 I: Warning: I2C timeout, trying I2C bus reset...
  26297059 I: I2C bus could not clear: SCL clock line held low
  26298383 I: Info: I2C bus busy
  26308386 I: Warning: I2C timeout, trying I2C bus reset...
  26311114 I: I2C bus could not clear: SCL clock line held low
  26312489 I: Info: I2C bus busy
  26322478 I: Warning: I2C timeout, trying I2C bus reset...
  26325216 I: I2C bus could not clear: SCL clock line held low
  26326591 I: Info: I2C bus busy
  26336611 I: Warning: I2C timeout, trying I2C bus reset...
  26339644 I: I2C bus could not clear: SCL clock line held low
  26341102 I: Info: I2C bus busy
  26351106 I: Warning: I2C timeout, trying I2C bus reset...
  26353913 I: I2C bus could not clear: SCL clock line held low
  26355260 I: Info: I2C bus busy
  26365259 I: Warning: I2C timeout, trying I2C bus reset...
  26368001 I: I2C bus could not clear: SCL clock line held low
  26369384 I: Info: I2C bus busy
  26379381 I: Warning: I2C timeout, trying I2C bus reset...
  26382154 I: I2C bus could not clear: SCL clock line held low
  26383725 I: Info: I2C bus busy
  26393718 I: Warning: I2C timeout, trying I2C bus reset...
  26396412 I: I2C bus could not clear: SCL clock line held low
  26397707 I: Info: I2C bus busy
  26407727 I: Warning: I2C timeout, trying I2C bus reset...
  26410445 I: I2C bus could not clear: SCL clock line held low
  26411817 I: Info: I2C bus busy
  26421813 I: Warning: I2C timeout, trying I2C bus reset...
  26424581 I: I2C bus could not clear: SCL clock line held low
  26426221 I: Info: I2C bus busy
  26435946 I: Warning: I2C timeout, trying I2C bus reset...
  26438635 I: I2C bus could not clear: SCL clock line held low
  26439973 I: Info: I2C bus busy
  26449972 I: Warning: I2C timeout, trying I2C bus reset...
  26452710 I: I2C bus could not clear: SCL clock line held low
  26454121 I: Info: I2C bus busy
  26464099 I: Warning: I2C timeout, trying I2C bus reset...
  26466849 I: I2C bus could not clear: SCL clock line held low
  26468234 I: Info: I2C bus busy
  26478189 I: Warning: I2C timeout, trying I2C bus reset...
  26480867 I: I2C bus could not clear: SCL clock line held low
  26482209 I: Info: I2C bus busy
  26492211 I: Warning: I2C timeout, trying I2C bus reset...
  26494920 I: I2C bus could not clear: SCL clock line held low
  26496250 I: Info: I2C bus busy
  26506245 I: Warning: I2C timeout, trying I2C bus reset...
  26509001 I: I2C bus could not clear: SCL clock line held low
  26510443 I: Info: I2C bus busy
  26520652 I: Warning: I2C timeout, trying I2C bus reset...
  26523456 I: I2C bus could not clear: SCL clock line held low
  26524782 I: Info: I2C bus busy
  26534779 I: Warning: I2C timeout, trying I2C bus reset...
  26537490 I: I2C bus could not clear: SCL clock line held low
  26538822 I: Info: I2C bus busy
  26548843 I: Warning: I2C timeout, trying I2C bus reset...
  26551597 I: I2C bus could not clear: SCL clock line held low
  26552998 I: Info: I2C bus busy
  26562998 I: Warning: I2C timeout, trying I2C bus reset...
  26565933 I: I2C bus could not clear: SCL clock line held low
  26567269 I: Info: I2C bus busy
  26577272 I: Warning: I2C timeout, trying I2C bus reset...
  26579978 I: I2C bus could not clear: SCL clock line held low
  26581358 I: Info: I2C bus busy
  26591348 I: Warning: I2C timeout, trying I2C bus reset...
  26594097 I: I2C bus could not clear: SCL clock line held low
  26595509 I: Info: I2C bus busy
  26605501 I: Warning: I2C timeout, trying I2C bus reset...
  26608523 I: I2C bus could not clear: SCL clock line held low
  26609934 I: Info: I2C bus busy
  26619953 I: Warning: I2C timeout, trying I2C bus reset...
  26622663 I: I2C bus could not clear: SCL clock line held low
  26624027 I: Info: I2C bus busy
  26634018 I: Warning: I2C timeout, trying I2C bus reset...
  26636783 I: I2C bus could not clear: SCL clock line held low
  26638184 I: Info: I2C bus busy
  26648191 I: Warning: I2C timeout, trying I2C bus reset...
  26650985 I: I2C bus could not clear: SCL clock line held low
  26652581 I: Info: I2C bus busy
  26662579 I: Warning: I2C timeout, trying I2C bus reset...
  26665289 I: I2C bus could not clear: SCL clock line held low
  26666667 I: Info: I2C bus busy
  26676664 I: Warning: I2C timeout, trying I2C bus reset...
  26679358 I: I2C bus could not clear: SCL clock line held low
  26680701 I: Info: I2C bus busy
  26690720 I: Warning: I2C timeout, trying I2C bus reset...
  26693532 I: I2C bus could not clear: SCL clock line held low
  26695206 I: Info: I2C bus busy
  26704929 I: Warning: I2C timeout, trying I2C bus reset...
  26707635 I: I2C bus could not clear: SCL clock line held low
  26708980 I: Info: I2C bus busy
  26718982 I: Warning: I2C timeout, trying I2C bus reset...
  26721729 I: I2C bus could not clear: SCL clock line held low
  26723244 I: Info: I2C bus busy
  26733238 I: Warning: I2C timeout, trying I2C bus reset...
  26735989 I: I2C bus could not clear: SCL clock line held low
  26737386 I: Info: I2C bus busy
  26747331 I: Warning: I2C timeout, trying I2C bus reset...
  26750016 I: I2C bus could not clear: SCL clock line held low
  26751291 I: Info: I2C bus busy
  26761311 I: Warning: I2C timeout, trying I2C bus reset...
  26764028 I: I2C bus could not clear: SCL clock line held low
  26765388 I: Info: I2C bus busy
  26775392 I: Warning: I2C timeout, trying I2C bus reset...
  26778146 I: I2C bus could not clear: SCL clock line held low
  26779565 I: Info: I2C bus busy
  26789777 I: Warning: I2C timeout, trying I2C bus reset...
  26792568 I: I2C bus could not clear: SCL clock line held low
  26793900 I: Info: I2C bus busy
  26803897 I: Warning: I2C timeout, trying I2C bus reset...
  26806622 I: I2C bus could not clear: SCL clock line held low
  26808009 I: Info: I2C bus busy
  26818004 I: Warning: I2C timeout, trying I2C bus reset...
  26820742 I: I2C bus could not clear: SCL clock line held low
  26822105 I: Info: I2C bus busy
  26832124 I: Warning: I2C timeout, trying I2C bus reset...
  26835058 I: I2C bus could not clear: SCL clock line held low
  26836379 I: Info: I2C bus busy
  26846382 I: Warning: I2C timeout, trying I2C bus reset...
  26849084 I: I2C bus could not clear: SCL clock line held low
  26850404 I: Info: I2C bus busy
  26860391 I: Warning: I2C timeout, trying I2C bus reset...
  26863133 I: I2C bus could not clear: SCL clock line held low
  26864561 I: Info: I2C bus busy
  26874567 I: Warning: I2C timeout, trying I2C bus reset...
  26877552 I: I2C bus could not clear: SCL clock line held low
  26878991 I: Info: I2C bus busy
  26889001 I: Warning: I2C timeout, trying I2C bus reset...
  26891735 I: I2C bus could not clear: SCL clock line held low
  26892947 I: Info: I2C bus busy
  26902969 I: Warning: I2C timeout, trying I2C bus reset...
  26905616 I: I2C bus could not clear: SCL clock line held low
  26906926 I: Info: I2C bus busy
  26916883 I: Warning: I2C timeout, trying I2C bus reset...
  26919525 I: I2C bus could not clear: SCL clock line held low
  26920859 I: Info: I2C bus busy
  26930862 I: Warning: I2C timeout, trying I2C bus reset...
  26933611 I: I2C bus could not clear: SCL clock line held low
  26935125 I: Info: I2C bus busy
  26945132 I: Warning: I2C timeout, trying I2C bus reset...
  26947827 I: I2C bus could not clear: SCL clock line held low
  26949191 I: Info: I2C bus busy
  26959190 I: Warning: I2C timeout, trying I2C bus reset...
  26961920 I: I2C bus could not clear: SCL clock line held low
  26963256 I: Info: I2C bus busy
  26973276 I: Warning: I2C timeout, trying I2C bus reset...
  26976043 I: I2C bus could not clear: SCL clock line held low
  26977618 I: Info: I2C bus busy
  26987612 I: Warning: I2C timeout, trying I2C bus reset...
  26990306 I: I2C bus could not clear: SCL clock line held low
  26991676 I: Info: I2C bus busy
  27001674 I: Warning: I2C timeout, trying I2C bus reset...
  27004419 I: I2C bus could not clear: SCL clock line held low
  27005817 I: Info: I2C bus busy
  27015816 I: Warning: I2C timeout, trying I2C bus reset...
  27018578 I: I2C bus could not clear: SCL clock line held low
  27020249 I: Info: I2C bus busy
  27029959 I: Warning: I2C timeout, trying I2C bus reset...
  27032670 I: I2C bus could not clear: SCL clock line held low
  27033973 I: Info: I2C bus busy
  27043992 I: Warning: I2C timeout, trying I2C bus reset...
  27046737 I: I2C bus could not clear: SCL clock line held low
  27048135 I: Info: I2C bus busy
  27058119 I: Warning: I2C timeout, trying I2C bus reset...
  27060899 I: I2C bus could not clear: SCL clock line held low
  27062343 I: Info: I2C bus busy
  27072271 I: Warning: I2C timeout, trying I2C bus reset...
  27074947 I: I2C bus could not clear: SCL clock line held low
  27076290 I: Info: I2C bus busy
  27086295 I: Warning: I2C timeout, trying I2C bus reset...
  27089063 I: I2C bus could not clear: SCL clock line held low
  27090445 I: Info: I2C bus busy
  27100444 I: Warning: I2C timeout, trying I2C bus reset...
  27103211 I: I2C bus could not clear: SCL clock line held low
  27104587 I: Info: I2C bus busy
  27114814 I: Warning: I2C timeout, trying I2C bus reset...
  27117615 I: I2C bus could not clear: SCL clock line held low
  27118955 I: Info: I2C bus busy

I'm not sure how I can relate these messages to the moment that the IC2 connection failed. According to Home Assistant I got the last temperature updates around 02:24.

from ithowifi.

arjenhiemstra avatar arjenhiemstra commented on May 27, 2024

Ok thanks, not what I hoped to see again...

from ithowifi.

terual avatar terual commented on May 27, 2024

The behaviour I now got is not the behaviour I had. Now the whole I2C connection is lost, previously only the temperature stopped updating. Was that expected?

from ithowifi.

arjenhiemstra avatar arjenhiemstra commented on May 27, 2024

Could be 2 different things then. I assumed they were related but maybe not.

from ithowifi.

terual avatar terual commented on May 27, 2024

Did a power cycle of the Itho. Everything works now.

Maybe this can be of help?

2239 I: System boot, last reset reason: POWERON_RESET
2486 I: HW rev: 2, FW ver.: 2.4.3-beta2
8892 I: WiFi: connection successful
9120 I: WiFi info:
9351 I: SSID:**** | BSSID[****
9597 I: RSSI:-53dBm
9844 I: Mode:STA
10114 I: Status:WL_CONNECTED
10565 I: IP:***
10756 I: Setup: Virtual remotes, start ID: 3C,F4,FC - No.: 1
10970 I: Setup: remotes configfile loaded
14174 I: MQTT: connection failed, System config: 1
14413 I: Webserver: started
14678 I: mDNS: started
14919 I: Hostname: nrg-itho-f4fc
15164 I: Setup: done
15412 I: I2C init: QueryDevicetype - fw:25 hw:27
16050 I: I2C init: QueryStatusFormat - items:12
16502 I: I2C init: QueryStatus
16982 I: HA DISCOVERY: Start publishing MQTT Home Assistant Discovery...

from ithowifi.

TD-er avatar TD-er commented on May 27, 2024

@arjenhiemstra Not sure how you implemented this, but have you also included to temporary swap the I2C pins, restart Wire, perform an I2C scan, revert the pin swap and restart Wire ?

from ithowifi.

arjenhiemstra avatar arjenhiemstra commented on May 27, 2024

@TD-er I followed your approach here (but the blocking version for now):
https://github.com/letscontrolit/ESPEasy/blob/14fb3a2e07627ded9b5a592d45e7a1e479a8229b/src/src/Helpers/I2C_access.cpp#L14-L17

I'm not using the Wire lib because it lacks a proper slave implementation. I use the ESP-SDK implementation instead. What I see from the I2C check code is that the pins are setup as INPUT. On my add-on there are pull-up resistors on the board itself. So I conclude that if after switching the pins to an INPUT state the SCL and/or SDA line is still LOW there must be an other device on the bus actively driving the line LOW. I'm not sure if the add-on can force that to HIGH.

A bit of background on the issue;
From my end I had implemented (and I made a stupid mistake there) a check to determine whether the I2C bus is busy. I did this by checking if the SCL line was in a LOW state. That should have been the SDA line because a start condition first pulls the SDA line LOW, thereafter the SCL line. By only checking the SCL line there was quite reasonable chance a master already initiated a start sequence after which the add-on still tried to send a start sequence itself.
I have changed that in the latest beta2 version of the firmware checking both the SDA and SCL line states. (But I think that there is still a possibility for a collision in the time between this check and the actual initiation of the master communication though, which I I'm not sure how to mitigate partly but not fully)
Nevertheless, apart from the latest crash mentioned here it seems that other users haven't experienced issues anymore since these changes.

from ithowifi.

arjenhiemstra avatar arjenhiemstra commented on May 27, 2024

Reading a bit further, checking SDA/SCL pin state alone is not enough it seems. Both pins HIGH could also occur mid transmission. Better probably to check pin state for at least 2 SCL cycles?

Furthermore, I2C multi master also describes the need for implementation of collision detection and arbitration between each byte / I2C interaction... This should then be done within ESP-IDF.

There are references in code to that ie.
https://github.com/espressif/esp-idf/blob/daf3da5e4bcd001fb339c2d5424077d819fc8051/components/driver/i2c.c#L1502-L1506

But I cannot find any info on the implementation of i2c_ll_is_bus_busy

from ithowifi.

TD-er avatar TD-er commented on May 27, 2024

The clock can also be pulled down by any device.
This is called clock stretching and is part of the I2C standard.
Any device can use this to effectively lower the transmission speed, or stall the communication to get some requested data ready.

But just wondering about your remark of using as an I2C slave....
You know you cannot act as a master when you're a slave device?
Only a master can start communication.

from ithowifi.

arjenhiemstra avatar arjenhiemstra commented on May 27, 2024

I know about clock stretching, but clock stretching for hours is a bit outside the scope of the standard I guess ;-)

You know you cannot act as a master when you're a slave device?

Yes I know. What happens is that a command needs to be send from the add-on (master) to the itho firmware (slave) and then I switch the add-on to slave mode and wait for the itho firmware to answer the request (which then acts as a I2C master).

from ithowifi.

arjenhiemstra avatar arjenhiemstra commented on May 27, 2024

Interesting to see from the logging that collisions are quite common:

2022-10-24 23:01:00 I: Info: I2C bus busy, cleared after 3ms
2022-10-24 23:04:36 I: Info: I2C bus busy, cleared after 1ms
2022-10-24 23:19:24 I: Info: I2C bus busy, cleared after 2ms
2022-10-24 23:32:51 I: Info: I2C bus busy, cleared after 3ms
2022-10-24 23:47:59 I: Info: I2C bus busy, cleared after 1ms
2022-10-25 00:21:30 I: Info: I2C bus busy, cleared after 0ms
2022-10-25 00:26:26 I: Info: I2C bus busy, cleared after 4ms
2022-10-25 00:35:38 I: Info: I2C bus busy, cleared after 2ms
2022-10-25 00:50:26 I: Info: I2C bus busy, cleared after 1ms
2022-10-25 01:31:29 I: Info: I2C bus busy, cleared after 1ms
2022-10-25 01:46:17 I: Info: I2C bus busy, cleared after 4ms
2022-10-25 01:51:13 I: Info: I2C bus busy, cleared after 4ms
2022-10-25 02:44:08 I: Info: I2C bus busy, cleared after 3ms
2022-10-25 02:49:03 I: Info: I2C bus busy, cleared after 7ms
2022-10-25 02:58:15 I: Info: I2C bus busy, cleared after 3ms
2022-10-25 03:17:59 I: Info: I2C bus busy, cleared after 0ms
2022-10-25 03:21:55 I: Info: I2C bus busy, cleared after 0ms
2022-10-25 03:22:55 I: Info: I2C bus busy, cleared after 5ms
2022-10-25 03:56:06 I: Info: I2C bus busy, cleared after 0ms
2022-10-25 04:18:46 I: Info: I2C bus busy, cleared after 4ms
2022-10-25 05:01:49 I: Info: I2C bus busy, cleared after 1ms
2022-10-25 05:15:16 I: Info: I2C bus busy, cleared after 2ms
2022-10-25 05:33:40 I: Info: I2C bus busy, cleared after 7ms
2022-10-25 05:37:16 I: Info: I2C bus busy, cleared after 0ms

from ithowifi.

arjenhiemstra avatar arjenhiemstra commented on May 27, 2024

I just released version 2.4.3 which addresses this further. In some situations the add-on could still access the I2C bus while another master was active. The latest code changes in 2.4.3 should prevent this or at least further lower the change of this happening.

from ithowifi.

TD-er avatar TD-er commented on May 27, 2024

or at least further lower the change of this happening.

Also known as "making it harder to reproduce" ;)

from ithowifi.

terual avatar terual commented on May 27, 2024

Right now the temperature still hasn't been stuck since the last reboot. Would it create useful information to keep the add-on running on the beta to check if it stays that way? Or should I just upgrade to version 2.4.3?

from ithowifi.

arjenhiemstra avatar arjenhiemstra commented on May 27, 2024

or at least further lower the change of this happening.

Also known as "making it harder to reproduce" ;)

haha, something like that.... in this "multi-master and the other master is out of our control" situation there is just so much you can do I'm afraid.

from ithowifi.

arjenhiemstra avatar arjenhiemstra commented on May 27, 2024

Right now the temperature still hasn't been stuck since the last reboot. Would it create useful information to keep the add-on running on the beta to check if it stays that way? Or should I just upgrade to version 2.4.3?

I would upgrade

from ithowifi.

terual avatar terual commented on May 27, 2024

Forgot to check over the weekend, but friday the temperature got stuck again, and now also the humidity and CO2 levers are stuck as well.

The I2C connection status says connected by the way and the logfile doesn't show anything interesting.

from ithowifi.

arjenhiemstra avatar arjenhiemstra commented on May 27, 2024

Ok, thanks for the update. Will work on it further. In the mean time, you can always downgrade to another version if you should wish so.

from ithowifi.

terual avatar terual commented on May 27, 2024

No problem. Thanks for your work on this issue! Is there anything further I can do to track down the issue?

from ithowifi.

KoeKk avatar KoeKk commented on May 27, 2024

If needed I can also test for this issue, I have it also (sometimes stuck temp, sometimes stuck humidity), also with the same hints (stuck temp, and Temperature not available)

I have a CVE-Silent with fw version 27

from ithowifi.

stale avatar stale commented on May 27, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

from ithowifi.

arjenhiemstra avatar arjenhiemstra commented on May 27, 2024

Could you try the latest 2.4.4-beta4 firmware and report how it works for you? If you have an itho with built-in humidity sensor please enable the i2c safeguard feature (if your add-on hw revision supports it)

from ithowifi.

KoeKk avatar KoeKk commented on May 27, 2024

Sure, I've updated to the 2.4.4-beta4 and enabled the i2c safeguard. I'll let you know when something happens or in a few weeks if the situation improves.

Thanks!

from ithowifi.

terual avatar terual commented on May 27, 2024

I also updated to 2.4.4-beta4, enabled the i2c safeguard and did a reboot. Everything looks fine for now and I will report in a couple of days.

from ithowifi.

terual avatar terual commented on May 27, 2024

Everything is still working right now, so it is looking good thus far.

from ithowifi.

KoeKk avatar KoeKk commented on May 27, 2024

After running 2.4.4-beta4 for 6 weeks it looks perfect. The issues has not returned. Thanks for your work!

from ithowifi.

arjenhiemstra avatar arjenhiemstra commented on May 27, 2024

2.5.0 has been released as new stable release, including fixes for the described issue.

https://github.com/arjenhiemstra/ithowifi/releases/tag/2.5.0

from ithowifi.

arjenhiemstra avatar arjenhiemstra commented on May 27, 2024

2.5.0 has been released as new stable release, including fixes for the described issue.

https://github.com/arjenhiemstra/ithowifi/releases/tag/2.5.0

I've found a serious issue with the fail save firmware update, please do not install 2.5.0 and if you have already, wait with further updates until 2.5.1 comes out.

from ithowifi.

stale avatar stale commented on May 27, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

from ithowifi.

terual avatar terual commented on May 27, 2024

Issue is fixed, thanks!

from ithowifi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.