Appdaemon state changes without state changes?

Mysensors sensors implement forced state updates in hass meaning all updates from the device will trigger a state change, even if the state value has not changed. I’m not sure this is your case though. Can you post a debug level log where we can see both the mysensors updates and the state events?

i am trying to get a state update list out off hass itselve but im not succeeding.
the db is to big.
if i try to get it from the pi to the pc it goes wrong or sqlbrowser cant do anything with it.
i already deleted the db, but it get a backupfile form somewhere (and i dont have a clue from where)

i can show the mysensors output. but there is no actual time there. but i checked and it is absolutely just sending out a temperature every 5 mins.
still i get listen_state events from appdaemon. and at least 5 updates at once from that sensor.

Hi Rene -

What does your code look like? Is it possible that an attribute is changing, not the actual state?

its a mysensor switch without any attribs.

i have a quit complicated code, but i logged it wel.
i let a logentry go out for every listen state i put in and a log entry right on top off the callback.

so i can see that there is only 1 listener calling the callback but still they keep coming.

Not convinced it is anything wrong with AppDaemon yet -

Can you capture the Home Assistant logfile and look for the state changes and verify if they are real state changes from the sensor, or if AppDaemon is firing multiple times for an individual event?

i am not convinced it is appdaemon either.
but its making me mad. :wink:

i am trying to get anything out of hass. but i am struggling with several problems at the same time.

because of that problem, the db stays to big to get anything out of it.
the normal log doesnt give state changes.
so im blocked by 1 problem to solve the other.

My log does show state changes - maybe you can up the verbosity?

i must say that i never saw state changes in the log. (o wait you mean the logbook perhaps?)
logbook isnt there anymore since a long time because it Always took a long time to load and Always gave info to much and after midnight mostly nothing anymore.
ill try if it will come back with a restart out of hass itselve.

but i dont know what verbosity is or how to up it :wink:

oke i did get my logbook back without restarting the rpi.

but it doesnt bring me anything :frowning:
it takes about 3 or 4 minutes to load and then all it shows is…

no logbook entries found.

i am about to throw everything in the river like we say here :stuck_out_tongue:

I mean the logfile output - here is what mine looks like:

