Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion software/release/all/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
'sm3.py': 1,
'sl1.py': 1,
'smartlight.py': 1,
'networking.py': 6,
'networking.py': 7,
'main.py': 2,
'boot.py': 0
}
Expand Down
8 changes: 4 additions & 4 deletions software/release/all/networking.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ def __init__(self, infmsg=False, dbgmsg=False, errmsg=False, admin=False, initti
self.dbgmsg = dbgmsg
self.errmsg = errmsg
self.admin = admin
self.config = {"Name": None,
"Configuration": None,
self.config = {"name": None,
"configuration": None,
"id": None,
"Version": None,
"version": None,
} #Just as an example, can include more information here, but for interoperability purposes please keep the basic four attributes

self._staif = network.WLAN(network.STA_IF)
Expand Down Expand Up @@ -693,7 +693,7 @@ def __handle_cmd(self, sender_mac, subtype, send_timestamp, receive_timestamp, p
self.boops = self.boops + 1
self.master.iprint(f"{msg_subkey} ({subtype}) command received from {sender_mac} ({self.peer_name(sender_mac)}), Received total of {self.boops} boops!")
try:
self._compose(sender_mac, [self.master.config, self.master.version, self.master.sta.mac, self.master.ap.mac, self.rssi()], 0x02, 0x20) # [ID, Name, Config, Version, sta mac, ap mac, rssi]
self._compose(sender_mac, [self.master.config, self.master.sta.mac, self.master.ap.mac, self.rssi()], 0x02, 0x20) # [ID, Name, Config, Version, sta mac, ap mac, rssi]
except Exception as e:
self.master.aen.__send_confirmation(self, "Fail", sender_mac, f"{msg_subkey} ({subtype})", payload, e)
elif (msg_subkey := "Echo") and subtype == subtype == 0x02 or subtype == 0x15: # Echo
Expand Down
20 changes: 10 additions & 10 deletions software/release/am1/boot.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,16 @@
global timer

print("{:.3f} Name: {}, ID: {}, Configuration: {}, Sta mac: {}, Sta channel: {}, Ap mac: {}, Ap channel: {}, Version: {}".format(
(time.ticks_ms() - networking.inittime) / 1000,
networking.config["name"],
networking.config["id"],
networking.config["configuration"],
networking.config["sta_mac"],
networking.config["sta_channel"],
networking.config["ap_mac"],
networking.config["ap_channel"],
networking.config["version"]
))
(time.ticks_ms() - networking.inittime) / 1000,
networking.config["name"],
networking.config["id"],
networking.config["configuration"],
networking.config["sta_mac"],
networking.config["sta_channel"],
networking.config["ap_mac"],
networking.config["ap_channel"],
networking.config["version"]
))

def am1():
lastPressed = 0
Expand Down
6 changes: 4 additions & 2 deletions software/release/am1/config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
config = {'ap_channel': 1, 'id': None, 'name': 'Nick', 'sta_mac': None, 'ap_mac': None, 'configuration': None, 'sta_channel': 1, 'version': '2025-10-12-175607'}
config = {'ap_channel': 1, 'id': None, 'name': 'Nick', 'sta_mac': None, 'ap_mac': None, 'configuration': None, 'sta_channel': 1, 'version': '2025-10-12-192145'}
version = {
'adxl345.py': 3,
'am1.py': 1,
Expand All @@ -13,7 +13,7 @@
'sm3.py': 1,
'sl1.py': 1,
'smartlight.py': 1,
'networking.py': 6,
'networking.py': 7,
'main.py': 2,
'boot.py': 0
}
Expand Down Expand Up @@ -79,3 +79,5 @@
} #key is i2c address: ["device name", Output (0) or Input (1), "Description"]
sensor_dict = {"sensor": [0,4095], "potentiometer": [0,180], "select": [0,1], "up": [0,1], "down": [0,1], "button": [0,1], "sw1": [0,1], "sw2": [0,1], "sw3": [0,1], "sw4": [0,1]}
hive_config = {'hive': True, 'recipients': [b'd\xe83\x84\xd8\x18'], 'sender_sensor_list': [[b'd\xe83\x84\xd8\x18', 'None']], 'refreshrate': 200, 'mode': 'None'}

