Skip to content

Commit ab64755

Browse files
authored
Merge pull request #1433 from FarmBot/staging
v14.6.1 Release (Draft)
2 parents 4a4df3b + 9325c93 commit ab64755

File tree

460 files changed

+15002
-3411
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

460 files changed

+15002
-3411
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
__pycache__
12
_nerves-tmp
23
!/nerves/host
34
!/nerves/target
@@ -11,12 +12,14 @@ _nerves-tmp
1112
*.db-journal
1213
*.db-shm
1314
*.db-wal
15+
*.db*
1416
*.ez
1517
*.img
1618
*.lua
1719
*.o
1820
*.pem
1921
*.priv
22+
*.pyc
2023
*.so
2124
*.sqlite3
2225
*.sqlite3*
@@ -43,6 +46,7 @@ _nerves-tmp
4346
artifacts
4447
auth_secret_test.exs
4548
auth_secret.exs
49+
capture_*
4650
erl_crash.dump
4751
farmbot_ext-*.tar
4852
farmbot_ng-*.tar

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
# 14.6.1
4+
5+
* Remove need to download farmwares over the network (improves offline experience)
6+
* Remove references to legacy components (FarmbotCore, FarmbotExt, etc..)
7+
* Add new Lua functions: `detect_weeds`, `garden_size`, `measure_soil_height`
8+
39
# 14.6.0
410

511
* Upgrade database driver.

CONTRIBUTING.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
# Contributing
22