Dec 01 15:00:30 Pegasus hass[14624]: INFO:homeassistant.core:Bus:Handling <Event state_changed[L]: entity_id=sensor.dark_sky_ozone, new_state=<state sensor.dark_sky_ozone=276.3; icon=mdi:eye, friendly_name=Ozone, attribution=Powered by Dark Sky, unit_of_measurement=DU @ 2016-12-01T15:00:30.920051-05:00>, old_state=<state sensor.dark_sky_ozone=276.2; icon=mdi:eye, friendly_name=Ozone, attribution=Powered by Dark Sky, unit_of_measurement=DU @ 2016-12-01T14:58:00.896836-05:00>>
Dec 01 15:00:30 Pegasus hass[14624]: INFO:homeassistant.core:Bus:Handling <Event state_changed[L]: entity_id=sensor.dark_sky_temperature, new_state=<state sensor.dark_sky_temperature=50.9; icon=mdi:thermometer, friendly_name=Temperature, attribution=Powered by Dark Sky, unit_of_measurement=°F @ 2016-12-01T15:00:30.980225-05:00>, old_state=<state sensor.dark_sky_temperature=51.0; icon=mdi:thermometer, friendly_name=Temperature, attribution=Powered by Dark Sky, unit_of_measurement=°F @ 2016-12-01T14:58:00.991299-05:00>>
Dec 01 15:01:00 Pegasus hass[14624]: INFO:homeassistant.core:Bus:Handling <Event state_changed[L]: entity_id=sensor.date__time, new_state=<state sensor.date__time=2016-12-01, 15:01; friendly_name=Date & Time, icon=mdi:calendar-clock @ 2016-12-01T15:01:00.527817-05:00>, old_state=<state sensor.date__time=2016-12-01, 15:00; friendly_name=Date & Time, icon=mdi:calendar-clock @ 2016-12-01T15:00:00.516217-05:00>>
Dec 01 15:01:00 Pegasus hass[14624]: INFO:homeassistant.core:Bus:Handling <Event state_changed[L]: entity_id=sensor.cpu_use, new_state=<state sensor.cpu_use=4; icon=mdi:memory, friendly_name=CPU Use, unit_of_measurement=% @ 2016-12-01T15:01:00.609141-05:00>, old_state=<state sensor.cpu_use=3; icon=mdi:memory, friendly_name=CPU Use, unit_of_measurement=% @ 2016-12-01T14:59:00.585467-05:00>>
Dec 01 15:01:00 Pegasus hass[14624]: INFO:homeassistant.core:Bus:Handling <Event state_changed[L]: entity_id=sensor.ram_free, new_state=<state sensor.ram_free=13449.4; icon=mdi:memory, friendly_name=RAM Free, unit_of_measurement=MiB @ 2016-12-01T15:01:00.631081-05:00>, old_state=<state sensor.ram_free=13451.7; icon=mdi:memory, friendly_name=RAM Free, unit_of_measurement=MiB @ 2016-12-01T14:59:30.575992-05:00>>
Dec 01 15:01:08 Pegasus hass[14624]: INFO:homeassistant.core:Bus:Handling <Event state_changed[L]: entity_id=sensor.side_multisensor_relative_humidity_25_5, new_state=<state sensor.side_multisensor_relative_humidity_25_5=56.0; battery_level=100, node_id=25, friendly_name=Side Humidity, unit_of_measurement=% @ 2016-12-01T15:01:08.942848-05:00>, old_state=<state sensor.side_multisensor_relative_humidity_25_5=54.0; battery_level=100, node_id=25, friendly_name=Side Humidity, unit_of_measurement=% @ 2016-12-01T15:00:06.893622-05:00>>
Dec 01 15:01:08 Pegasus hass[14624]: INFO:homeassistant.core:Bus:Handling <Event state_changed[L]: entity_id=sensor.side_humidity_corrected, new_state=<state sensor.side_humidity_corrected=76.0; friendly_name=Side Humidity, unit_of_measurement=% @ 2016-12-01T15:01:08.984785-05:00>, old_state=<state sensor.side_humidity_corrected=74.0; friendly_name=Side Humidity, unit_of_measurement=% @ 2016-12-01T15:00:06.915512-05:00>>
Dec 01 15:01:10 Pegasus hass[14624]: INFO:homeassistant.core:Bus:Handling <Event state_changed[L]: entity_id=sensor.side_multisensor_luminance_25_3, new_state=<state sensor.side_multisensor_luminance_25_3=259.0; battery_level=100, node_id=25, friendly_name=Side Luminance, unit_of_measurement=lux @ 2016-12-01T15:01:10.157886-05:00>, old_state=<state sensor.side_multisensor_luminance_25_3=264.0; battery_level=100, node_id=25, friendly_name=Side Luminance, unit_of_measurement=lux @ 2016-12-01T15:00:08.098576-05:00>>
Dec 01 15:01:30 Pegasus hass[14624]: INFO:homeassistant.core:Bus:Handling <Event state_changed[L]: entity_id=sensor.cpu_use, new_state=<state sensor.cpu_use=8; icon=mdi:memory, friendly_name=CPU Use, unit_of_measurement=% @ 2016-12-01T15:01:30.611679-05:00>, old_state=<state sensor.cpu_use=4; icon=mdi:memory, friendly_name=CPU Use, unit_of_measurement=% @ 2016-12-01T15:01:00.609141-05:00>>
Dec 01 15:01:30 Pegasus hass[14624]: INFO:homeassistant.core:Bus:Handling <Event state_changed[L]: entity_id=sensor.ram_free, new_state=<state sensor.ram_free=13447.1; icon=mdi:memory, friendly_name=RAM Free, unit_of_measurement=MiB @ 2016-12-01T15:01:30.655536-05:00>, old_state=<state sensor.ram_free=13449.4; icon=mdi:memory, friendly_name=RAM Free, unit_of_measurement=MiB @ 2016-12-01T15:01:00.631081-05:00>>
Dec 01 15:01:30 Pegasus hass[14624]: INFO:homeassistant.core:Bus:Handling <Event state_changed[L]: entity_id=sun.sun, new_state=<state sun.sun=above_horizon; elevation=12.0, azimuth=226.24, next_rising=2016-12-02T12:01:20+00:00, next_setting=2016-12-01T21:25:36+00:00, friendly_name=Sun @ 2016-12-01T07:00:21.513198-05:00>, old_state=<state sun.sun=above_horizon; elevation=12.14, azimuth=226.05, next_rising=2016-12-02T12:01:20+00:00, next_setting=2016-12-01T21:25:36+00:00, friendly_name=Sun @ 2016-12-01T07:00:21.513198-05:00>>

what do you have in your config yaml?

just

logbook:

I didn;t do anything special to get the output - I am using systemd to run it and I use:

journalctl -u home-assistant@hass

to get the log out put

i Always looked at the logbook or the errorlog included in the frontend.

i’m really feeling like a nitwit right now.
you are using systemd? to run what?

if i type the line you posted i get

no journal files were found.

The relevant command on my raspian image is

sudo journalctl -u [email protected]

so it must depend on your installation.

If, as I suspect, you are running hass from the command line I am not sure where all that logging goes if not to the screen …

i have thrown my towel.

i returned to my 0.28 version on the PC where i have a annoying problem with mysensors but it is working (after 5 restarts)

i am quite sure now that there is a problem between mysensors and hass 0.33.4
with the same appdaemon pointed to my old hass enviroment i dont get that overload of state updates.

i am going to try to build my rpi completely new, because right now nothing works on it.

andrew you guessed wrong :stuck_out_tongue: i was running hass in a venv setup like it is said in the doc.
so it was running at restart from the rpi as a service?

not anymore from now on. i need to know what is happening.

Aww - you outsmarted me!

1 Like

RPI is completely new setup.
sdcard new, raspbian new, hass version 0.28.2

and now the multiple state changes dont occur anymore.

so it was not appdaemon (as expected)
so the only option there is, that it was mysensors in hass 0.33.4

@martinhjelmare i will try it out again in the future, but right now i am glad i have a working enviroment again.
i did disconnect my 2nd and 3th gateway (they were not really important YET)
but something in 0.33.4 was triggering state updates from mysensors, even when there was no new data coming in.

A couple of things should be fixed in 0.34. I would try that when it’s released.

0.34 you mean?

i get confused by the release numbers sometimes but if im correct 33.4 is the latest.

but oke, i will try it when that is released. (in a test enviroment i am setting up :slight_smile: )