-
Notifications
You must be signed in to change notification settings - Fork 109
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
Rolling code glitch #25
Comments
Damn, happened again :-/ |
Not sure I understand the problem, so it created a duplicate with lower case? Ie somewhere there is a lowercase/ uppercase conversion issue?
…On February 2, 2019 10:05:00 AM EST, Nickduino ***@***.***> wrote:
Damn, happened again :-/
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#25 (comment)
|
|
I checked in a fix that makes sure that shutter IDs are always upper case. But I'm not sure that's the root cause. Since your log file seems to indicate that there are issues with all the other config values as well. TXGPIO, etc. So I'm more concerned that the issue could be related unicode situation or special characters that got added to the config file and prevent the parser to understand the file. Did you copy the config file from Windows? Or anything else that could have caused this. Maybe best if you can send me the config file off-line? |
ok, confirmed the problem you saw was indeed only linked to the duplicate entry, which should be avoided with the uppercase conversion of the shutter id introduced yesterday. |
Shit! I hasn't happened to me in maybe a year. Short term, delete the last line, increment the new last line and restart. |
this has happened to me twice now. i needed to resetup the pi, after i broke the sd card.. i have a feeling that the last line may be added later (maybe on a specific action like "down" or something).. thanks for the quick reply! |
Yes (i.e. it doesn't happen on setup) but that's definitely a bug |
@ssanden, can you give me a bit more information when it happened. Did you add a new shutter? Did you edit it? Or did it happen during normal operation without your manual input? The more you can share, the better the chance I can reproduce and fix it. |
Every time it happened to me, it was during normal operation. Not sure if it was during manual operation or programmed operation but I lean towards programmed |
every time i reload the config i get this error too:
|
sorry, i was somewhat buzy.. @MichaelB2018 : for me this happend shortly after i added a new shutter. then, while the first few actions (up/down/stop) this came up.. |
Check what's on line 160 in myconfig.py |
the same error (...myconfig.py:160) comes up on my system.. i already filed an issue, #68 this is the content of myconfig.py at line 160:
|
|
I had the same Problem today. It happend during normal Operation.
operateShutters.conf:
|
Delete the last line and change the 8 to 20. |
Everything worked fine again after correcting the values as Nickuino mentioned. But now it already happend again.
|
i'd suggest to remove the string that ends with the uppercase letter and keep the one with the lowercase end. |
I still get the error:
operateShutters.conf:
|
@ssanden @Secarius The Object config.getint(self.Section, Entry) in Line 160 can't handle the Type None. To get around this problem quickly, you can set the values to e.g. -1 or 101, as you obviously don't use shutter intermediate positions. |
@firewiremb Thank you, but what is the ShutterIntermediatePositions? |
@Secarius If you press the stop button in Pi-Somfy when the shutter is stationary, the shutter moves to this saved position. However, Pi-Somfy does not know the position stored in the motor. So that Pi-Sofmy then knows the position for further movements of the shutter, this must be stored manually in the configuration file. |
Fixes error massage in command line operation as mentioned by @Secarius and @ssanden in Issue Nickduino#25 _Error in MyConfig:ReadValue: 0x279621: invalid literal for int() with base 10: 'None' : myconfig.py:160_ For the object _getint()_ None ist not an valid type. But None ist used as initial value in the config file
@firewiremb yes, when i press the stop button on my wall switch the motor moves the shutter to +- 50 percentage. |
Fixes error massage in command line operation as mentioned by @Secarius and @ssanden in Issue Nickduino#25 "Error in MyConfig:ReadValue: 0x279621: invalid literal for int() with base 10: 'None' : myconfig.py:160" For the object _getint()_ None ist not an valid type. But None ist used as initial value in the config file
ixes error in command line operation see #25
Fixes error in command line operation see Nickduino#25
Just ran into this now I have more than 10 remotes. |
Is that on your radar or not at all? |
So my change for this is mixed in with changes to the MQTT API that worked better with Home Assistant (for me, anyway), and a feature to keep the status of the blinds in slightly better state if you have multiple remotes controlling sets of blinds. |
I'd like to know what the others think but I think being able to track a blind state when moved from multiple remotes is useful |
Keen to know what you changed for MQTT? Does it break MQTT discovery? |
personally, i would prefer to have the basic commands (up, down, stop, program and the hardware/gpio-stuff) in a seperate "core package". that package should then be usable like an api.. or maybe be importable or whatsoever.. all the higher functions (partial rise/lower, tracking, webinterface, mqtt, alexa and so on) would then also live in a seperate entity and just make use of that core package. i dont know if this is practicable.. and it may also be a bit selfish since it just fits my requirements the most :) of course this is a lot of work, that means to change a great deal. greetings |
Agreed. The position tracking code should ideally be seperate from the signalling code. This would need a refactor. Also as mentioned, the presumption of one channe=one motor is not always accurate and in fact this can be many-to-many although that does add unnecessary complexity for most users |
I don't know how basic you like things but my V1 release before @MichaelB2018 came on board was extremely basic (and didn't show the rolling code glitch) : |
It improves the HA MQTT discovery, by changing the blind into the sort that has an an opening, closing and stopped state, as well as a position value which can be requested via a different endpoint. That makes HA work a bit better, as it can enable the Open, Close & Stop buttons at the right times, track (sort of) the blind position, and request specific positions. But it changes the MQTT API completely so anyone not using HA discovery would need to update their commands. This is why I didn't consider a PR. You'd probably want to have a config switch to retain the original format. Most of the changes are in this commit. |
Just as another datapoint, this issue is still occurring for my setup as well. It means periodically logging into the Pi, deleting the spurious value, and re-starting the service. I usually realise that I need to do this when the blinds fail to open in the morning :-/ Sometimes it takes weeks between glitches, sometimes only a day or two, but a fix would be welcome (or even just some pointers as to where to start debugging this; I'm not really familiar with Python, but can usually find my way around a codebase eventually). |
I don't know what happened:
The error:
I deleted line 108 and added 4 to the rolling code of line 98 for good measure. All seems well (the shutter works)
The text was updated successfully, but these errors were encountered: