Skip to content
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

Support for Firmata later than 2.06 #26

Closed
git-developer opened this issue Dec 4, 2017 · 12 comments
Closed

Support for Firmata later than 2.06 #26

git-developer opened this issue Dec 4, 2017 · 12 comments

Comments

@git-developer
Copy link
Contributor

Some users of FHEM (blueberry63, Meck) try to use Perl Firmata together with a version of ConfigurableFirmata newer than 2.06. The latest version of ConfigurableFirmata that perl-firmata supports seems ot be 2.06. I saw that ConfigurableFirmata nowadays has separate version numbers for the protocol version (2.06) and the firmware version (2.10). But since the REPORT_VERSION message uses the firmware version and not the protocol version, the latest supported version is 2.06.

To solve this problem, either the user has to change the firmata version in his sketch, or perl-firmata has to be extended to support newer versions.

@jnsbyr
Copy link
Collaborator

jnsbyr commented Dec 7, 2017

Please have a look at this Changelog. My forked version 0.63 provides the solution you are looking for by being firmware version independent and assuming protocol backward compatibility. I have been using it continuously for more than a year and it can be considered stable. I have not tried it with the most recent releases of ConfigurableFirmata but it should work as long as you don't need to use Firmata protocol features that have been added to the latest versions.

I could create a pull request (including the changes of my pending pull request for the software serial support) if this is of interest.

@git-developer
Copy link
Contributor Author

That looks promising, I'd appreciate a pull request!

@jnsbyr
Copy link
Collaborator

jnsbyr commented Dec 7, 2017

@ntruchsess It seems to me that I cannot create another pull request on top of a pending pull request. I do not intend to merge pull request #25 into the master branch (although I seem to have the authorization to do so) unless you give me a go.
@git-developer U could try my version for the time being ;-)

@git-developer
Copy link
Contributor Author

@jnsbyr A pull request is a connection between two branches, so all commits that you put on top of jnsbyr:master will automatically be part of your pull request and merged into ntruchsess:master. If you don't want to merge all commits of jnsbyr:master into ntruchsess:master, you have to cancel the pull request and create a new one. You could create a new branch in your repo that contains only the commits you want to merge. You could also choose a different branch in the target repo; but currently, there's no other branch (e.g. ntruchsess:dev) you could merge into.

@jnsbyr
Copy link
Collaborator

jnsbyr commented Dec 8, 2017

@git-developer Thanks for the explanation of the GitHub way of gitting. So all we need is #25 to be merged and this should preferably be done by the repository owner.

@jnsbyr
Copy link
Collaborator

jnsbyr commented Dec 8, 2017

@git-developer I had another look at the changelog. If you currently use perl-firmata 0.61 that is based on #24 you already have protocol/firmware independence. #25 only adds a minor improvement for a special error situation. Did you make your tests with perl-firmata 0.61?

If you looking for a solution for FHEM you should know that the distro includes perl-firmata 0.59 and you need to update manually until the perl-firmata part of the FHEM distro is updated.

@git-developer
Copy link
Contributor Author

Sorry, I didn't test it because I run version 2.6; I created this issue because several other users shared a problem: they downloaded the latest version of ConfigurabeFirmata, made a connection to the FHEM version of perl-firmata (0.59) and ran into trouble.
So if I understand you right, it should be enough if perl-firmata in FHEM would be updated to 0.61.

@jnsbyr
Copy link
Collaborator

jnsbyr commented Dec 9, 2017

Yes, but I would advise to use my version 0.63 to get all features and fixes. Please make tests with version 0.61 or 0.63 and report your results.

If you provide a link to the FHEM discussion you are referring to I could provide some additional insights that are FHEM specific.

@git-developer
Copy link
Contributor Author

You can find links to the FHEM discussion in my first comment. Thanks!

@git-developer
Copy link
Contributor Author

I made tests with version 0.63 today.

It was quite an effort for me to create a test setup with Arduino IDE 1.8.4, ConfigurableFirmata 2.10.0, RCSwitch 2.5.2 and FHEM 5.8, but I was finally able to put it all together. It worked ... nearly. The protocol version is not only requested in Platform.pm but also in 10_FRM.pm. I had to manually change a line to use get_max_supported_protocol_version. With this change, it worked.

I saw that my change has already been done on branch dev. So, to support ConfigurableFirmata later than 2.06, we need perl-firmata in version 0.63 and the changes in fhem-mirror branch dev.

@jnsbyr
Copy link
Collaborator

jnsbyr commented Dec 19, 2017

@git-developer Thanks for the feedback. Your are right - to get it working with FHEM some additional changes are required to the module 10_FRM.pm. These changes have been done at the end of 2015 and I am very sorry that they did not make it into the stable branch of FHEM (yet). I forgot that I do not use the official release of this module but a customized version.

To wrap it up, perl-firmata 0.63 is working for you and it would be a good idea to merge it with the master branch.

@jnsbyr
Copy link
Collaborator

jnsbyr commented Jan 5, 2018

The original issue has been resolved in the FHEM project by updating to perl-firmata 0.63. Merging #25 is recommended.

@jnsbyr jnsbyr closed this as completed Jan 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants