Local Farmbot Software

Those logs you posted indicate that the device is successfully connecting to the web app, so it looks like the FarmBot OS configuration is correct. When you log in to the bla@bla.com account, does the device still appear disconnected?

Unfortunately yes

Can you make sure this websocket test passes in the browser you are using?

Also, what does the Device widget say if you reboot the device, wait five minutes, then press the refresh button under LAST SEEN?

I made the test using Chrome as well as Firefox and both worked.

The device has never been seen. Most likely, there is a network connectivity issue on the deviceā€™s end.

This state has actually never changed on the local install since I first tried it but Iā€™ll try another factory reset and reboot to confirm if itā€™s the same afterwards.

Do you see any activity within 5-10 minutes after Started POST "/api/tokens" for . . . in the API logs?

Not if I donā€™t press anything in the WebApp.

FarmBot OS isnā€™t successfully completing its boot up process then. Do you have an FTDI cable to get logs from the device?

You can also run store.getState().auth.token.unencoded in the Chome console (Ctrl + Shift + J) and make sure the mqtt address is correct.

You should see something similar to:

bot: "device_20"
...
iss:"//192.168.1.100:3000"
...
mqtt:"192.168.1.100"
...
sub:"bla@bla.com"

I donā€™t (yet) have one, but I think there might be an old Nokia CA-42 cable lying around somewhere I can sacrifice :wink:
EDIT: only found a CA-53 which, unfortunately, doesnā€™t have the level converter built in anymoreā€¦ Iā€™ll order one.

bot: "device_20"
exp: 1509483557
fw_update_server: "https://api.github.com/repos/FarmBot/farmbot-arduino-firmware/releases/latest"
iat: 1506027557
iss: "//192.168.0.27:3000"
jti: "035005b6-6db6-428f-98c5-69745c8d1439"
mqtt: "192.168.0.27:1883"
os_update_server: "https://api.github.com/repos/farmbot/farmbot_os/releases/latest"
sub: "bla@bla.com"

192.168.0.27 is the correct IP, that is set on the server. Could the port setting (:1883) be an issue? I dont think it is though, cause in the WebApp it still shows up as connected to the mqtt gateway:
farmbot_webapp_no_conn

@grubFX The mqtt claim on that JWT is incorrect. Itā€™s supposed to be just the MQTT host. It should just be 192.168.0.27 rather than 192.168.0.27:1883.

EDIT: In case youā€™re wondering why we use a port for the iss claim but not for the mqtt claim, the reason is that the MQTT server exposes multiple ports based on the ā€œflavorā€ of MQTT. Eg: standard MQTT, secure MQTT, Websocket MQTT, etc.

1 Like

Thank you so much for solving this! I had unintentionally changed it in the application.yml while trying to ā€œfixā€ this on my own and totally forgot about it.

Works flawlessly now :+1:

1 Like