Jump to content

Is there an IDE for Polyglot development on Polisy?


Recommended Posts

I am posting here, as the Developer section seems to be geared to only cover specifically published nodes and not more general development questions, so I hope this is the right place.

 

I have been developing automations on my ISY for a long time.  I just started to delve into node servers, and more specifically in Polyglot on a Polisy.  I have successfully developed and locally deployed my first Node server in PG2.  

 

My basic question (which may be an obvious one, but I have searched forums to no avail) is how i can easily use a good Python IDE (ideally from both a Mac and Windows) to develop on the Polisy.

While I was successful in getting a Node server working I did a lot of it in the text editor that comes with the Polisy and that was grueling for all the obvious reasons.  At some point, I had a moment of clarity and sanity, and got PyCharm.  I did this development in a hybrid, as I did not see a way to access the live Polisy environment, so I used the IDE for all non-Polyglot related functions that surround the specific automations.

I then discovered that PyCharm has an ability to work across SSH in the Pro version.  So, I got that and tried to make it work.  However, while the test connection worked via their SSH connection configurator, the actual move to the next step fails.  So, I am not able to get the real connection to happen.  I pinged PyCharm and they asked if Polisy is ARM, as they do not work with ARM.  The specs on UD website just say it is an AMD chip.  Given AMD is just now getting into ARM, my guess is Polisy does not use ARM, but good to confirm.  If it is not ARM, this leaves me with no answer as to why I cannot get PyCharm to work.

So, has anyone gotten PyCharm to work that can give me the magical answer as to why I cannot get past the configuration step?  Alternatively, is someone using a different IDE that works remotely?  I assume Polisy itself does not have a built-in IDE, as it is not a desktop edition of RPi, but if it does, that could work too.

 

Thanks.

 

 

Link to comment

I use the same thing on Polisy that I use on the websites that I maintain.  WinSCP coupled to Sublime Text.  Both have non-expiring trial licenses (a.k.a nag-to-pay, however both are definitely worth the low fee).   To use the two together, in WinSCP preferences modify the editor and point it to the Sublime Text binary in windows program files.   As soon as the file is closed or saved in sublime it will be saved back to the server (Polisy).

You can also configure key pairs for login, so that just opening WinSCP and pointing to Polisy logs you in.

Link to comment

Thanks for the info and quick response MrBill.  

Does this fully solve the issue?  I want to use the editor interactively to debug, etc. (because otherwise, how can I more easily debug the parts of the code that need access to a running Poly instance?).   So, it would effectively have to be executing the code on the remote live and using the debug and log information that is generated remote.  PyCharm seems to do that by installing an IDE component on the RPi - if I could only get it to work through the SSH.  Unless you are saying your combo does the same?  Also, WinSCP seems to be Windows only and I spend more than half my time on a Mac, so a multi-platform solution would be much better.  

Link to comment

@seacordeanWelcome to node server development.

Most of the node server developers are on Slack.  That's the best place to ask questions and get answers.  You do need to register as a developer with UDI if you have not to get an invitation.

PG2 is being deprecated and support is slowly going away.  It's find for getting a basic understanding of how node servers work so what you've done isn't wasted time.  However, most node servers have been ported to PG3 and most new node server development is happening on PG3.  

I'm not sure why PyCharm thinks the processor matters.  Do they run a component on the client machine?  That still may be a problem as the Polisy used FreeBSD as it's operation system.  Polisy is an X86 (or really an AMD64) processor.

I can't really help you with IDE questions as I just use VIM on the Polisy to do all my development.

Link to comment
4 hours ago, seacordean said:

Does this fully solve the issue?

its not the IDE that you asked for, but I'm not sure that exists.   It does solve your issue completely tho, by providing a full featured python (and other platforms) editor with formatting, completion and other tools.  hit ctrl-s or close the file and it's saved back to it's source.  You can test live in another window. 

I have two PG2 node servers that I put together for personal use and never published. The solution works like what you asked for but it's not what you asked for.

Link to comment

Thanks bpwwer - I got more info from PyCharm - it looks like Polisy does not use ARM, so that is not an issue - however, as you intuited, they do not support and do not have plans to support FreeBSD.  So, that is a dead-end.

And thanks for the note on Slack - I was still experimenting, so was not sure I was going all-in to join the developer community, but now it seems like that is a good idea.

As for PG3 vs PG2 development, I am not sure if that changes the SDLC approach, but you seem to be implying it might.  I chose PG2 because deployment is inferred by Polyglot through the noderservers directory, so I was able to edit and reload (either through stop and start or through delete and add. depending on if I am changing code or profile) and I do not know how to deploy to a store in order to get PG3 to load the Node server (and that also seems a bit clumsy during dev/test cycles). 

 

So, PG3 may be my next challenge to conquer.  And it seems the right place to continue these discussions would be in Slack.  So, I guess this thread can be closed at this point.

 

 

 

   

Link to comment

The process for PG3 are a bit different, but it's mainly just in how you initially deploy your node server.  Developers get access to a "Local" store in PG3 where you can add/remove node server.  Once added, the process is a fairly simple install/delete or stop/start depending on how you get the changes to the node server directory.

The Polisy supports both NFS and SMB file sharing protocols so it is possible to mount the Polisy's file system to another machine and then edit/copy files as if they were local.  There are developers on slack that do this and can help with the setup. 

Link to comment

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...