Issue with PAGE_INCREMENT / PAGE_DECREMENT
Closed this issue · 3 comments
You can also just send PAGE_INCREMENT or PAGE_DECREMENT without any payloads (or with, but it will be ignored) to have the module change the displayed page by one.
I appear to be seeing an issue with the module; just checking if anyone else has seen this and has any ideas what I might be doing wrong or if it is a genuine bug/issue.
I have MMM-pages installed on my mirror along with MMM-page-indicator and MMM-remote-control; from my OpenHab installation I have commands that send either:
http//:[my_mirror_ip]:8080/remote?action=NOTIFICATION¬ification=PAGE_DECREMENT&payload=1
or
http//:[my_mirror_ip]:8080/remote?action=NOTIFICATION¬ification=PAGE_INCREMENT&payload=1
This is then received by MMM-remote-control and the notification is then sent on.
I currently have 4 pages setup on my mirror.
If I send an INCREMENT command it shows the next page correctly, sending another shows the next page correctly, this works all the way to the 4th page. Sending another INCREMENT then shows page 1 again, as would be expected.
However sending a DECREMENT command appears to not decrement the page correctly - The page displayed appears to be the next incremented page, but the page indicator displays as if the page has moved back one correctly.
Ah, that's actually outdated. When I first made MMM-pages, that was the case. I now have it so that users can specify how much to increment/decrement by and it will try to comply. I'll update the readme. Thanks for catching that.
For your particular issue, I would just modify your commands omit the payload field, if possible. If not that, I'd change your payload for decrement to -1.
Actually, scratch that; it makes so much more sense to have a positive payload for decrementation.
This has been implemented in 614f6b9, and your commands shouldn't need change.
Let me know if you have any problems.
Thanks for the quick reply - and quick 'fix'. Works perfectly.