If the button itself works, there’s only one implication there: you had a faulty connection that allowed a drop-out.
Actually thinking about it, its likely because the code that handles the push button is part of the emonPiLCD script, with the emonPiLCD not present I notice the script is not active on my emonbase at home. Which suggests this isn’t an option. @glyn.hudson can confirm to be sure.
If you have a standard sized SD card reader we have plenty of the adapters that go from the older standard size to the micro SD card size.
@TrystanLea, maybe these adapters should be included by default in any SD Card image orders from the shop that don’t also include an emonPi? I’ve seen a lot of external card readers, none of which handled micro-SD cards without an adapter.
Hi Tristan, thanks for the offer. I already ordered one. I have two readers but neither takes microSD. I’d found some online but Robert alerted me to the existence of adapters.
I do tend to agree with Greebo’s suggestion though. It would have been useful to have one included as long as it is necessary.
Trying to simulate a push button won’t work since the emonPi LCD script kills itself on startup if no I2C LCD is detected, as is the case on an emonBase.
If no button / LCD is present SSH can be enabled by adding a file called
ssh to the
/boot partition. This can be done externally to the Pi using a micro SD card reader (the /boot partition is FAT so will mount on WIndows). Or the
/boot/ssh fie can be created on the device using a attached usb keyboard.
You will need to login with username
pi and pass
emonpi2016 then run
sudo touch /boot/ssh
Alternatively you could run
Sure we can include and adaptor. We have plenty spare.
I was wondering it they keyboard and hdmi monitor method I mentioned above would be a possibility as simulating button press won’t work since script. Is not running on emonBase.
It would be if I had an HDMI lead I might buy one today; I think I should have a spare.
Could you ‘borrow’ an HDMI lead from your PC or TV?! It will only be needed for a few min. Although the same goes for a micro SD card adaptor. In the future we will be shipping all emonBase with an SD card adaptor.
Status update: as mentioned on the ssh disabled thread, I just got ssh to work. I have a microSD card adapter on order but I went out today and bought an HDMI cable, so I’ve done it by attaching a monitor and console. (There’s no way I’m extracting a cable from the rat’s nest that is my hi-fi, and I need my PC working whilst I play with the emonBase)
I created the /boot/ssh file, though I couldn’t do what I wanted. I first tried ‘sudo cat’-ting some text into the file to remind me what it’s there for in the future, but I got a permission error. So I used touch. I still don’t see what the problem is with putting some text in the file, unless its something sudo specific? (I hardly ever use sudo)
More seriously, even with the /boot/ssh file in place, the server still wasn’t active. So I decided to try another technique. I went to https://www.raspberrypi.org/documentation/remote-access/ssh/ and tried the systemctl method, but that asks for the root password and I don’t know what that is. Should I?
So then I tried raspi-config and that worked as advertised, so I logged in via ssh and got a long OpenEnergy login message. But there’s nothing there prompting me to change my password!?
Of course I can change it myself, but I’ll wait until I have a better understanding of why I didn’t get prompted, and also until my microSD card adapter arrives. I don’t fancy locking myself out of the machine without root access.
Ah, OK. I now understand that root access is disabled on the pi so I just have to gird my loins to change the pi user password. And perhaps systemctl would have worked if I used sudo? I need to think of a harmless systemctl command that needs rootly powers to experiment.
Did you reboot after adding the
sudo should be required to write a file into the
/boot partition. I think the
ssh file should be blank, I’ve not tested with contents in the file. I’m not sure if this would effect the operation
No, the page https://guide.openenergymonitor.org/technical/credentials/ doesn’t say it is necessary. But I prefer one of the other conventional mechanisms to enable a service without rebooting.
Yes, agreed. What I don’t understand is why I can’t write contents in the file, even if it’s the wrong thing to do. Though I’ll be surprised if whatever script uses that file to control the service actually checks not only whether it is present but also whether it is empty.
Ìt is neccerarry. I will as this to the guide.
Alterantcaly you could just run
which runs these two commands:
sudo update-rc.d ssh enable sudo invoke-rc.d ssh start