# Encje MySensors niedostępne po restarcie HA

**URL:** <https://ai-speaker.discourse.group/t/encje-mysensors-niedostepne-po-restarcie-ha/3302>\
**Category:** Uncategorized\
**Created:** [26 Styczeń 2023 10:15 UTC](https://ai-speaker.discourse.group/t/encje-mysensors-niedostepne-po-restarcie-ha/3302 "2023-01-26T10:15:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Autor:** ![feanor-anglin](https://yyz2.discourse-cdn.com/free1/user_avatar/ai-speaker.discourse.group/feanor-anglin/32/740_2.png) [@feanor-anglin](https://ai-speaker.discourse.group/u/feanor-anglin)\
**Data wpisu:** [26 Styczeń 2023 10:15 UTC](https://ai-speaker.discourse.group/t/encje-mysensors-niedostepne-po-restarcie-ha/3302/1 "2023-01-26T10:15:45Z")

</div>

Problem pojawił się po przejściu na wersję stabilną Nikodem (jednoczesne przejście na termux) i nie zniknął po aktualizacji do bety Ola. Z tego co udało mi się ustalić, problem nie dotyczy innych instalacji HA, np. w dockerze, chociaż wygląda na to, że dotyczył wcześniej:

> <https://github.com/home-assistant/core/issues/82783>
>
> \### The problem
> 
> I have HomeAssistant OS installed which connects to raspberry…pi with installed MySensors Ethernet Gateway. 
> HomeAssistant is in the same LAN but on different machine.
> After Raspberry Pi restart MySensors integration stops working. It does not update any entities. Manual reload of integration is necessary to make it working again.
> I grabbed some debug logs from mysensors (attached). MySensors integration also stops logging after last entry about saving sensors .
> 
> 
> \### What version of Home Assistant Core has the issue?
> 
> 2022.11.4
> 
> \### What was the last working version of Home Assistant Core?
> 
> \_No response\_
> 
> \### What type of installation are you running?
> 
> Home Assistant OS
> 
> \### Integration causing the issue
> 
> mysensors
> 
> \### Link to integration documentation on our website
> 
> https://www.home-assistant.io/integrations/mysensors
> 
> \### Diagnostics information
> 
> \_No response\_
> 
> \### Example YAML snippet
> 
> \_No response\_
> 
> \### Anything in the logs that might be useful for us?
> 
> \`\`\`txt
> 2022-11-27 11:18:32.283 DEBUG (MainThread) \[mysensors.transport\] Receiving 0;255;3;0;2;0.0.1
> 2022-11-27 11:18:32.285 DEBUG (MainThread) \[mysensors.transport\] Receiving 0;255;3;0;12;0.0.1
> 2022-11-27 11:18:32.286 DEBUG (MainThread) \[homeassistant.components.mysensors.gateway\] Node update: node 0 child 255
> 2022-11-27 11:18:32.287 DEBUG (MainThread) \[mysensors.transport\] Receiving 0;255;0;0;18;2.3.0
> 2022-11-27 11:18:32.288 DEBUG (MainThread) \[homeassistant.components.mysensors.gateway\] Node update: node 0 child 255
> 2022-11-27 11:18:32.289 DEBUG (MainThread) \[mysensors.gateway\_tcp\] Connection lost with \<\_SelectorSocketTransport closing fd=52 read=idle write=\<idle, bufsize=0\>\>
> 2022-11-27 11:18:33.206 DEBUG (MainThread) \[mysensors.gateway\_tcp\] Connection lost with \<\_SelectorSocketTransport closing fd=47 read=idle write=\<idle, bufsize=0\>\>
> 2022-11-27 11:18:42.163 DEBUG (SyncWorker\_6) \[mysensors.persistence\] Saving sensors to persistence file /config/mysensors\_69478a2845889930e4b5b400b737372c.json
> \`\`\`
> 
> 
> \### Additional information
> 
> \_No response\_

Encje wracają po restarcie modułu, czyli po ponownej prezentacji i wysłaniu wartości, co zgodnie ze specyfikacją integracji MySensors powinno być potrzebne tylko za pierwszym uruchomieniem danej encji. I do tej pory tak to działało, encje MySensors nie dodawały się dopóki nie wysłały wartości, ale były normalnie dostępne po restarcie HA.

Wiem, że MySensors nie jest jakąś szalenie popularną integracją, ale może coś uda się zrobić w temacie?

---

<div class="post-metadata">

**Autor:** ![feanor-anglin](https://yyz2.discourse-cdn.com/free1/user_avatar/ai-speaker.discourse.group/feanor-anglin/32/740_2.png) [@feanor-anglin](https://ai-speaker.discourse.group/u/feanor-anglin)\
**Data wpisu:** [30 Styczeń 2023 13:29 UTC](https://ai-speaker.discourse.group/t/encje-mysensors-niedostepne-po-restarcie-ha/3302/2 "2023-01-30T13:29:14Z")

</div>

No cóż, to pomogłem sobie sam 🙂 Znalazłem dzisiaj trochę czasu, żeby przyjrzeć się sprawie. W logach zauważyłem taki wpis:  
 ![image](https://global.discourse-cdn.com/free1/uploads/ai_speaker/original/2X/1/12893c51b0d09c386dc011c4c6abe676d5deb46c.png)

Czyli mysensors.persistence próbuje uzyskać dostęp do starej ścieżki, tej sprzed aktualizacji do termux. Okazuje się, że ścieżkę do pliku da się zmienić w pliku AIS/.storage/core.config\_entries:

 ![image](https://global.discourse-cdn.com/free1/uploads/ai_speaker/original/2X/d/d8511c4810f8da2c8af06b752cf7a37626b20a1f.png)
