10 Commits

Author SHA1 Message Date
TJ Horner
9bcd331a3d Version 1.1.0 2023-05-23 07:35:09 -07:00
TJ Horner
88f5110e62 Merge branch 'project-version-component' 2023-05-23 07:32:28 -07:00
TJ Horner
4a1289de03 tindie tools update 2023-05-23 07:30:22 -07:00
TJ Horner
6626be4545 Project version component test 2023-05-22 12:31:25 -07:00
TJ Horner
bd416f2ea7 Version 1.0.4 2023-05-22 11:08:28 -07:00
TJ Horner
54384fe695 Firmware and readme changes 2023-05-22 10:14:05 -07:00
TJ Horner
51650653bf Version 1.0.3 2023-05-20 22:20:09 -07:00
TJ Horner
b4aaef1dd2 Various PCB and tools changes, unrelated to firmware 2023-05-20 21:41:09 -07:00
TJ Horner
193cfe88a1 Add height units config back with fixes 2023-05-20 21:38:14 -07:00
TJ Horner
78d6c58d78 Re-add height units config with new method 2023-05-20 21:16:46 -07:00
14 changed files with 3215 additions and 2098 deletions

View File

@@ -46,10 +46,7 @@ Or whatever else you'd like. The possibilities are endless! As long as the possi
## Compatibility
Any standing desk that uses RJ45 to connect to the keypad is likely compatible, but these brands of desks have been verified to work, with official firmware provided:
- UPLIFT v2
- Fully Jarvis
Any standing desk that uses RJ45 to connect to the keypad is likely compatible, but the control boxes listed [here](https://upsy-desky.tjhorner.dev/docs/reference/compatibility/) are verified to be compatible.
## Documentation

View File

@@ -1,20 +1,20 @@
# Temporarily removed due to a compatibility issue with ESPHome 2023.5
# select:
# - platform: template
# name: "Height Units"
# entity_category: "config"
# optimistic: true
# restore_value: true
# options:
# - in
# - cm
# initial_option: ${default_height_units}
# on_value:
# then:
# lambda: |
# const char *unit = x.c_str();
# id(desk_height)->set_unit_of_measurement(unit);
# id(target_desk_height)->traits.set_unit_of_measurement(unit);
select:
- platform: template
id: height_units_config
name: "Height Units"
entity_category: "config"
optimistic: true
restore_value: true
options:
- in
- cm
initial_option: ${default_height_units}
on_value:
then:
lambda: |
const char *unit = id(height_units_config)->state.c_str();
id(desk_height)->set_unit_of_measurement(unit);
id(target_desk_height)->traits.set_unit_of_measurement(unit);
button:
- platform: template

View File

@@ -12,7 +12,7 @@ esphome:
data: [ 0x0 ]
project:
name: tj_horner.upsy_desky
version: "1.0.2"
version: "1.1.0"
uart:
id: handset_tx

1
firmware/components/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
**/__pycache__

View File

@@ -0,0 +1,19 @@
#include "project_version_text_sensor.h"
#include "esphome/core/log.h"
#include "esphome/core/application.h"
#include "esphome/core/version.h"
namespace esphome {
namespace project_version {
static const char *const TAG = "project_version.text_sensor";
void ProjectVersionTextSensor::setup() {
this->publish_state(ESPHOME_PROJECT_VERSION);
}
float ProjectVersionTextSensor::get_setup_priority() const { return setup_priority::DATA; }
std::string ProjectVersionTextSensor::unique_id() { return get_mac_address() + "-project-version"; }
void ProjectVersionTextSensor::dump_config() { LOG_TEXT_SENSOR("", "Project Version Text Sensor", this); }
} // namespace version
} // namespace esphome

View File

@@ -0,0 +1,18 @@
#pragma once
#include "esphome/core/component.h"
#include "esphome/components/text_sensor/text_sensor.h"
namespace esphome {
namespace project_version {
class ProjectVersionTextSensor : public text_sensor::TextSensor, public Component {
public:
void setup() override;
void dump_config() override;
float get_setup_priority() const override;
std::string unique_id() override;
};
} // namespace version
} // namespace esphome

View File

@@ -0,0 +1,31 @@
import esphome.codegen as cg
import esphome.config_validation as cv
from esphome.components import text_sensor
from esphome.const import (
ENTITY_CATEGORY_DIAGNOSTIC,
ICON_NEW_BOX,
)
project_version = cg.esphome_ns.namespace("project_version")
ProjectVersionTextSensor = project_version.class_(
"ProjectVersionTextSensor", text_sensor.TextSensor, cg.Component
)
CONFIG_SCHEMA = (
text_sensor.text_sensor_schema(
icon=ICON_NEW_BOX,
entity_category=ENTITY_CATEGORY_DIAGNOSTIC,
)
.extend(
{
cv.GenerateID(): cv.declare_id(ProjectVersionTextSensor),
}
)
.extend(cv.COMPONENT_SCHEMA)
)
async def to_code(config):
var = await text_sensor.new_text_sensor(config)
await cg.register_component(var, config)

View File

@@ -1,6 +1,15 @@
packages:
base: !include base.yaml
external_components:
- source: ./components
components: [ project_version ]
text_sensor:
- platform: project_version
name: "Upsy Desky Firmware Version"
internal: true
logger:
level: INFO
@@ -13,7 +22,6 @@ captive_portal:
improv_serial:
api:
password: ""
reboot_timeout: 0s
web_server:
@@ -23,4 +31,4 @@ ota:
password: ""
dashboard_import:
package_import_url: github://tjhorner/upsy-desky/firmware/stock.yaml@v1.0.2
package_import_url: github://tjhorner/upsy-desky/firmware/stock.yaml@v1.1.0

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,6 @@
{
"board": {
"3dviewports": [],
"design_settings": {
"defaults": {
"board_outline_line_width": 0.09999999999999999,
@@ -138,7 +139,8 @@
"zones_allow_external_fillets": false,
"zones_use_no_outline": true
},
"layer_presets": []
"layer_presets": [],
"viewports": []
},
"boards": [],
"cvpcb": {
@@ -322,18 +324,23 @@
"rule_severities": {
"bus_definition_conflict": "error",
"bus_entry_needed": "error",
"bus_label_syntax": "error",
"bus_to_bus_conflict": "error",
"bus_to_net_conflict": "error",
"conflicting_netclasses": "error",
"different_unit_footprint": "error",
"different_unit_net": "error",
"duplicate_reference": "error",
"duplicate_sheet_names": "error",
"endpoint_off_grid": "warning",
"extra_units": "error",
"global_label_dangling": "warning",
"hier_label_mismatch": "error",
"label_dangling": "error",
"lib_symbol_issues": "warning",
"missing_bidi_pin": "warning",
"missing_input_pin": "warning",
"missing_power_pin": "error",
"missing_unit": "warning",
"multiple_net_names": "warning",
"net_not_bus_member": "warning",
"no_connect_connected": "warning",
@@ -343,6 +350,7 @@
"pin_to_pin": "warning",
"power_pin_not_driven": "error",
"similar_labels": "warning",
"simulation_model_issue": "error",
"unannotated": "error",
"unit_value_mismatch": "error",
"unresolved_variable": "error",
@@ -360,7 +368,7 @@
"net_settings": {
"classes": [
{
"bus_width": 12.0,
"bus_width": 12,
"clearance": 0.2,
"diff_pair_gap": 0.25,
"diff_pair_via_gap": 0.25,
@@ -374,13 +382,15 @@
"track_width": 0.25,
"via_diameter": 0.8,
"via_drill": 0.4,
"wire_width": 6.0
"wire_width": 6
}
],
"meta": {
"version": 2
"version": 3
},
"net_colors": null
"net_colors": null,
"netclass_assignments": null,
"netclass_patterns": []
},
"pcbnew": {
"last_paths": {
@@ -396,6 +406,8 @@
"schematic": {
"annotate_start_num": 0,
"drawing": {
"dashed_lines_dash_length_ratio": 12.0,
"dashed_lines_gap_length_ratio": 3.0,
"default_line_thickness": 6.0,
"default_text_size": 50.0,
"field_names": [],
@@ -427,7 +439,11 @@
"page_layout_descr_file": "",
"plot_directory": "./",
"spice_adjust_passive_values": false,
"spice_current_sheet_as_root": false,
"spice_external_command": "spice \"%I\"",
"spice_model_current_sheet_as_root": true,
"spice_save_all_currents": false,
"spice_save_all_voltages": false,
"subpart_first_id": 65,
"subpart_id_separator": 0
},

File diff suppressed because it is too large Load Diff

1
tools/tindie/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
*.csv

26
tools/tindie/split-csv.sh Executable file
View File

@@ -0,0 +1,26 @@
#!/bin/bash
rm -f ud_orders.csv first_class_and_intl.csv priority.csv priority_express.csv pickup.csv
csvq -o ud_orders.csv "SELECT * FROM all_orders WHERE \`Model Number\` LIKE \"%UPSY%\";"
csvq -o first_class_and_intl.csv "SELECT * FROM ud_orders WHERE \`Shipping Method\` LIKE \"%First-Class%\" OR \`Shipping Method\` LIKE \"%Simple Export Rate%\";"
csvq -o priority.csv "SELECT * FROM ud_orders WHERE \`Shipping Method\` LIKE \"%Priority Mail%\" AND \`Shipping Method\` NOT LIKE \"%Priority Mail Express%\";"
csvq -o priority_express.csv "SELECT * FROM ud_orders WHERE \`Shipping Method\` LIKE \"%Priority Mail Express%\";"
csvq -o pickup.csv "SELECT * FROM ud_orders WHERE \`Shipping Method\` LIKE \"%Pickup%\";"
SANITY_CHECK_QUERY=$(cat <<-END
SELECT
(SELECT count(*) from ud_orders)
=
(
(SELECT count(*) from first_class_and_intl) +
(SELECT count(*) from priority) +
(SELECT count(*) from priority_express) +
(SELECT count(*) from pickup)
)
AS SanityCheck;
END
)
csvq "$SANITY_CHECK_QUERY"