Skip to content

Commit

Permalink
Merge branch 'master' into pre-release
Browse files Browse the repository at this point in the history
  • Loading branch information
kennethjiang committed Jun 23, 2024
2 parents 9612972 + d428319 commit 7968c6a
Show file tree
Hide file tree
Showing 12 changed files with 283 additions and 19 deletions.
55 changes: 55 additions & 0 deletions backend/app/management/commands/site.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
from django.core.management.base import BaseCommand
from django.db import transaction
from app.models.syndicate_models import Syndicate
from django.contrib.sites.models import Site

class Command(BaseCommand):
help = 'Utilities for advanced django site management.'

def add_arguments(self, parser):
parser.add_argument(
'--add',
type=str,
metavar='{ip:port or fqdn:port}',
help='Add a site. The argument is the Django site domain, such as "example.com:3334". Note: NO http:// or https:// otherwise it will NOT work.',
)
parser.add_argument(
'--fix',
action='store_true',
help='Fix a site if the server returns a 500. This is necessary for upgrading servers created before June 5th, 2024.',
)

def handle(self, *args, **options):
syndicate, _ = Syndicate.objects.get_or_create(name="base")

if options['add']:
self.add_site(syndicate, options['add'])
elif options['fix']:
self.fix_site(syndicate)
else:
self.print_help("", "site")

def add_site(self, syndicate, site_domain):
with transaction.atomic():

# If a site domain is provided, add the site
if site_domain:
site, created = Site.objects.get_or_create(domain=site_domain, defaults={'name': site_domain})
if created:
self.stdout.write(self.style.SUCCESS(f'Site "{site_domain}" created.'))
else:
self.stdout.write(self.style.SUCCESS(f'Site "{site_domain}" already exists.'))

# Link the site to the syndicate if not already linked
if not site.syndicates.filter(id=syndicate.id).exists():
site.syndicates.add(syndicate)

def fix_site(self, syndicate):
with transaction.atomic():
# Link all sites without a syndicate to the syndicate
sites_without_syndicate = Site.objects.filter(syndicates__isnull=True)

for site in sites_without_syndicate:
site.syndicates.add(syndicate)

