I’m sure I’m not the only one using a headless Raspberry Pi for my Home Assistant build. I’m curious to hear how other people code for this configuration.
After trying a few different things, I’ve settled on SSHFS. I’m on Linux (openSUSE), but this can be accomplished on Windows and Macs as well. I won’t go into the details of how to do it on those systems, honestly because I don’t know how. Google is your friend.
What it comes down to is using SSH to create a “drive” and mounting it like an external hard drive. You can then use your favorite editor or IDE to work on your HA system. I’ve got a tiny script to issue the SSH commands to establish the connection. I’ve also set up SSH between the two systems with key exchange so I don’t need to put in a password.
Then I can use my favorite editor (Sublime) to do my coding. The only bummer is that the connection breaks each time I close my laptop. It makes perfect sense, but it means I’ve got to reconnect the virtual drive.
I’m using a headless mini-itx system, and use emacs with a component called tramp that lets me open files on a remote system to edit them. It looks like sublime edit, textmate, and atom have plugins providing remote file editing support as well
HASS itself is written in python, which is multi platform, so I code and test on my laptop/desktop.
Sometime ago I was developing an application to receive temperature sensor data from battery-powered nodes using NRF24L01 chips. This was done in C/C++, so for that project I was coding on my laptop, and using syncthing to automatically sync the source code to the Raspberry where I did the compilation and testing.