networking = None
8 changes: 4 additions & 4 deletions software/release/am1/networking.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ def __init__(self, infmsg=False, dbgmsg=False, errmsg=False, admin=False, initti
self.dbgmsg = dbgmsg
self.errmsg = errmsg
self.admin = admin
self.config = {"Name": None,
"Configuration": None,
self.config = {"name": None,
"configuration": None,
"id": None,
"Version": None,
"version": None,
} #Just as an example, can include more information here, but for interoperability purposes please keep the basic four attributes

self._staif = network.WLAN(network.STA_IF)
Expand Down Expand Up @@ -693,7 +693,7 @@ def __handle_cmd(self, sender_mac, subtype, send_timestamp, receive_timestamp, p
self.boops = self.boops + 1
self.master.iprint(f"{msg_subkey} ({subtype}) command received from {sender_mac} ({self.peer_name(sender_mac)}), Received total of {self.boops} boops!")
try:
self._compose(sender_mac, [self.master.config, self.master.version, self.master.sta.mac, self.master.ap.mac, self.rssi()], 0x02, 0x20) # [ID, Name, Config, Version, sta mac, ap mac, rssi]
self._compose(sender_mac, [self.master.config, self.master.sta.mac, self.master.ap.mac, self.rssi()], 0x02, 0x20) # [ID, Name, Config, Version, sta mac, ap mac, rssi]
except Exception as e:
self.master.aen.__send_confirmation(self, "Fail", sender_mac, f"{msg_subkey} ({subtype})", payload, e)
elif (msg_subkey := "Echo") and subtype == subtype == 0x02 or subtype == 0x15: # Echo
Expand Down
20 changes: 10 additions & 10 deletions software/release/hm3/boot.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,16 @@
global timer

print("{:.3f} Name: {}, ID: {}, Configuration: {}, Sta mac: {}, Sta channel: {}, Ap mac: {}, Ap channel: {}, Version: {}".format(
(time.ticks_ms() - networking.inittime) / 1000,
networking.config["name"],
networking.config["id"],
networking.config["configuration"],
networking.config["sta_mac"],
networking.config["sta_channel"],
networking.config["ap_mac"],
networking.config["ap_channel"],
networking.config["version"]
))
(time.ticks_ms() - networking.inittime) / 1000,
networking.config["name"],
networking.config["id"],
networking.config["configuration"],
networking.config["sta_mac"],
networking.config["sta_channel"],
networking.config["ap_mac"],
networking.config["ap_channel"],
networking.config["version"]
))

def am1():
lastPressed = 0
Expand Down
5 changes: 3 additions & 2 deletions software/release/hm3/config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
config = {'ap_channel': 1, 'id': None, 'name': 'Nick', 'sta_mac': None, 'ap_mac': None, 'configuration': None, 'sta_channel': 1, 'version': '2025-10-12-175607'}
config = {'ap_channel': 1, 'id': None, 'name': 'Nick', 'sta_mac': None, 'ap_mac': None, 'configuration': None, 'sta_channel': 1, 'version': '2025-10-12-192145'}
version = {
'adxl345.py': 3,
'am1.py': 1,
Expand All @@ -13,7 +13,7 @@
'sm3.py': 1,
'sl1.py': 1,
'smartlight.py': 1,
'networking.py': 6,
'networking.py': 7,
'main.py': 2,
'boot.py': 0
}
Expand Down Expand Up @@ -80,3 +80,4 @@
sensor_dict = {"sensor": [0,4095], "potentiometer": [0,180], "select": [0,1], "up": [0,1], "down": [0,1], "button": [0,1], "sw1": [0,1], "sw2": [0,1], "sw3": [0,1], "sw4": [0,1]}
hive_config = {'hive': True, 'recipients': [b'd\xe83\x84\xd8\x18'], 'sender_sensor_list': [[b'd\xe83\x84\xd8\x18', 'None']], 'refreshrate': 200, 'mode': 'None'}

networking = None
8 changes: 4 additions & 4 deletions software/release/hm3/networking.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ def __init__(self, infmsg=False, dbgmsg=False, errmsg=False, admin=False, initti
self.dbgmsg = dbgmsg
self.errmsg = errmsg
self.admin = admin
self.config = {"Name": None,
"Configuration": None,
self.config = {"name": None,
"configuration": None,
"id": None,
"Version": None,
"version": None,
} #Just as an example, can include more information here, but for interoperability purposes please keep the basic four attributes

self._staif = network.WLAN(network.STA_IF)
Expand Down Expand Up @@ -693,7 +693,7 @@ def __handle_cmd(self, sender_mac, subtype, send_timestamp, receive_timestamp, p
self.boops = self.boops + 1
self.master.iprint(f"{msg_subkey} ({subtype}) command received from {sender_mac} ({self.peer_name(sender_mac)}), Received total of {self.boops} boops!")
try:
self._compose(sender_mac, [self.master.config, self.master.version, self.master.sta.mac, self.master.ap.mac, self.rssi()], 0x02, 0x20) # [ID, Name, Config, Version, sta mac, ap mac, rssi]
self._compose(sender_mac, [self.master.config, self.master.sta.mac, self.master.ap.mac, self.rssi()], 0x02, 0x20) # [ID, Name, Config, Version, sta mac, ap mac, rssi]
except Exception as e:
self.master.aen.__send_confirmation(self, "Fail", sender_mac, f"{msg_subkey} ({subtype})", payload, e)
elif (msg_subkey := "Echo") and subtype == subtype == 0x02 or subtype == 0x15: # Echo
Expand Down
20 changes: 10 additions & 10 deletions software/release/mm1/boot.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,16 @@
global timer

print("{:.3f} Name: {}, ID: {}, Configuration: {}, Sta mac: {}, Sta channel: {}, Ap mac: {}, Ap channel: {}, Version: {}".format(
(time.ticks_ms() - networking.inittime) / 1000,
networking.config["name"],
networking.config["id"],
networking.config["configuration"],
networking.config["sta_mac"],
networking.config["sta_channel"],
networking.config["ap_mac"],
networking.config["ap_channel"],
networking.config["version"]
))
(time.ticks_ms() - networking.inittime) / 1000,
networking.config["name"],
networking.config["id"],
networking.config["configuration"],
networking.config["sta_mac"],
networking.config["sta_channel"],
networking.config["ap_mac"],
networking.config["ap_channel"],
networking.config["version"]
))

def am1():
lastPressed = 0
Expand Down
5 changes: 3 additions & 2 deletions software/release/mm1/config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
config = {'ap_channel': 1, 'id': None, 'name': 'Nick', 'sta_mac': None, 'ap_mac': None, 'configuration': None, 'sta_channel': 1, 'version': '2025-10-12-175607'}
config = {'ap_channel': 1, 'id': None, 'name': 'Nick', 'sta_mac': None, 'ap_mac': None, 'configuration': None, 'sta_channel': 1, 'version': '2025-10-12-192145'}
version = {
'adxl345.py': 3,
'am1.py': 1,
Expand All @@ -13,7 +13,7 @@
'sm3.py': 1,
'sl1.py': 1,
'smartlight.py': 1,
'networking.py': 6,
'networking.py': 7,
'main.py': 2,
'boot.py': 0
}
Expand Down Expand Up @@ -80,3 +80,4 @@
sensor_dict = {"sensor": [0,4095], "potentiometer": [0,180], "select": [0,1], "up": [0,1], "down": [0,1], "button": [0,1], "sw1": [0,1], "sw2": [0,1], "sw3": [0,1], "sw4": [0,1]}
hive_config = {'hive': True, 'recipients': [b'd\xe83\x84\xd8\x18'], 'sender_sensor_list': [[b'd\xe83\x84\xd8\x18', 'None']], 'refreshrate': 200, 'mode': 'None'}

networking = None
8 changes: 4 additions & 4 deletions software/release/mm1/networking.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ def __init__(self, infmsg=False, dbgmsg=False, errmsg=False, admin=False, initti
self.dbgmsg = dbgmsg
self.errmsg = errmsg
self.admin = admin
self.config = {"Name": None,
"Configuration": None,
self.config = {"name": None,
"configuration": None,
"id": None,
"Version": None,
"version": None,
} #Just as an example, can include more information here, but for interoperability purposes please keep the basic four attributes

self._staif = network.WLAN(network.STA_IF)
Expand Down Expand Up @@ -693,7 +693,7 @@ def __handle_cmd(self, sender_mac, subtype, send_timestamp, receive_timestamp, p
self.boops = self.boops + 1
self.master.iprint(f"{msg_subkey} ({subtype}) command received from {sender_mac} ({self.peer_name(sender_mac)}), Received total of {self.boops} boops!")
try:
self._compose(sender_mac, [self.master.config, self.master.version, self.master.sta.mac, self.master.ap.mac, self.rssi()], 0x02, 0x20) # [ID, Name, Config, Version, sta mac, ap mac, rssi]
self._compose(sender_mac, [self.master.config, self.master.sta.mac, self.master.ap.mac, self.rssi()], 0x02, 0x20) # [ID, Name, Config, Version, sta mac, ap mac, rssi]
except Exception as e:
self.master.aen.__send_confirmation(self, "Fail", sender_mac, f"{msg_subkey} ({subtype})", payload, e)
elif (msg_subkey := "Echo") and subtype == subtype == 0x02 or subtype == 0x15: # Echo
Expand Down
20 changes: 10 additions & 10 deletions software/release/sl1/boot.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,16 @@
global timer

print("{:.3f} Name: {}, ID: {}, Configuration: {}, Sta mac: {}, Sta channel: {}, Ap mac: {}, Ap channel: {}, Version: {}".format(
(time.ticks_ms() - networking.inittime) / 1000,
networking.config["name"],
networking.config["id"],
networking.config["configuration"],
networking.config["sta_mac"],
networking.config["sta_channel"],
networking.config["ap_mac"],
networking.config["ap_channel"],
networking.config["version"]
))
(time.ticks_ms() - networking.inittime) / 1000,
networking.config["name"],
networking.config["id"],
networking.config["configuration"],
networking.config["sta_mac"],
networking.config["sta_channel"],
networking.config["ap_mac"],
networking.config["ap_channel"],
networking.config["version"]
))

def am1():
lastPressed = 0
Expand Down
5 changes: 3 additions & 2 deletions software/release/sl1/config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
config = {'ap_channel': 1, 'id': None, 'name': 'Nick', 'sta_mac': None, 'ap_mac': None, 'configuration': None, 'sta_channel': 1, 'version': '2025-10-12-175607'}
config = {'ap_channel': 1, 'id': None, 'name': 'Nick', 'sta_mac': None, 'ap_mac': None, 'configuration': None, 'sta_channel': 1, 'version': '2025-10-12-192145'}
version = {
'adxl345.py': 3,
'am1.py': 1,
Expand All @@ -13,7 +13,7 @@
'sm3.py': 1,
'sl1.py': 1,
'smartlight.py': 1,
'networking.py': 6,
'networking.py': 7,
'main.py': 2,
'boot.py': 0
}
Expand Down Expand Up @@ -80,3 +80,4 @@
sensor_dict = {"sensor": [0,4095], "potentiometer": [0,180], "select": [0,1], "up": [0,1], "down": [0,1], "button": [0,1], "sw1": [0,1], "sw2": [0,1], "sw3": [0,1], "sw4": [0,1]}
hive_config = {'hive': True, 'recipients': [b'd\xe83\x84\xd8\x18'], 'sender_sensor_list': [[b'd\xe83\x84\xd8\x18', 'None']], 'refreshrate': 200, 'mode': 'None'}

networking = None
8 changes: 4 additions & 4 deletions software/release/sl1/networking.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ def __init__(self, infmsg=False, dbgmsg=False, errmsg=False, admin=False, initti
self.dbgmsg = dbgmsg
self.errmsg = errmsg
self.admin = admin
self.config = {"Name": None,
"Configuration": None,
self.config = {"name": None,
"configuration": None,
"id": None,
"Version": None,
"version": None,
} #Just as an example, can include more information here, but for interoperability purposes please keep the basic four attributes

self._staif = network.WLAN(network.STA_IF)
Expand Down Expand Up @@ -693,7 +693,7 @@ def __handle_cmd(self, sender_mac, subtype, send_timestamp, receive_timestamp, p
self.boops = self.boops + 1
self.master.iprint(f"{msg_subkey} ({subtype}) command received from {sender_mac} ({self.peer_name(sender_mac)}), Received total of {self.boops} boops!")
try:
self._compose(sender_mac, [self.master.config, self.master.version, self.master.sta.mac, self.master.ap.mac, self.rssi()], 0x02, 0x20) # [ID, Name, Config, Version, sta mac, ap mac, rssi]
self._compose(sender_mac, [self.master.config, self.master.sta.mac, self.master.ap.mac, self.rssi()], 0x02, 0x20) # [ID, Name, Config, Version, sta mac, ap mac, rssi]
except Exception as e:
self.master.aen.__send_confirmation(self, "Fail", sender_mac, f"{msg_subkey} ({subtype})", payload, e)
elif (msg_subkey := "Echo") and subtype == subtype == 0x02 or subtype == 0x15: # Echo
Expand Down
20 changes: 10 additions & 10 deletions software/release/sp1/boot.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,16 @@
global timer

print("{:.3f} Name: {}, ID: {}, Configuration: {}, Sta mac: {}, Sta channel: {}, Ap mac: {}, Ap channel: {}, Version: {}".format(
(time.ticks_ms() - networking.inittime) / 1000,
networking.config["name"],
networking.config["id"],
networking.config["configuration"],
networking.config["sta_mac"],
networking.config["sta_channel"],
networking.config["ap_mac"],
networking.config["ap_channel"],
networking.config["version"]
))
(time.ticks_ms() - networking.inittime) / 1000,
networking.config["name"],
networking.config["id"],
networking.config["configuration"],
networking.config["sta_mac"],
networking.config["sta_channel"],
networking.config["ap_mac"],
networking.config["ap_channel"],
networking.config["version"]
))

def am1():
lastPressed = 0
Expand Down
5 changes: 3 additions & 2 deletions software/release/sp1/config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
config = {'ap_channel': 1, 'id': None, 'name': 'Nick', 'sta_mac': None, 'ap_mac': None, 'configuration': None, 'sta_channel': 1, 'version': '2025-10-12-175607'}
config = {'ap_channel': 1, 'id': None, 'name': 'Nick', 'sta_mac': None, 'ap_mac': None, 'configuration': None, 'sta_channel': 1, 'version': '2025-10-12-192145'}
version = {
'adxl345.py': 3,
'am1.py': 1,
Expand All @@ -13,7 +13,7 @@
'sm3.py': 1,
'sl1.py': 1,
'smartlight.py': 1,
'networking.py': 6,
'networking.py': 7,
'main.py': 2,
'boot.py': 0
}
Expand Down Expand Up @@ -80,3 +80,4 @@
sensor_dict = {"sensor": [0,4095], "potentiometer": [0,180], "select": [0,1], "up": [0,1], "down": [0,1], "button": [0,1], "sw1": [0,1], "sw2": [0,1], "sw3": [0,1], "sw4": [0,1]}
hive_config = {'hive': True, 'recipients': [b'd\xe83\x84\xd8\x18'], 'sender_sensor_list': [[b'd\xe83\x84\xd8\x18', 'None']], 'refreshrate': 200, 'mode': 'None'}

networking = None
8 changes: 4 additions & 4 deletions software/release/sp1/networking.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ def __init__(self, infmsg=False, dbgmsg=False, errmsg=False, admin=False, initti
self.dbgmsg = dbgmsg
self.errmsg = errmsg
self.admin = admin
self.config = {"Name": None,
"Configuration": None,
self.config = {"name": None,
"configuration": None,
"id": None,
"Version": None,
"version": None,
} #Just as an example, can include more information here, but for interoperability purposes please keep the basic four attributes

self._staif = network.WLAN(network.STA_IF)
Expand Down Expand Up @@ -693,7 +693,7 @@ def __handle_cmd(self, sender_mac, subtype, send_timestamp, receive_timestamp, p
self.boops = self.boops + 1
self.master.iprint(f"{msg_subkey} ({subtype}) command received from {sender_mac} ({self.peer_name(sender_mac)}), Received total of {self.boops} boops!")
try:
self._compose(sender_mac, [self.master.config, self.master.version, self.master.sta.mac, self.master.ap.mac, self.rssi()], 0x02, 0x20) # [ID, Name, Config, Version, sta mac, ap mac, rssi]
self._compose(sender_mac, [self.master.config, self.master.sta.mac, self.master.ap.mac, self.rssi()], 0x02, 0x20) # [ID, Name, Config, Version, sta mac, ap mac, rssi]
except Exception as e:
self.master.aen.__send_confirmation(self, "Fail", sender_mac, f"{msg_subkey} ({subtype})", payload, e)
elif (msg_subkey := "Echo") and subtype == subtype == 0x02 or subtype == 0x15: # Echo
Expand Down