self.stdout.write(self.style.SUCCESS('Sites fixed successfully.'))
11 changes: 7 additions & 4 deletions frontend/src/components/printers/PrinterCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -366,10 +366,13 @@ export default {
this.$emit('PrinterUpdated', this.updatedPrinter(data))
if (!this.webrtc && (data?.settings?.webcams || []).length > 0) {
this.webcam = data.settings?.webcams?.find(webcam => webcam.is_primary_camera === true);
this.webrtc = WebRTCConnection(this.webcam.stream_mode, this.webcam.stream_id)
this.webrtc.openForPrinter(this.printer.id, this.printer.auth_token)
// this.printerComm.setWebRTC(this.webrtc) TODO: think about how to handle data channel
const webcams = data.settings?.webcams
this.webcam = webcams?.find(webcam => webcam.is_primary_camera === true);
if (this.webcam) {
this.webrtc = WebRTCConnection(this.webcam.stream_mode, this.webcam.stream_id)
this.webrtc.openForPrinter(this.printer.id, this.printer.auth_token)
this.printerComm.setWebRTC(this.webrtc)
}
}
},
onStatusReceived: (printerStatus) => {
Expand Down
16 changes: 10 additions & 6 deletions frontend/src/i18n/locales/ent_en.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
"I understand I will {localizedDom} when my subscription expires.": "I understand I will {localizedDom} when my subscription expires.",
"lose the unused expirable AI Detection Hours": "lose the unused expirable AI Detection Hours",
"One last thing. Please tell us why you want to cancel your subscription": "One last thing. Please tell us why you want to cancel your subscription",
"Other": "",
"Other": "Other",
"I changed my mind. I'll keep my subscription": "I changed my mind. I'll keep my subscription",
"I still want to cancel my subscription": "I still want to cancel my subscription",
"Failed to delete account": "Failed to delete account",
Expand Down Expand Up @@ -246,19 +246,23 @@
"What happens when the three-month Pro Plan expires?": "What happens when the three-month Pro Plan expires?",
"When your three-month plan expires, you will have the change to upgrade to one of Obico’s Pro Plans at a special discounted rate. Learn more about the plan options": "When your three-month plan expires, you will have the change to upgrade to one of Obico’s Pro Plans at a special discounted rate. Learn more about the plan options",
"If you choose not to upgrade, your plan will be automatically reverted to an Obico Free Plan.": "If you choose not to upgrade, your plan will be automatically reverted to an Obico Free Plan.",
"Invalid coupon code. Please make sure the coupon code has not been used, and has not expired. If you believe you have a valid coupon code, please ": "Invalid coupon code. Please make sure the coupon code has not been used, and has not expired. If you believe you have a valid coupon code, please ",
"As a valued Mintion customer, once your included plan expires, you can upgrade to a more advanced plan at a special discounted price. This offer is exclusively available for Mintion customers to ensure you continue to enjoy the benefits of Obico without interruption.": "As a valued Mintion customer, once your included plan expires, you can upgrade to a more advanced plan at a special discounted price. This offer is exclusively available for Mintion customers to ensure you continue to enjoy the benefits of Obico without interruption.",
"Activate Your One Year Obico Pro Plan": "Activate Your One Year Obico Pro Plan",
"As a valued Mintion customer, you are eligible for an exclusive life-time Pro Plan discount. When you redeem your plan, you’ll be asked to enter your credit card so we can give you the exclusive 20% discount when your plan renews.": "As a valued Mintion customer, you are eligible for an exclusive life-time Pro Plan discount. When you redeem your plan, you’ll be asked to enter your credit card so we can give you the exclusive 20% discount when your plan renews.",
"If you don’t want your plan to renew, you can cancel the plan so that it will not renew at any time. ": "If you don’t want your plan to renew, you can cancel the plan so that it will not renew at any time. ",
"When your three-month plan expires, you will have the chance to upgrade to one of Obico’s Pro Plans at a special discounted rate. Learn more about the plan options": "When your three-month plan expires, you will have the chance to upgrade to one of Obico’s Pro Plans at a special discounted rate. Learn more about the plan options",
"Invalid coupon code. Please make sure the coupon code has not been used, and has not expired. If you believe you have a valid coupon code, please ": "Invalid coupon code. Please make sure the coupon code has not been used, and has not expired. If you believe you have a valid coupon code, please ",
"I already paid for the Pro Plan. Why do I need to enter my credit card information again?": "I already paid for the Pro Plan. Why do I need to enter my credit card information again?",
"Your plan is fully covered for the first one year. After the first one year, the plan will renew with a special discount available exclusively for Mintion customers. You are free to cancel the plan at any time in the “Subscription” section of the Obico mobile or web app.": "Your plan is fully covered for the first one year. After the first one year, the plan will renew with a special discount available exclusively for Mintion customers. You are free to cancel the plan at any time in the “Subscription” section of the Obico mobile or web app.",
"Still have questions?": "Still have questions?",
"Contact": "Contact",
"{brandName} support.": "{{brandName}} support.",
"Oops! You already have an {brandName} Pro Plan...": "Oops! You already have an {{brandName}} Pro Plan...",
"Contact {brandName} support at": "Contact {{brandName}} support at",
"Activate Your {brandName} Pro Plan": "Activate Your {{brandName}} Pro Plan",
"As a valued Sovol customer, you are eligible for an exclusive Pro Plan discount. When you redeem your plan, you’ll be asked to enter your credit card so we can give you the exclusive 20% discount when your plan renews.": "As a valued Sovol customer, you are eligible for an exclusive Pro Plan discount. When you redeem your plan, you’ll be asked to enter your credit card so we can give you the exclusive 20% discount when your plan renews.",
"If you don’t want your plan to renew, you can cancel the plan so that it will not renew at any time.": "If you don’t want your plan to renew, you can cancel the plan so that it will not renew at any time.",
"I already paid for the Pro Plan. Why do I need to enter my credit card information again?": "I already paid for the Pro Plan. Why do I need to enter my credit card information again?",
"Your plan is fully covered for the first year. After the first year, the plan will renew with a special discount available exclusively for Sovol customers. You are free to cancel the plan at any time in the “Subscription” section of the {brandname} mobile or web app.": "Your plan is fully covered for the first year. After the first year, the plan will renew with a special discount available exclusively for Sovol customers. You are free to cancel the plan at any time in the “Subscription” section of the {{brandname}} mobile or web app.",
"Still have questions?": "Still have questions?",
"Contact": "Contact",
"{brandName} support.": "{{brandName}} support.",
" for ${month} / month (${hour} / AI Detection Hour). Billed ${year} annually.": " for ${{month}} / month (${{hour}} / AI Detection Hour). Billed ${{year}} annually.",
" for ${month} / month (${hour} / AI Detection Hour).": " for ${{month}} / month (${{hour}} / AI Detection Hour).",
"Calculate Plan Cost": "Calculate Plan Cost",
Expand Down
16 changes: 10 additions & 6 deletions frontend/src/i18n/locales/ent_zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
"I understand I will {localizedDom} when my subscription expires.": "我明白当我的订阅到期时我将{localizedDom}。",
"lose the unused expirable AI Detection Hours": "失去未使用的可到期的AI检测小时",
"One last thing. Please tell us why you want to cancel your subscription": "最后一件事。请告诉我们您为什么要取消您的订阅",
"Other": "",
"Other": "其他",
"I changed my mind. I'll keep my subscription": "我改变主意了。我会保留我的订阅",
"I still want to cancel my subscription": "我仍然想要取消我的订阅",
"Failed to delete account": "删除账户失败",
Expand Down Expand Up @@ -246,19 +246,23 @@
"What happens when the three-month Pro Plan expires?": "三个月的专业计划到期后会发生什么?",
"When your three-month plan expires, you will have the change to upgrade to one of Obico’s Pro Plans at a special discounted rate. Learn more about the plan options": "当您的三个月计划到期时,您将可以以特别折扣价升级到 Obico 的 Pro 计划之一。 了解有关计划选项的更多信息",
"If you choose not to upgrade, your plan will be automatically reverted to an Obico Free Plan.": "如果您选择不升级,您的计划将自动恢复为 Obico 免费计划。",
"Invalid coupon code. Please make sure the coupon code has not been used, and has not expired. If you believe you have a valid coupon code, please ": "优惠券代码无效。请确保优惠券代码未使用且未过期。如果您认为优惠券代码有效,请",
"As a valued Mintion customer, once your included plan expires, you can upgrade to a more advanced plan at a special discounted price. This offer is exclusively available for Mintion customers to ensure you continue to enjoy the benefits of Obico without interruption.": "作为尊贵的 Mintion 客户,一旦您的套餐到期,您可以以特别折扣价升级到更高级的套餐。此优惠仅面向 Mintion 客户,以确保您继续享受 Obico 的优惠,不会中断。",
"Activate Your One Year Obico Pro Plan": "激活您的一年 Obico Pro 计划",
"As a valued Mintion customer, you are eligible for an exclusive life-time Pro Plan discount. When you redeem your plan, you’ll be asked to enter your credit card so we can give you the exclusive 20% discount when your plan renews.": "作为 Mintion 的尊贵客户,您有资格享受专属终身 Pro Plan 折扣。当您兑换计划时,系统会要求您输入信用卡信息,以便我们在您的计划续订时为您提供 20% 的独家折扣。",
"If you don’t want your plan to renew, you can cancel the plan so that it will not renew at any time. ": "如果您不希望您的计划续订,您可以取消该计划,这样它就不会随时续订。",
"When your three-month plan expires, you will have the chance to upgrade to one of Obico’s Pro Plans at a special discounted rate. Learn more about the plan options": "当您的三个月计划到期时,您将有机会以特别折扣价升级到 Obico 的专业计划之一。了解有关计划选项的更多信息",
"Invalid coupon code. Please make sure the coupon code has not been used, and has not expired. If you believe you have a valid coupon code, please ": "优惠券代码无效。请确保优惠券代码未使用且未过期。如果您认为优惠券代码有效,请",
"I already paid for the Pro Plan. Why do I need to enter my credit card information again?": "我已经支付了专业计划的费用。 为什么我需要再次输入我的信用卡信息?",
"Your plan is fully covered for the first one year. After the first one year, the plan will renew with a special discount available exclusively for Mintion customers. You are free to cancel the plan at any time in the “Subscription” section of the Obico mobile or web app.": "您的计划在第一年内完全受保。第一年之后,该计划将续订,并享受 Mintion 客户专享的特殊折扣。您可以随时在 Obico 移动或网络应用程序的“订阅”部分取消该计划。",
"Still have questions?": "还有疑问吗?",
"Contact": "接触",
"{brandName} support.": "{{brandName}} 支持。",
"Oops! You already have an {brandName} Pro Plan...": "哎呀! 您已经有一个 {{brandName}} 专业计划...",
"Contact {brandName} support at": "请联系 {{brandName}} 支持人员:",
"Activate Your {brandName} Pro Plan": "激活您的 {{brandName}} 专业计划",
"As a valued Sovol customer, you are eligible for an exclusive Pro Plan discount. When you redeem your plan, you’ll be asked to enter your credit card so we can give you the exclusive 20% discount when your plan renews.": "作为 Sovol 的尊贵客户,您有资格享受专属 Pro 计划折扣。 当您兑换计划时,系统会要求您输入信用卡信息,以便我们在您的计划续订时为您提供 20% 的独家折扣。",
"If you don’t want your plan to renew, you can cancel the plan so that it will not renew at any time.": "如果您不希望您的计划续订,您可以取消该计划,这样它就不会随时续订。",
"I already paid for the Pro Plan. Why do I need to enter my credit card information again?": "我已经支付了专业计划的费用。 为什么我需要再次输入我的信用卡信息?",
"Your plan is fully covered for the first year. After the first year, the plan will renew with a special discount available exclusively for Sovol customers. You are free to cancel the plan at any time in the “Subscription” section of the {brandname} mobile or web app.": "您的计划在第一年得到全额承保。 第一年后,该计划将续订并提供专为 Sovol 客户提供的特别折扣。 您可以随时在 {{brandname}} 移动或网络应用程序的“订阅”部分取消该计划。",
"Still have questions?": "还有疑问吗?",
"Contact": "接触",
"{brandName} support.": "{{brandName}} 支持。",
" for ${month} / month (${hour} / AI Detection Hour). Billed ${year} annually.": " 每月${{month}}(每个AI检测小时${{hour}})。每年账单${{year}}。",
" for ${month} / month (${hour} / AI Detection Hour).": " 每月${{month}}(每个AI检测小时${{hour}})。",
"Calculate Plan Cost": "计算计划成本",
Expand Down
2 changes: 1 addition & 1 deletion website/docs/user-guides/check-webcam-streaming-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The status can be one of the following:

* "**premium**" - Premium Streaming.
* "**Basic**" - Basic Streaming.
* "**0.1FPS**" - [Video streaming failed to start](http://localhost:3000/docs/user-guides/webcam-stream-stuck-at-1-10-fps/). The Obico plugin is now "streaming" by taking snapshots at 0.1FPS.
* "**0.1FPS**" - [Video streaming failed to start](/docs/user-guides/webcam-stream-stuck-at-1-10-fps/). The Obico plugin is now "streaming" by taking snapshots at 0.1FPS.

:::info
Learn more about [Premium Streaming vs Basic Streaming](/docs/user-guides/webcam-streaming-for-human-eyes).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';



## Required Hardware:
A nozzle camera that provides an up-close view of your 3D printers’ nozzle.

Expand All @@ -27,6 +28,16 @@ A nozzle camera is a specialized web camera. Nozzle cameras are much smaller tha

Obico’s first layer AI is compatible with any 3D printer running OctoPrint or Klipper, but there may not be a nozzle camera mount readily available for your 3D printer. Check with our nozzle camera partners, Mintion and 3DO to see if there is a mount for your printer. Of course, you can also check out various 3D model repositories such as Printables or Thingiverse, or you can design your own mount.



:::tip
Prefer watching a video instead? The video below walks through the process of configuring a standard USB webcam with a nozzle camera. It also goes through the process of adding multiple webcams to OctoPrint in case you haven't done that already (cameras must be configured in Mainsail/fluidd before adding them to Obico).
:::

<div className="videoWrapper">
<iframe width="560" height="315" src="https://www.youtube.com/embed/BFV9HgJkRJI?si=wRyuRxZ2ypMZOVVD" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div>

## Configure Your Camera for First Layer AI

Obico now supports multiple webcam streams in the Obico app. You can configure your nozzle camera as a second camera in Obico, or you can just use the nozzle camera as your only camera.
Expand Down
Loading

0 comments on commit 7968c6a

Please sign in to comment.