3-
Please read through the [documentation](docs/index.md)
3+
**NOTE:** These instructions are for **software developers only.** If you just want to run FarmBot OS on a FarmBot kit you have purchased, please [see these instructions instead](https://software.farm.bot/v14/FarmBot-OS/farmbot-os.html).
4+
5+
1. Install the [ASDF Package Manager](https://asdf-vm.com/)
6+
2. Install Elixir and Erlang via ASDF. The correct version can be found in the [.tool-versions file](https://github.com/FarmBot/farmbot_os/blob/staging/.tool-versions).
7+
3. [Install Nerves](https://hexdocs.pm/nerves/installation.html#content)
8+
4. Clone this repo and run `./run-all.sh`. If the script runs to completion, you have successfully installed FBOS onto your target
9+
5. Run the application via `iex -S mix`.

README.md

Lines changed: 4 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -15,37 +15,9 @@ Old versions of FarmBot OS can be found [here](https://github.com/FarmBot/farmbo
1515

1616
---
1717

18-
## Installation
19-
Installation should be fairly straight forward, you will need a computer for this step.
20-
(everything after this can be set up on a mobile device.)
18+
## Installing FBOS on a Device
2119

22-
### Windows users
23-
24-
1. download and install [Etcher](https://www.balena.io/etcher/).
25-
0. download the [latest release](#floppy_disk-latest-os-image-downloads).
26-
0. insert an SD Card into your PC.
27-
0. open Etcher, and select the `.img` file you just downloaded.
28-
0. select your SD Card.
29-
0. Burn.
30-
31-
### Linux/OSX
32-
33-
1. download the [latest release file, available for download here](#floppy_disk-latest-os-image-downloads).
34-
0. ```dd if=</path/to/file> of=/dev/<sddevice> bs=4``` or use [Etcher](https://etcher.io/).
35-
36-
---
37-
38-
## Running
39-
_Refer to the [software documentation Configurator page](https://software.farm.bot/docs/configurator) for more detailed instructions._
40-
41-
1. Plug your SD Card into your Raspberry Pi
42-
0. Plug your Arduino into your Raspberry Pi
43-
0. Plug your power into your Raspberry Pi
44-
0. From a WiFi enabled device*, search for the SSID `farmbot-XXXX`
45-
0. Connect to that and open a web browser to [http://192.168.24.1/](http://192.168.24.1)
46-
0. Follow the on screen instructions to configure your FarmBot. Once you save your configuration FarmBot will connect to your home WiFi network and to the FarmBot web application.
47-
48-
\* If you are using a smartphone you may need to disable cellular data to allow your phone's browser to connect to the configurator.
20+
[END USERS: See the official documentation](https://software.farm.bot/v14/FarmBot-OS/farmbot-os.html)
4921

5022
## Problems?
5123

@@ -58,5 +30,5 @@ We take security seriously and value the input of independent researchers. Pleas
5830

5931
## Want to Help?
6032

61-
[Low Hanging Fruit](https://github.com/FarmBot/farmbot_os/search?utf8=%E2%9C%93&q=TODO)
62-
[Development](CONTRIBUTING.md)
33+
* [Low Hanging Fruit](https://github.com/FarmBot/farmbot_os/search?utf8=%E2%9C%93&q=TODO)
34+
* [Development](CONTRIBUTING.md)

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
14.6.0
1+
14.6.1

config/config.exs

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,31 @@ use Mix.Config
22
is_test? = Mix.env() == :test
33
rollbar_token = System.get_env("ROLLBAR_TOKEN")
44

5-
config :exqlite, :json_library, FarmbotCore.JSON
6-
config :farmbot, ecto_repos: [FarmbotCore.Asset.Repo]
5+
config :exqlite, :json_library, FarmbotOS.JSON
6+
config :farmbot, ecto_repos: [FarmbotOS.Asset.Repo]
77
config :logger, backends: [:console]
88
config :nerves, :firmware, rootfs_overlay: "rootfs_overlay"
99
config :tesla, adapter: Tesla.Adapter.Hackney
1010

1111
%{
12-
Elixir.FarmbotCore.AssetWorker.FarmbotCore.Asset.PublicKey => [
13-
ssh_handler: FarmbotCore.PublicKeyHandler.StubSSHHandler
12+
Elixir.FarmbotOS.AssetWorker.FarmbotOS.Asset.PublicKey => [
13+
ssh_handler: FarmbotOS.PublicKeyHandler.StubSSHHandler
1414
],
15-
FarmbotCore.Asset.Repo => [
15+
FarmbotOS.Asset.Repo => [
1616
database: "database.#{Mix.env()}.db",
1717
log: false
1818
],
19-
FarmbotCore.AssetWorker.FarmbotCore.Asset.PinBinding => [
20-
gpio_handler: FarmbotCore.PinBindingWorker.StubGPIOHandler
19+
FarmbotOS.AssetWorker.FarmbotOS.Asset.PinBinding => [
20+
gpio_handler: FarmbotOS.PinBindingWorker.StubGPIOHandler
2121
],
22-
FarmbotCore.BotState.FileSystem => [root_dir: "/tmp/farmbot_state"],
23-
FarmbotCore.Celery.SysCallGlue => [sys_calls: FarmbotOS.SysCalls],
24-
FarmbotCore.Core.CeleryScript.RunTimeWrapper => [
25-
celery_script_io_layer: FarmbotCore.Core.CeleryScript.StubIOLayer
22+
FarmbotOS.BotState.FileSystem => [root_dir: "/tmp/farmbot_state"],
23+
FarmbotOS.Celery.SysCallGlue => [sys_calls: FarmbotOS.SysCalls],
24+
FarmbotOS.Core.CeleryScript.RunTimeWrapper => [
25+
celery_script_io_layer: FarmbotOS.Core.CeleryScript.StubIOLayer
2626
],
27-
FarmbotCore.JSON => [json_parser: FarmbotCore.JSON.JasonParser],
28-
FarmbotCore.Leds => [gpio_handler: FarmbotCore.Leds.StubHandler],
29-
FarmbotExt.API.Preloader => [preloader_impl: FarmbotExt.API.Preloader.HTTP],
30-
FarmbotExt.Time => [disable_timeouts: is_test?],
27+
FarmbotOS.JSON => [json_parser: FarmbotOS.JSON.JasonParser],
28+
FarmbotOS.Leds => [gpio_handler: FarmbotOS.Leds.StubHandler],
29+
FarmbotOS.Time => [disable_timeouts: is_test?],
3130
FarmbotOS.Configurator => [
3231
network_layer: FarmbotOS.Configurator.FakeNetworkLayer
3332
],

config/target.exs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,16 @@ config :vintage_net,
3939
config: [{"wlan0", %{type: VintageNet.Technology.Null}}]
4040

4141
%{
42-
FarmbotCore.Asset.Repo => [
42+
FarmbotOS.Asset.Repo => [
4343
database: "/root/database.#{Mix.env()}.db"
4444
],
45-
FarmbotCore.AssetWorker.FarmbotCore.Asset.PinBinding => [
45+
FarmbotOS.AssetWorker.FarmbotOS.Asset.PinBinding => [
4646
gpio_handler: FarmbotOS.Platform.Target.PinBindingWorker.CircuitsGPIOHandler
4747
],
48-
FarmbotCore.AssetWorker.FarmbotCore.Asset.PublicKey => [
48+
FarmbotOS.AssetWorker.FarmbotOS.Asset.PublicKey => [
4949
ssh_handler: FarmbotOS.Platform.Target.SSHConsole
5050
],
51-
FarmbotCore.Leds => [
51+
FarmbotOS.Leds => [
5252
gpio_handler: FarmbotOS.Platform.Target.Leds.CircuitsHandler
5353
],
5454
FarmbotOS.Configurator => [

config/test.exs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ File.mkdir_p(data_path)
66
config :ex_unit, capture_logs: true
77
config :farmbot, data_path: data_path
88

9-
config :farmbot, FarmbotCore.Celery.SysCallGlue,
10-
sys_calls: FarmbotCore.Celery.SysCallGlue.Stubs
9+
config :farmbot, FarmbotOS.Celery.SysCallGlue,
10+
sys_calls: FarmbotOS.Celery.SysCallGlue.Stubs
1111

1212
config :farmbot, FarmbotOS.Configurator,
1313
data_layer: FarmbotOS.Configurator.ConfigDataLayer,
@@ -17,13 +17,13 @@ config :farmbot, platform_children: [{FarmbotOS.Platform.Host.Configurator, []}]
1717
config :plug, :validate_header_keys_during_test, true
1818

1919
[
20-
FarmbotCore,
21-
FarmbotCore.Config.Supervisor,
22-
FarmbotExt,
23-
FarmbotExt.Bootstrap.Supervisor,
24-
FarmbotExt.DirtyWorker.Supervisor,
25-
FarmbotExt.EagerLoader.Supervisor,
26-
FarmbotExt.MQTT.ChannelSupervisor,
27-
FarmbotExt.MQTT.Supervisor
20+
FarmbotOS,
21+
FarmbotOS.Config.Supervisor,
22+
FarmbotOS,
23+
FarmbotOS.Bootstrap.Supervisor,
24+
FarmbotOS.DirtyWorker.Supervisor,
25+
FarmbotOS.EagerLoader.Supervisor,
26+
FarmbotOS.MQTT.ChannelSupervisor,
27+
FarmbotOS.MQTT.Supervisor
2828
]
2929
|> Enum.map(fn mod -> config :farmbot, mod, children: [] end)

fixtures/corpus.json

Lines changed: 1 addition & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -119,23 +119,19 @@
119119
"find_home",
120120
"flash_firmware",
121121
"home",
122-
"install_farmware",
123-
"install_first_party_farmware",
124122
"move",
125123
"move_absolute",
126124
"move_relative",
127125
"power_off",
128126
"read_pin",
129127
"read_status",
130128
"reboot",
131-
"remove_farmware",
132129
"send_message",
133130
"set_servo_angle",
134131
"set_user_env",
135132
"sync",
136133
"take_photo",
137134
"toggle_pin",
138-
"update_farmware",
139135
"update_resource",
140136
"wait",
141137
"write_pin",
@@ -322,8 +318,6 @@
322318
"FlashFirmware",
323319
"Home",
324320
"Identifier",
325-
"InstallFarmware",
326-
"InstallFirstPartyFarmware",
327321
"InternalEntryPoint",
328322
"InternalFarmEvent",
329323
"InternalRegimen",
@@ -336,7 +330,6 @@
336330
"PowerOff",
337331
"ReadStatus",
338332
"Reboot",
339-
"RemoveFarmware",
340333
"RpcError",
341334
"RpcOk",
342335
"RpcRequest",
@@ -349,7 +342,6 @@
349342
"TakePhoto",
350343
"TogglePin",
351344
"Tool",
352-
"UpdateFarmware",
353345
"VariableDeclaration",
354346
"Wait",
355347
"Zero",
@@ -1121,30 +1113,6 @@
11211113
],
11221114
"docs": ""
11231115
},
1124-
{
1125-
"allowed_args": [
1126-
"url"
1127-
],
1128-
"allowed_body_types": [],
1129-
"name": "install_farmware",
1130-
"tags": [
1131-
"function",
1132-
"network_user",
1133-
"disk_user",
1134-
"api_writer"
1135-
],
1136-
"docs": ""
1137-
},
1138-
{
1139-
"allowed_args": [],
1140-
"allowed_body_types": [],
1141-
"name": "install_first_party_farmware",
1142-
"tags": [
1143-
"function",
1144-
"network_user"
1145-
],
1146-
"docs": ""
1147-
},
11481116
{
11491117
"allowed_args": [],
11501118
"allowed_body_types": [],
@@ -1282,17 +1250,6 @@
12821250
],
12831251
"docs": ""
12841252
},
1285-
{
1286-
"allowed_args": [
1287-
"package"
1288-
],
1289-
"allowed_body_types": [],
1290-
"name": "remove_farmware",
1291-
"tags": [
1292-
"function"
1293-
],
1294-
"docs": ""
1295-
},
12961253
{
12971254
"allowed_args": [
12981255
"label"
@@ -1335,8 +1292,6 @@
13351292
"find_home",
13361293
"flash_firmware",
13371294
"home",
1338-
"install_farmware",
1339-
"install_first_party_farmware",
13401295
"_if",
13411296
"move_absolute",
13421297
"move_relative",
@@ -1345,15 +1300,13 @@
13451300
"read_pin",
13461301
"read_status",
13471302
"reboot",
1348-
"remove_farmware",
13491303
"update_resource",
13501304
"send_message",
13511305
"set_servo_angle",
13521306
"set_user_env",
13531307
"sync",
13541308
"take_photo",
13551309
"toggle_pin",
1356-
"update_farmware",
13571310
"wait",
13581311
"write_pin",
13591312
"zero"
@@ -1408,8 +1361,6 @@
14081361
"find_home",
14091362
"flash_firmware",
14101363
"home",
1411-
"install_farmware",
1412-
"install_first_party_farmware",
14131364
"_if",
14141365
"move_absolute",
14151366
"move_relative",
@@ -1418,15 +1369,13 @@
14181369
"read_pin",
14191370
"read_status",
14201371
"reboot",
1421-
"remove_farmware",
14221372
"update_resource",
14231373
"send_message",
14241374
"set_servo_angle",
14251375
"set_user_env",
14261376
"sync",
14271377
"take_photo",
14281378
"toggle_pin",
1429-
"update_farmware",
14301379
"wait",
14311380
"write_pin",
14321381
"zero"
@@ -1508,19 +1457,6 @@
15081457
],
15091458
"docs": ""
15101459
},
1511-
{
1512-
"allowed_args": [
1513-
"package"
1514-
],
1515-
"allowed_body_types": [],
1516-
"name": "update_farmware",
1517-
"tags": [
1518-
"function",
1519-
"network_user",
1520-
"api_validated"
1521-
],
1522-
"docs": ""
1523-
},
15241460
{
15251461
"allowed_args": [
15261462
"label",
@@ -1777,4 +1713,4 @@
17771713
"docs": ""
17781714
}
17791715
]
1780-
}
1716+
}

fixtures/farmware/test-farmware/manifest.json

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)