Streusel

joined 1 year ago
[โ€“] Streusel 1 points 11 months ago

Thank you, thats it :)

41
submitted 11 months ago* (last edited 11 months ago) by Streusel to c/homeassistant
 

Im trying to create an event log Card that will show important events during absence, like shown in the attached screenshot.

The decision, what is relevant and how its displayed, can be done by node red (i already started to create the flows)

Node Red puts the events in a .txt file. To show this Log on my Dashboard, i tried the following: A command sensor is putting the content of the .txt in a sensor.

command_line:
  - sensor:
      command: 'cat /share/test.txt'
      name: awaylog

The .txt file already includs the formating for the text to be shown as alert-types (colored row with related icon). The sensor is then used in a Markdown Card.

Problem is, the sensor only seems to be capable of storing 255 characters. This limit exeeds quickly. (one alert-type command is already >50 characters) . If it is exeeded the result is shown as "unknown" (screenshot at the top)

Is anybody aware of a solution to avoid this chracter limit. Any other ideas to achiev such an event log ?

#Edit/Solution: Thanks to @[email protected] I just put the log entries in the json_attributes of the sensor and used the actual sensor value (because only this is limited to 255 char.) to just count up the number of log entries. Also i skipped the step creating a command sensor in Home assistant config.yaml, instead i used the sensor node to change it directly with node red.

Node-red sensor node config:


state = msg.logcount
json_attributes = msg.payload (formated log entry list)

Markdown card


type: markdown
entity_id:
  - sensor.absencelog_2
content: |
  ##  Absence Events
   {{state_attr('sensor.absencelog_2', 'json_attributes')}}
   
  *This list will be deleted when Marge is home again*

ps. Marge got a new phonenumber :P

 

I have an old Bose SoundLink Mini II Bluetooth speaker that sounds quite decent to me. I want to upgrade/replace its internals with a Raspberry Pi Zero W and an audio DAC Shim attached to it, running piCorePlayer.

Since the Audio DAC Shim doesn't provide enough power, and the Bose seems to have a separate amp board, I want to use the amp board of the Bose to drive the speakers and eliminate the rest of the Bose PCBs. The amp board controller appears to be a TPA3118. With the help of the datasheet, I found out the audio input pins of the board:

LINN (Left IN negative)
LINP (Left IN positive)
RINN (right IN negative)
RINP (right IN positive)

The RPI Audio DAC Shim only has a 3.5mm headphone out, so Left, Right, and GND.

I already tried to connect it as follows:

L to LINP
R to RINP
GND to RINN and LINN

While this seems to work in general, the audio quality appears to be worse in comparison. When I plug the RPI DAC Shim board into the original Bose 3.5mm input (using a 3.5mm cable), it sounds better.

Here is my question: Is it fine to connect the 3.5mm signals as I did? It felt wrong to just connect RINN and LINN to GND, as RINN and LINN don't seem to be connected to GND otherwise. How do I properly connect the 3.5mm output to the Bose amp board?

Cheers

[โ€“] Streusel 25 points 1 year ago (5 children)

G-Pay and Android Auto are the things that can be very usefull but can not be replaced unfortunate.