#rpi4 responsiveness testing

1 messages ยท Page 1 of 1 (latest)

vivid ridge
#

hey

#

the test flow looks like this:

#

motion sensor from HA

#

on motion, call a service. like scene.turn_on or something

void valve
#

Could you send me an export?

vivid ridge
#

sure. it will be broken but you can adjust

void valve
#

np

vivid ridge
#
[{"id":"e99aec0fe257eb14","type":"server-state-changed","z":"2b61c8e726eb5e3b","name":"Adamo Motion","server":"b676fe65.dd3da","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.office_motion_occupancy","entityidfiltertype":"exact","outputinitially":true,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":"","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":true,"ignoreCurrentStateUnavailable":true,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":640,"y":960,"wires":[["dbe6dca6ea947425","7727c3705bab664f"],[]]},{"id":"dbe6dca6ea947425","type":"api-call-service","z":"2b61c8e726eb5e3b","name":"activate night scene","server":"b676fe65.dd3da","version":5,"debugenabled":false,"domain":"scene","service":"turn_on","areaId":[],"deviceId":[],"entityId":["scene.office_nighttime"],"data":"{}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1020,"y":960,"wires":[[]]},{"id":"7727c3705bab664f","type":"debug","z":"2b61c8e726eb5e3b","name":"time debug","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":990,"y":900,"wires":[]},{"id":"b676fe65.dd3da","type":"server","name":"Home Assistant","version":5,"addon":false,"rejectUnauthorizedCerts":false,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":"30","areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h12","statusTimeFormat":"h:m:s.ms","enableGlobalContextStore":true}]
void valve
#

what's that bug node on your screenshot?

vivid ridge
#

time debug?

#

oh you can ignore that

#

i didn't export that in the above code

#

it's just a switch i use for testing

void valve
#

ok, I thought it's important for this test, that's why I wanted to see the export.

vivid ridge
#

so

#

you can see in this test screenshot, the detection event was at 26.594 seconds, but the activation event of the scene was at 27.003 seconds

#

the little white text under each blue node

#

for me, that's basically a half-second delay ๐Ÿ˜ฆ

#

curious what yours would be

#

OH i might need you to adjust how time is printed in NR.

#

so you can see microseconds

#

if you go to the (i) info tab in the right panel, open Global Configuration Nodes > server > home assistant

#

at the bottom of the config for the server node is a "Time Format" which i set to show ms

void valve
#

give me few more secs

vivid ridge
#

no rush. ty so much

void valve
#

xiaomi zigbee button > toggle input_boolean

vivid ridge
#

would you mind using an events: state node instead to trigger?

#

it looks like you are using an events: all HA node

void valve
#

yes, as am using a zigbee button, but I'll try state

#

RPI3 with NR Addon

#

time differs as the RPI3 is in different country

vivid ridge
#

holy moly. both are under 50ms though

#

that's near instant.

#

i changed mine to do input_boolean.toggle as well, but i'm still seeing 350ms+

#

one other thing. if you look in your debug log in NR, and expand payload > new state

#

what is the blue number you see for transition time?

void valve
#

sec, I'll connect debug node

vivid ridge
#

sorry: debug > data >new_State>timesinncechangedMs

void valve
#

8ms

#

RPI4, Raspbian

#

RPI3, HASS OS

#

do you have lotta automations running there?

#

RPI4, Raspbian - Zigbee motion sensor

vivid ridge
#

i have 86ms

#

8x yours

#

btw i tested this with ALL flows OFF in NR except to this one. no impact.

#

i DO have a lot of automations: about 100

#

actually, 186 (not all are enabled)

void valve
#

that's interesting, but unfortunately far beyond my understanding. Have you tried the input_boolean as a trigger?

Woow 100, i have just few basically controlling only my TRVs and fishtank. However alongside with HASS i am running few more servers.

I've read somewhere that NR is quite limited in terms of number of operations, so probably this might be your issue, but if you are saying all your automations has been off, then I don't know.

vivid ridge
#

NR itself isn't runninng many ops. Like i said i disabled all flows except for the simple one we're using, same delay.

#

on your pi4, do you use a memory card or SSD?

void valve
#

Memory card

vivid ridge
#

dang. yeah me too. i thought maybe that was the bottleneck

void valve
#

do you know exact type of you SD card? I tried 32gb and 64gb sandisk A1 and A2. A1 is good, as it should be supported by RPI4, but A2 is not and the effect is the SD Card gets slower. But my experience is that you would really feel that slowliness, It drove me crazy. However I've endup using some old 16GB Sandisk, cause I wasn;t happy even with that 32GB A1 Sandisk performance.

vivid ridge
#

SanDisk 64GB Micro SDXC Extreme Memory Card

#

it's an A2 / Class 3

#

sorry, "class speed 10" w/e that means

void valve
vivid ridge
#

your link looks faster, but is still A2

void valve
#

yeah, it was PRO version, I had an issue to properly install even docker. I tried that several times with automated scripts and always failed at some point. So I got rid of it and got back to my 16GB granny.

You are running hassos right? So there's not a chance to run some performance test

vivid ridge
#

i am

void valve
#

well I think if you would experience same issue as I did, the slowliness would be more noticeable. Also state changes should be kept in memory so I would not expect the SD Card having impact on this

vivid ridge
#

hmm. so it would appear at first blush that my hardware is capable of your speed, which is VERY fast

void valve
#

Unfortunately I really can't say much about it. But yeah, 500ms and 50ms is quite a difference. Especially if you are running 100 automations. I would try a different SD card, simple setup only with that one testing automation, to see what will be the result

vivid ridge
#

oof. that's a big hit to my family's approval factor haha

void valve
#

haha. In the middle of the night, it will be a test for 30 mins ๐Ÿ˜„

#

I have another RPI3 around, so probably I can give it a try now. Let me check, cause I just moved

#

found it. And apparently it was running on that A2 Card

vivid ridge
#

so your RPI3 results above were with an A2 card

#

(btw i did test now with the input bool toggle. same results. about 350ms - better than 500ms but still)

void valve
#

no, results above are from RPI3 in my parents house

vivid ridge
#

oh. ok so you're checking your local RPI3 with the A2 card now (in NR)?

void valve
#

yes am gonna check RPI I was not using atm

vivid ridge
#

ty. no rush

#

appreciate it. you're helping with my sanity

void valve
#

np, I just had some issues to load the image, hopefully I'll be able to run it now.

void valve
#

Ignore this message

void valve
#

I was able to make it run, the issue is am unable to turn on the milliseconds. However the change itself takes 18ms

vivid ridge
#

weird that you can turn on ms. you could add some debug nodes with payload data

#

they probably have timestamps on them you could try

#

thank you though, 18ms seems good still, better than my pi4 which is concerning

void valve
#

what's your number on trigger?

vivid ridge
#

86ms