Salut @pierre-gilles,
Sorry for the REX time, I’ve been quite busy over the last 2 weeks.
I see that you haven’t inserted the answer you made to me on Slack, so I’ll quote you to reply:
1 & 2: Top!
3: Ah, that’s happened to me too, it’s a bug, I think there can be situations where your Gladys instance connects multiple times to Gladys Plus and thus receives multiple messages… I created an issue → https://github.com/GladysAssistant/Gladys/issues/744. Do you have more information about your setup? Was it in local development, or on your production Raspberry Pi? Had you restarted Gladys frequently, or on the contrary never? I’d like to know the circumstances of the bug
4. Ah! Damn, it’s bad that at this level your DB is so messed up… Keep a good backup so we can analyze what’s wrong with your DB. It’s not normal actually, normally SQLite supports up to terabytes in DB… you can try adocker restart gladysto see if it fixes the problem?
5. What can be done is aDELETE FROM t_device_feature_state;this will delete all entries in the tablet_device_feature_state. Before that, do aSELECT COUNT(id) FROM t_device_feature_state;so we know how many rows are in your table
](Pierre-Gilles (Pierre-Gilles Leymarie) · GitHub)Pierre-Gilles
#744 Gladys sometimes connect multiple time to the Gladys Gateway and receive multiple time new messages
Gladys 4 RC
GladysAssistant/Gladys | 15 avr. | Added by GitHub
-
It was through my Gladys Prod on Raspberry 4. No, I never restart Gladys. But following that, I tried to do it and it didn’t change anything. So I modified the Arduino program to add a 500ms pause after a command and it no longer causes any issues.
-
Yes, I suspect the problem is elsewhere and fortunately ^^ For info, I’m running on a 64GB Sandisk V30 SD card, so I don’t think that’s the issue either. I did the reboot test, it doesn’t solve the problem but I have a nice error. I’ll post it if needed.
-
Apparently my DB is locked. None of the manipulations work. So today I reinstalled everything and it still didn’t work for the states. But the problem is resolved. I first tried, as we discussed in the conv-call, to replace the original topic
mqtt:Arduino01_Batiment:Energie Totale Phase 2:Centre Equithérapiewithmqtt:Arduino01_Batiment/Energie Totale Phase 2:Centre Equithérapie(i.e., replacing the « : » after the Arduino name with « / »). It didn’t work (I’m only talking about the states, the command worked fine)
So I went to the second attempt, i.e., subscribe the Arduino to all topics of each device keeping the topic in the formmqtt:Arduino01_Batiment:Energie Totale Phase 2:Centre Equithérapie. I added micro delays before the subscriptions, and listen, it works for now with 15 subscribed topics. Commands and states work perfectly.