FHEM Forum

FHEM => English Corner => Thema gestartet von: malc_b am 19 Februar 2017, 14:01:38

Titel: Development IDE
Beitrag von: malc_b am 19 Februar 2017, 14:01:38
Hi,

Anyone suggest a fhem module development setup (or even just for myUtils routines)?   What IDE, etc. and how to config it.  I currently have my fhem test setup running on a raspberry pi so a web base remote IDE would work for that, or I could set up a test fhem installation on my windows PC (wiki has how to do that without registry entries).  I already have padre perl IDE and stawberry perl on my PC if that helps.

TIA
Titel: Antw:Development IDE
Beitrag von: fruit am 19 Februar 2017, 14:55:26
I use a simple text editor that has context highlighting and then ssh to my live fhem system when I am ready. On occasions I have set up another Pi with an offline fhem instance.
I have not found a need for anything more complicated than that so far

Edit:
I forgot mc (midnight commander) but of course mc is an essential on any linux system ;)
Titel: Antw:Development IDE
Beitrag von: Loredo am 19 Februar 2017, 15:07:59
IMHO there is no IDE for Fhem as such. It has fairly moderate requirements for its environment.

I recommend getting FHEM via SVN (https://svn.fhem.de) on your local machine. I am using Versions (http://versionsapp.com/) as a GUI on my Mac (quite nasty but AFAIK there does not seem to be any alternative).
For Windows, I believe a combination of TortoiseSVN (https://tortoisesvn.net/) and PuTTY (http://www.putty.org/) is the way to go.

Second, install one (or even many) Perl versions using Perlbrew (https://perlbrew.pl/) (I believe for Windows you would want to have a deeper look to berrybrew (http://perltricks.com/article/119/2014/10/10/Hello-berrybrew--the-Strawberry-Perl-version-manager/)). It will help you to test using different Perl versions.
You might also want to install cpanm for easy Perl module installation (also see here (https://perlbrew.pl/Perlbrew-and-Friends.html)).

Personally, I prefer the TextMate2 (https://macromates.com/) editor on my Mac. However, for multi-platform I believe you might want to go for Atom (https://atom.io/).

TextMate has direct support for perl-tidy (http://perltidy.sourceforge.net/) to clean-up and structure your code which I find to be very useful and convenient. For Atom, there seems to be a package for integration (https://atom.io/packages/perltidy) as well.


Hope this helps to get started.




Regards,
Julian
Titel: Antw:Development IDE
Beitrag von: Bob B am 24 März 2017, 18:07:15
I use Eclipse + EPIC plugin to develop my fhem stuff. On a Linux PC.

It's heavyweight and needs experience but works well, mostly - breakpoints can be feisty and the way fhem runs user modules can confuse you and/or the perl debugger. Ignoring the debugging side, just having a really powerful IDE is a joy.

I don't know (and don't want to know!) what the Windows experience would be.
Titel: Antw:Development IDE
Beitrag von: crowzero am 28 Oktober 2017, 02:10:48
Hallo zusammen,
ich nutze ein eigenes Git-Repo auf meinem lokalen Rechner mit Atom. Das Deployment auf den Raspi mach ich mit Rake (Ruby). Hier verwende ich verschieden Tasks:
$ rake -T
rake BuildCFG:controls    # Controls
rake BuildCFG:devices     # Devices
rake BuildCFG:structures  # Structures
rake deploy:all           # Deploys all from the local development to the remote server
rake deploy:default       # Deploy own Perl-Modules, WWW-Directory and CFG from the local development to the remote server
rake deploy:ftui          # Deploy only FTUI - FHEM Tablet UI from local development to the remote server
rake sync:all             # Syncs all from the remot server to local development
rake sync:cfg             # Syncs configuration files (cfg) from the remot server to local development

Wenn ich Einstellung auf dem FHEM mach oder ein Update, dann sync ich die Änderungen über rake sync:all ins Git-Repo.

Derzeit experimentiere ich mit einer Vagrant VM auf dem Lokalen Rechner um eine komplette Entwicklungsumgebung zu bekommen, ohne alle Gateways usw. doppelt zu besitzen.

Würde mich interessieren, was Ihr so als Dev-Enviorments einsetzt.

Gruß,
crowzero