Rick Carlino
1f26485f88
Add `LOG_SILENCE` env for local dev, remove less helpful debug/warn logs (Elixir kind, not FarmBot kind)
2020-03-06 10:30:04 -06:00
Rick Carlino
0058d1b01e
Update coveralls.json, tests for View.render/1
2020-03-05 15:41:54 -06:00
Rick Carlino
9216cf1456
¯\_(ツ)_/¯
2020-03-05 14:57:06 -06:00
Rick Carlino
bee7a0aaf9
Merge branch 'nil-positions' of github.com:FarmBot/farmbot_os into criteria_groups
2020-03-03 07:40:29 -06:00
gabrielburnworth
28c2d66323
use nil instead of -1 for unknown positions
2020-03-02 07:50:25 -08:00
Rick Carlino
d4d7cc020b
** (Sqlite.DbConnection.Error) near "?2": syntax error
2020-02-24 18:54:54 -06:00
Rick Carlino
205fa6afd6
v9.1.2-rc4
2020-02-20 14:52:00 -06:00
Rick Carlino
f0b0ff10b0
Remove diag dumps
2020-02-04 14:11:17 -06:00
Rick Carlino
a0b5bff980
Disable failing test temporarily
2020-01-25 13:10:01 -06:00
Rick Carlino
b83be2fda2
Fix typo
2020-01-25 13:04:26 -06:00
Rick Carlino
08aeed1cf5
2 failure => 1.
2020-01-25 12:31:36 -06:00
Rick Carlino
c830099dd2
13 => 3 failures (:set_mimic_global)
2020-01-25 12:23:41 -06:00
Rick Carlino
7059f3c44c
FAILING: Verify mocks on exit.
2020-01-25 11:48:52 -06:00
Rick Carlino
844d521537
FAILING, minor formatting / config issues
2020-01-24 09:36:56 -06:00
Rick Carlino
2f7685c077
Update FarmbotCeleryScriptTest to use Mimic
2020-01-22 17:07:22 -06:00
Rick Carlino
feae00c8db
TODO: FIX NETWORK_LAYER CONFIG STUFF
2020-01-22 12:40:42 -06:00
Rick Carlino
7e5738f883
[UNSTABLE] 42.1% Partial removal of :mox, some tests failing though
2020-01-22 11:41:43 -06:00
Rick Carlino
99b5f3436b
👏 Add `mimic` package to test suite
2020-01-22 09:21:05 -06:00
Rick Carlino
596c3cc659
Typo
2020-01-21 13:08:52 -06:00
Rick Carlino
66bc2cc3b0
Stub out reconciler usage in SysCall module
2020-01-21 11:55:36 -06:00
Rick Carlino
0d54937946
Pattern matching problems?
2020-01-09 11:59:02 -06:00
connor rigby
b11faf93a4
Cleanup more syncing and firmware logs
2019-12-30 09:23:39 -08:00
connor rigby
2c27e00884
Disable some logs that come from asset syncing
2019-12-30 09:23:39 -08:00
Connor Rigby
d65a54223c
Fix Firmware flashing on boot on express boards
2019-12-26 10:37:23 -08:00
Connor Rigby
6cb47d43aa
Add docs for generating app specific docs
2019-12-18 13:01:20 -08:00
Connor Rigby
9ce8d10f9c
Update reconciler docs
2019-12-17 15:04:45 -08:00
Connor Rigby
2f7f8057d1
Update image_uploader docs
2019-12-17 15:04:45 -08:00
Connor Rigby
2603d087ce
Update amqp connection worker docs
2019-12-17 15:04:45 -08:00
Connor Rigby
847ec9d50b
Remove sensitive process flag
...
This doesn't really do anything since `lagger` ignores this
flag anyway
2019-12-17 15:04:45 -08:00
Connor Rigby
63fffcfc5d
Update docs for farmbot_ext otp app
2019-12-17 14:25:20 -08:00
Rick Carlino
b55d94b86f
Dep updates for farmbot_ext
2019-12-16 13:03:25 -08:00
connor rigby
c341e6cf82
Add name field back to image upload meta
2019-12-16 08:35:58 -08:00
Connor Rigby
9009ff6329
Update deps
...
* `tesla` 1.3.0
* `hackney` 1.15.2
* `tzdata` 1.0.2
* `amqp` ~> 1.3
* `circuits_gpio` 0.4.2
* `circuits_uart` 1.3.2
* `toolshed` 0.2.11
2019-10-31 14:00:08 -07:00
Connor Rigby
ec56ebaf74
Add telemetry to the rest of the app
...
More things will be added in the future.
Metrics are collected from bot state because
the amount of messages sent by every bot would
make datadog charge us a lot of money
2019-10-31 14:00:08 -07:00
Connor Rigby
131a5f5e8d
Add UUID to telemetry payload
2019-10-31 14:00:08 -07:00
Connor Rigby
bed5153a22
Change shape of telemetry event payload
2019-10-31 14:00:08 -07:00
Connor Rigby
f845ddf38a
Simplify API, store messages in DETS
2019-10-31 14:00:08 -07:00
Connor Rigby
1539f45014
Add new farmbot_telemetry application
2019-10-31 14:00:08 -07:00
Connor Rigby
d3e51996b0
Add new resource: PointGroup
2019-10-22 14:19:32 -07:00
connor rigby
c03e62bdfe
Add "really fast blink" for syncing led
2019-09-17 12:22:36 -07:00
connor rigby
ad65c7eec3
Attempt to quiet annoying amqp logs
2019-09-16 13:29:40 -07:00
Connor Rigby
21ca8969a6
Remove sensor_readings from auto sync
2019-09-13 16:03:34 -07:00
Connor Rigby
3398deba2d
Add error logs to celeryscript execution and schedule
2019-09-13 16:03:34 -07:00
Connor Rigby
a3e8b094ca
Fix CeleryScript channel reconnects **even more**
2019-09-13 16:03:33 -07:00
Connor Rigby
5776c0592d
Fix CeleryScript channel not reconnecting even more
2019-09-13 16:03:33 -07:00
Connor Rigby
40523670e1
Reconnect to CeleryScript channel in the case of error
...
This was left out when we refactored this channel to
use `mox`
2019-09-13 16:03:33 -07:00
Connor Rigby
cd9d45cddc
Add new task to drop the plaintext password from the sdcard
2019-09-13 16:03:33 -07:00
Connor Rigby
973b622aef
Update VintageNet and Muontrap
2019-09-13 16:03:32 -07:00
Connor Rigby
5373849f51
Update dependencies
...
* `elixir_make`
* `muontrap`
* `vintage_net`
* `busybox`
* `mdns_lite`
* `nerves_hub`
* `plug`
2019-09-13 16:03:32 -07:00
Connor Rigby
209ded96cb
Add Lua helpers for updating and getting resources
2019-09-13 16:03:32 -07:00
Connor Rigby
a242cce830
Add new log type for assertion logs
2019-09-13 16:03:32 -07:00
Connor Rigby
b173b70675
Fix PATCH HTTP requests for singular resources
2019-09-13 16:03:31 -07:00
Connor Rigby
61d63afb17
Fix typo AMPQ -> AMQP
2019-09-13 16:03:31 -07:00
Connor Rigby
86843c4553
Make FirstPartyFarmware syncable
2019-09-13 16:03:31 -07:00
connor rigby
21eef22c55
Fix DirtyWorker doing patch requests
2019-09-13 16:03:31 -07:00
Gabriel Burnworth
9a3fadcd80
fix image upload bug
2019-09-13 16:03:30 -07:00
connor rigby
82042f98df
Clean up error message for uploading images
2019-09-13 16:03:30 -07:00
connor rigby
5610f2e9e3
Fix typo in PingPong channel reconnect message
2019-09-13 16:03:30 -07:00
Connor Rigby
a6f365b4c0
Implement public_key worker
2019-09-13 16:03:30 -07:00
Connor Rigby
c35b81decb
Add new table public_keys
...
This will be to load new ssh keys onto a device to allow
remote console for debugging over a network
2019-09-13 16:03:30 -07:00
connor rigby
302ddd3bf0
Fix race condition in AMQP connecting to PingPong channel
2019-09-13 16:03:30 -07:00
connor rigby
3a5666429a
Allow Direct-Upload of images
2019-09-13 16:03:29 -07:00
connor rigby
7b19b73e6f
Revert "Allow direct-upload"
...
This reverts commit 462681d5da
.
2019-09-13 16:03:29 -07:00
Connor Rigby
01c3723877
Fix LEDs and Pinbindings working intermitently
...
The Internal pullups need to be disabled for the
FarmBot gpio hat to work properly
2019-09-13 16:03:29 -07:00
connor rigby
e199cb8a90
Add LED handler for green (sync status)
2019-09-13 16:03:29 -07:00
connor rigby
7fa252e9d7
Add LED handler for blue (connection status)
2019-09-13 16:03:29 -07:00
connor rigby
bb804fd510
Allow direct-upload
...
Tesla HTTP client is formatting the formdata wrong for some reason
so just shell out to hackney
2019-09-13 16:03:29 -07:00
connor rigby
830f6894d8
Add a background timer to do an HTTP for the consistency checker
2019-09-13 16:03:29 -07:00
connor rigby
373a0b2faf
Fix ImageUploader automatic upload
...
* Serialize DateTime as an iso string for bot_state filesystem
* Set user-agent for uploading images
* Check for more types of images other than jpeg
2019-09-13 16:03:27 -07:00
connor rigby
8b2ac2935e
Create images directory when starting image_uploader
2019-09-13 16:03:27 -07:00
gabrielburnworth
ab1b8bbda5
add farmware execution rpc debug logs
...
Fix AMQP and network disconnects causing limbo state
2019-09-13 16:03:27 -07:00
Connor Rigby
de78091f6d
Add device side log filter for bad words
...
This prevents the frontend from crashing on bad words
2019-09-13 16:03:26 -07:00
Connor Rigby
1900bdba57
Allow firmware to be open/flashed infinity times
...
* add `infinity` as an option for `fbos_config_worker` and
`firmware_open_task`
* reenable uevent montior flashing/opening firmware
2019-09-13 16:03:26 -07:00
Connor Rigby
5d54795d11
Fix updating a regimen remotely not updating locally
...
If a user updated a regimen (started or not by a FarmEvent) it would
take two changes to actually dispatch the change since Regimens
update their own `updated_at` without `put`ing it to the API
2019-09-13 16:03:26 -07:00
Connor Rigby
3d9be8d902
Silence repeating firmware open log
2019-09-13 16:03:26 -07:00
Connor Rigby
91ccd93ef0
Re-enable API client UserAgent header
2019-09-13 16:03:26 -07:00
connor rigby
767ef5279d
Silence PingPong channel connection log
2019-09-13 16:03:26 -07:00
connor rigby
712256a1a3
Implement task for opening the firmware
...
Adds a new flag for `firmware_needs_open` and a task that polls that
value with a bit of state to open the firmware tty
2019-09-13 16:03:25 -07:00
Connor Rigby
ce51edeb99
Revert Alert/Enigma system
...
* Revert 9cc461b512
* Revert 7309a19fe7
* Revert 7fd82d3a58
* Revert 890ddfbd86
* Revert 839ce3e470
* Revert 68cc8e6471
* Revert 3991a2c516
* Revert db8da31018
2019-09-13 16:03:25 -07:00
Connor Rigby
a160d6a41b
Fix factory_resetting the arduino-firmware
...
* Adds `api_migrated` field to FirmwareConfig
* Changes `factory_reset()` syscall to be `factory_reset(package)`
2019-09-13 16:03:25 -07:00
connor rigby
d2239d76c3
Try add log channels more aggressively
2019-09-13 16:03:24 -07:00
Connor Rigby
47d024e561
Stabilize AMQP connect and disconnects
...
* AMQP wasn't disconnected properly, which was causing bots to appear to
be offline because the connection was broken, but not closed.
2019-09-13 16:03:24 -07:00
Connor Rigby
60b075cf88
Normalize asset commans
...
Many clauses were not getting hit depending on if
`update/3` was called with a Module or a "String".
This normalizes everything early.
2019-09-13 16:03:23 -07:00
Connor Rigby
e7ea334ab2
Change Preloading and Caching to use the same system as auto_sync
...
* preloader and reconciler no longer use a transaction
* This will prevent rolling back a failed sync, but allows farmbot to
continue operating if a sync does fail
* usage of the preloader updated to reflect this
2019-09-13 16:03:23 -07:00
Connor Rigby
e6b29ea559
Refactor CeleryScript execution
...
* FarmEvents now schedule all events up front
* Executions are stored in the database
* Regimens now schedule all items up front
* Executions are stored in the database
* fix Deleting a FarmEvent with a running RegimenInstance
* `execute`int and `schedule`ing a CeleryScript are not separate things
* Everywhere `scheduling` and `executing` CeleryScript updated to use
the new API
2019-09-13 16:03:23 -07:00
Connor Rigby
890aac46db
Add asset commands for syncing SensorValues
...
* New Asset.Command for SensorValue
* new/update/delete for SensorValue
2019-09-13 16:03:22 -07:00
Rick Carlino
1730bf8c29
Configurable EXUNIT_TIMEOUT
2019-09-13 16:03:22 -07:00
Connor Rigby
d5215b6608
Handle unknown auto_sync messages
...
Adds a blacklist of known asset types that FarmBot can
handle and sync/cache. This is important for when new assets are added or
assets are dispatched for the frontend to consume.
2019-09-13 16:03:22 -07:00
Connor Rigby
eefdbfc883
Further refactor Preloader to allow for error recovery
...
Previous system would crash the calling processes with a `MatchError`
instead of returning an error. The end result after this commit is
still the same - the auto_sync channel will attempt a resync
every 5 seconds. The log messages/user experience should just
be better now.
2019-09-13 16:03:22 -07:00
Connor Rigby
11220c3697
Refactor Preloader test system
...
* Gets rid of the Preloader behaviour
* This prevents the Preloader mock from overriding the _actual_
implementation.
* Update auto_sync_channel_test to mock the API, not the Preloader
* remove old preloader_test as it didn't do anything
2019-09-13 16:03:22 -07:00
Connor Rigby
9a16c79ee8
Implement error handling for api 429 errors
...
* Changes auto_sync_channel to no longer use `handle_continue`
* If preloading fails, retry instead of crashing.
* Make `get_changeset` return an error rather than raising an exception
* Update every use of that function to handle posibility of error
2019-09-13 16:03:22 -07:00
Connor Rigby
7cda16f144
Fix argument order in auto_sync channel
2019-09-13 16:03:22 -07:00
Connor Rigby
2105fb8a70
Fix NervesHubChannel compile warning
2019-09-13 16:03:22 -07:00
Connor Rigby
b6120041ef
Rename bot_state_channel to reflect the previous commit
2019-09-13 16:03:22 -07:00
Connor Rigby
3ff7a78f68
Revert multiple state channels over amqp
2019-09-13 16:03:22 -07:00
Rick Carlino
b619cb3576
Add scafold tests for celery_script_channel
...
* Test case: `celery_script_channel` `start_link`
2019-09-13 16:03:22 -07:00
Connor Rigby
26578a7ae2
Update `mox` to be used correctly.
...
I previously misunderstood how the black magic of mox actually works.
This updates `farmbot_ext` to not require setting excess data in every
config.exs entry. Also removes calls to `Application.get_env/2`
2019-09-13 16:03:22 -07:00
Connor Rigby
2d66f09485
Enable `warnings_as_errors` for each app
2019-09-13 16:03:21 -07:00
Connor Rigby
1483a3881f
Cleanup farmbot_ext auto_sync_channel
...
Also add some documentation for stubable
modules Query and Command
2019-09-13 16:03:21 -07:00
Connor Rigby
686c9be7c9
Fix process naming colision
2019-09-13 16:03:21 -07:00