Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TI demo smart home backend #1

Draft
wants to merge 12 commits into
base: master
Choose a base branch
from
Draft

Conversation

div2779
Copy link
Collaborator

@div2779 div2779 commented Jan 22, 2025

No description provided.

At the bottom of the homescreen, on the left, there is an LVGL logo.
Replace that with TI's logo.

Signed-off-by: Suhaas Joshi <[email protected]>
@div2779 div2779 changed the title Ti demo smart home backend TI demo smart home backend Jan 22, 2025
@div2779 div2779 force-pushed the ti-demo-smart-home-backend branch 2 times, most recently from 221b898 to f526522 Compare January 24, 2025 11:46
Divyansh Mittal added 8 commits January 27, 2025 14:22
Use alsa to open PCM device and play audio using it. Use mutex to
synchronize the read of play/pause by audio thread and write of
play/pause by LVGL thread. Use amixer to set volume in volume-change
callback from LVGL thread.

Signed-off-by: Divyansh Mittal <[email protected]>
Initialize MQTT instance for subscription with TLS set to enable
encrypted communication on port 8883. Subscribe to relevant
topic to receive commands for volume-control. Implement callback
function to control audio volume using amixer based on the values
received in MQTT packet.

Signed-off-by: Divyansh Mittal <[email protected]>
Remove existing code to show random time being incremented periodically.
Use date command to obtain current date-time in UTC timezone. Parse the
output from date command to show on LVGL HMI. Set date-time
repeatedly after every second. Maximum diversion from actual time will
hence be of 1 second. This will work only when internet access is
available.

Signed-off-by: Divyansh Mittal <[email protected]>
Detect event ID for gpio-keys event. gpio-keys interrupt must be enabled
in dts. Wait for interrupt from this event ID and lock/unlock HMI input
on each key-press that is detected.

Signed-off-by: Divyansh Mittal <[email protected]>
Initiate a thread that continuously flips user LED signal using sysfs
with delay based on a shared variable. Protect the shared variable using
mutex. Shared variable can be altered by either the LVGL HMI thread or
by the MQTT callback function after it receives a packet on relevant
topic.

Signed-off-by: Divyansh Mittal <[email protected]>
Enable ADC channels in trigger-less mode and initiate MQTT instance for
publishing messages. Poll for ADC data in fixed intervals. After each
poll, publish it using MQTT. We do not publish any message if
mosquitto is not able to connect to internet and initialize MQTT
instance.

Signed-off-by: Divyansh Mittal <[email protected]>
On each callback of change in ev charging progress, call publish
function to transmit message on relevant topic via MQTT.

Signed-off-by: Divyansh Mittal <[email protected]>
If button configuration is not detected, then screen should not block
input on sliding Lock on HMI.

Signed-off-by: Divyansh Mittal <[email protected]>
demos/high_res/adc.c Outdated Show resolved Hide resolved
demos/high_res/audio.c Show resolved Hide resolved
Remove command line instructions mentioned in docstrings for some C files

Signed-off-by: Divyansh Mittal <[email protected]>
@jsuhaas22
Copy link
Collaborator

Requesting 2 changes:

  1. The temperature is shown with "-" prepended to digits before and after the ".". For example, "-6.-5". This needs to be handled.
  2. Need an audio file that's already in the filesystem to be played

Add delay while polling for the status of play/pause button in the audio thread

Signed-off-by: Divyansh Mittal <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants