Closed andrewerrington closed 6 years ago
Hi. Raspbery pi works fine with network manager after tuning. (i found solution after hours of googling at https://raspberrypi.stackexchange.com/questions/29783/how-to-setup-network-manager-on-raspbian)
maybe the author will add this description for raspeby pi users into readme?
It's much easier to avoid it.
I have to admit, that I use the setup script on Windows only. There everything works out of the box. The Network Manager is needed for the script to check available networks and if one of it is an SonOff, then connect to it. Connecting manually to the SonOff Wifi and then run the wget would remove the need for the network manager installation and hence make it easier to use on a raspberry. But at least me would not want to run it on an raspberry, as it would stop my openhab from working (even if only for a few minutes) I think that adding a hint to the readme and place your wget script there could help others. Do you agree @andrewerrington ?
Sure, that would work. There is one more step, and that is to add a route to the device (as mentioned in the ipsumdomus blog).
So, my steps (on a Raspberry Pi) are: 1) put Wemos device in AP mode (press and hold button for 5s) 2) find device and connect to it (SSID: ITEAD-10000xxxxx Password: 12345678) 3) add route if necessary (sudo route change 0.0.0.0 mask 0.0.0.0 10.10.7.1) 4) (optional) use wget to read device info (wget -O- 10.10.7.1/device) 5) use wget to send local WiFi settings to device (wget -O- --post-data='{"version":4,"ssid":"SSID","password":"PASSWORD","serverName":"n.n.n.n","port":1080}' --header=Content-Type:application/json "http://10.10.7.1/ap") 6) device automatically drops out of AP mode and tries to connect to WiFi and server.
@andrewerrington cool, will add this later tonight to the readme. Thanks for the details!
Thanks for the server software!
Description changed, please let me know if it is clear enough, then i will close this issue.
Looks good. I hope someone else tries it and that it works.
Hello,
I had great trouble setting things up to run on my Raspberry Pi. In particular, network-manager was not installed, so I installed it (to get nmcli) and it was tiresome to get it going, and I'm not even sure it was working properly. I couldn't get your setupdevice script to work, or rather, it ran, but it didn't seem to program the wifi settings into the Sonoff device.
Instead, I think this will work (it works for me), once you have put the Sonoff into AP mode and connected to it:
wget -O- --post-data='{"version":4,"ssid":"SSID","password":"PASSWORD","serverName":"n.n.n.n","port":1080}' --header=Content-Type:application/json "http://10.10.7.1/ap"
Your server itself doesn't seem to need network-manager, so I have it running, and my Sonoff is configured and connecting.
Thanks!