Author Topic: Status attribute changing to 2 and back to -1  (Read 314 times)

Offline reneboer

  • Hero Member
  • *****
  • Posts: 1380
  • Karma: +79/-30
Status attribute changing to 2 and back to -1
« on: April 05, 2018, 05:29:43 am »
Hi akbooer,

I have some plugins that are communicating using TCP and the status attribute keeps changing to 2 and back to -1 all the time. One plugin uses a direct socket call, one an http request and a third the luup.inet.wget. The communication is working just fine and I do not see the same behavior on a Vera. The Netatmo plugin shows the same behavior btw (Version 2018.02.27, but also prior versions). I cannot find anything in the logs that is changing the status attribute.

It is not impacting the functionality, but I am just wondering why this is happening. Also having the screen showing red all the time without a real issue present is a bit annoying.

Running openLuup v18.2.26 on a PI.

Cheers Rene
2xVeraLite, VeraEdge, openLuup, ALTUI, 20 switches, 10 dimmers, 20 sensors, 10 scene controllers, 1 Harmony Hub, many plug-ins. Not enough time.

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6153
  • Karma: +275/-69
  • "Less is more"
Re: Status attribute changing to 2 and back to -1
« Reply #1 on: April 05, 2018, 05:58:03 am »
Yes, this has been happening for a while. VeraBridge does it too...

...I was about to revamp the device and job status anyway, as @amg0 has now told me how to get messages into the AtlUI message area.
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P, 9x Philips Hue,
Razberry, MySensors Arduino, HomeWave, AltUI, AltHue, DataYours, Grafana, openLuup, ZWay, ZeroBrane Studio.

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6153
  • Karma: +275/-69
  • "Less is more"
Re: Status attribute changing to 2 and back to -1
« Reply #2 on: April 05, 2018, 03:42:37 pm »
I believe that this is fixed in the latest development commit v18.4.5b

Let me know!
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P, 9x Philips Hue,
Razberry, MySensors Arduino, HomeWave, AltUI, AltHue, DataYours, Grafana, openLuup, ZWay, ZeroBrane Studio.

Offline reneboer

  • Hero Member
  • *****
  • Posts: 1380
  • Karma: +79/-30
Re: Status attribute changing to 2 and back to -1
« Reply #3 on: April 06, 2018, 07:06:34 am »
Looking good so far. Thanks again.

Cheers Rene
2xVeraLite, VeraEdge, openLuup, ALTUI, 20 switches, 10 dimmers, 20 sensors, 10 scene controllers, 1 Harmony Hub, many plug-ins. Not enough time.

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6153
  • Karma: +275/-69
  • "Less is more"
Re: Status attribute changing to 2 and back to -1
« Reply #4 on: April 06, 2018, 07:42:57 am »
Thanks to you for reminding me of the issue!
______________

Edit: for the technically minded, this arose because of yet another of those bizarre Vera/MiOS design choices... although "status" appears in user_data as a normal device attribute, it is NOT, because you can't retrieve it with luup.attr_get()

This actually led to the id=user_data request returning a different status from the id=status request!  Further refactoring is underway, but this fix should be fine for the time being.
« Last Edit: April 06, 2018, 07:49:06 am by akbooer »
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P, 9x Philips Hue,
Razberry, MySensors Arduino, HomeWave, AltUI, AltHue, DataYours, Grafana, openLuup, ZWay, ZeroBrane Studio.

Offline reneboer

  • Hero Member
  • *****
  • Posts: 1380
  • Karma: +79/-30
Re: Status attribute changing to 2 and back to -1
« Reply #5 on: April 06, 2018, 09:08:10 am »
O the joy we call Vera ::)
2xVeraLite, VeraEdge, openLuup, ALTUI, 20 switches, 10 dimmers, 20 sensors, 10 scene controllers, 1 Harmony Hub, many plug-ins. Not enough time.