Author Topic: Adding "State Changed" Event to Floorplan  (Read 7519 times)

Matthew

  • Douchebag
  • Addicted
  • *
  • Posts: 567
    • View Profile
Adding "State Changed" Event to Floorplan
« on: January 09, 2008, 02:02:15 pm »
Discussion of  "    
Proper support for non-one.zero state devices (blinds,dimmable lights,etc..)
" progressed into Mantis bug 0003456: Adding generic "state changed" event would ease support for new various devices to LMCE. Discussion there is about to implement such a change, but there's some more discussion before leaping to the coding keyboard. Let's discuss it here before returning to the Mantis discussion with a more specific plan in mind, for the much more focused discussion that is appropriate to Mantis.

The latest state of play:

Matthew

  • Douchebag
  • Addicted
  • *
  • Posts: 567
    • View Profile
Re: Adding "State Changed" Event to Floorplan
« Reply #1 on: January 09, 2008, 02:03:25 pm »
Discussion of  "    
Proper support for non-one.zero state devices (blinds,dimmable lights,etc..)
" progressed into Mantis bug 0003456: Adding generic "state changed" event would ease support for new various devices to LMCE. Discussion there is about to implement such a change, but there's some more discussion before leaping to the coding keyboard. Let's discuss it here before returning to the Mantis discussion with a more specific plan in mind, for the much more focused discussion that is appropriate to Mantis.

The latest state of play:
I'm bottlenecked for the moment. My first priority has been to install and try out 0710b2, and I've been stuck for a week just doing that. Once I've got it, I need a development environment set up. Then in the context of the existing code I can figure out just which technique is the right one (desired effect and maintainability) to update the code as has been helpfully indicated in this thread. But I'm still getting the app installed, which will be followed by the code installed. However, I think today might be the big day.

In the meantime, we should indeed discuss the impact of this change on the design. C++ is not a language for writing "off the top of your head", unless you're a really inspired expert (I have my moments, but I haven't coded in it fulltime for several years...). C++ demands that you do at least some design upfront, you you'll go down the wrong road, and find later that you can't get where you're going now the way you went. But since there's already quite a bit of design implicit in the existing code, and this change looks more like an increment, it's just probably a matter of an hour or so, not a week, to design the implementation of the change without being reckless.

Meanwhile, this Mantis thread is not the place to discuss anything but what we're actually doing to fix the bug. I've started a new Developers forum topic to discuss the design. I'll chime in (probably later today) when I can roll up my sleeves on this. In the meantime, it is appropriate to talk about whether this incremental feature ("state changed" on floorplan) is best added as already discussed (narrow facility), or would be better addressed with some greater redesign of the system, as it represents crossing some threshold into a greater class of functionality. And whether we should just increment it now for 0710 (most likely) and spend more time (and get more varied advice) on a redesign for a more full-featured facility in the next version (ie. 0804).

I don't want to be a buzzkill, especially when others are offering help and insights while I'm not ready to code this minute. But, as the apparently sole C++ expert in this group right now, I can at least stop us from doing the worst things that a C++ project ever does: rush right into ad hoc coding without planning for the consequences.

bulek

  • Administrator
  • wants to work for LinuxMCE
  • *****
  • Posts: 909
  • Living with LMCE
    • View Profile
Re: Adding "State Changed" Event to Floorplan
« Reply #2 on: January 09, 2008, 02:35:27 pm »
Discussion of  "    
Proper support for non-one.zero state devices (blinds,dimmable lights,etc..)
" progressed into Mantis bug 0003456: Adding generic "state changed" event would ease support for new various devices to LMCE. Discussion there is about to implement such a change, but there's some more discussion before leaping to the coding keyboard. Let's discuss it here before returning to the Mantis discussion with a more specific plan in mind, for the much more focused discussion that is appropriate to Mantis.

The latest state of play:
I'm bottlenecked for the moment. My first priority has been to install and try out 0710b2, and I've been stuck for a week just doing that. Once I've got it, I need a development environment set up. Then in the context of the existing code I can figure out just which technique is the right one (desired effect and maintainability) to update the code as has been helpfully indicated in this thread. But I'm still getting the app installed, which will be followed by the code installed. However, I think today might be the big day.

In the meantime, we should indeed discuss the impact of this change on the design. C++ is not a language for writing "off the top of your head", unless you're a really inspired expert (I have my moments, but I haven't coded in it fulltime for several years...). C++ demands that you do at least some design upfront, you you'll go down the wrong road, and find later that you can't get where you're going now the way you went. But since there's already quite a bit of design implicit in the existing code, and this change looks more like an increment, it's just probably a matter of an hour or so, not a week, to design the implementation of the change without being reckless.

Meanwhile, this Mantis thread is not the place to discuss anything but what we're actually doing to fix the bug. I've started a new Developers forum topic to discuss the design. I'll chime in (probably later today) when I can roll up my sleeves on this. In the meantime, it is appropriate to talk about whether this incremental feature ("state changed" on floorplan) is best added as already discussed (narrow facility), or would be better addressed with some greater redesign of the system, as it represents crossing some threshold into a greater class of functionality. And whether we should just increment it now for 0710 (most likely) and spend more time (and get more varied advice) on a redesign for a more full-featured facility in the next version (ie. 0804).

I don't want to be a buzzkill, especially when others are offering help and insights while I'm not ready to code this minute. But, as the apparently sole C++ expert in this group right now, I can at least stop us from doing the worst things that a C++ project ever does: rush right into ad hoc coding without planning for the consequences.

Hi,

I agree with your discussion. But if some of main develoepers agreed on the way, what and how to change, I see no apparent obstacles not to do it...
The main thing to be done is to leave hardcoded things in plugins - so current support for currently supported devices will stay. The main change is ability to have additional device data in templates (first one to say "I wanna be on floorplan, serach text to display where I'm pointing to" and second one with proper text to be displayed (latter can be omitted if you point first one to already existing device data - like state for instance...)

I know that probably whole thing of floorplans needs to be redesigned, but that is slow process. Also, probably whole system could be redesigned - but that would be major step back (maybe even needed)....

Currently only few people know LMCE's internals. In my humble opinion we should go with this change, get to know internals better and start discussion on how to organize it better, if possible and needed at all. Right now, I just recognize major bottleneck in ability to interface with various devices and ability to show only few of them on floorplans...

Maybe you don't need everything compiled to make only this change. Maybe we can send diffs to Chris and he will revise them and try... I'm also bad programmer by myself (watchout, there is smaller part of my programming in Motion wrapper  ??? ), but these are small changes if I understand right and they won't do much harm, beside increasing amount of code a bit...

I'd suggest if we start exposing parts of code that would need those additions and discuss on those examples... ?

HTH,

regards,

Rob.
Thanks in advance,

regards,

Bulek.

ddamron

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 962
    • View Profile
    • My LinuxMCE User Page
Re: Adding "State Changed" Event to Floorplan
« Reply #3 on: January 09, 2008, 03:13:20 pm »
k.  My attempts in mantis were to get the ball rolling.

I'm not a C++ programmer. I admit it.  but I AM able to get things 'started'.

I didn't mean to step on toes.. my interpretation is almost exactly the same as Bulek's...
'We have Authority AND blessing of pluto to attempt it..'
my coding may be in error, at least it's a start...

My thoughts...

Dan
The only intuitive interface is the nipple.  After that it's all learned.
My other computer is your windows box.
I'm out of my mind.  Back in 5 minutes.
Q:  What's Red and smells like blue paint?

A:  Red Paint.

ddamron

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 962
    • View Profile
    • My LinuxMCE User Page
Re: Adding "State Changed" Event to Floorplan
« Reply #4 on: January 09, 2008, 03:22:37 pm »
Richard:

I see where you're going with your LOOONG message, but I think your missing the WHOLE goal of this change:

ALL we want to do is DISPLAY information on the floorplan.  THAT'S IT.
That's what the mantis bugreport is about, and that's ALL we should do.

What you're proposing is a LOT MORE COMPLEX than it needs to be.

Keep in mind, the main goal here:  to DISPLAY INFO ON THE FLOORPLAN. ... not to add the possibility of expanding toggle buttons, device configuration reports, or any of that other stuff..

<NO FLAME intended...>

Regards,
Dan
The only intuitive interface is the nipple.  After that it's all learned.
My other computer is your windows box.
I'm out of my mind.  Back in 5 minutes.
Q:  What's Red and smells like blue paint?

A:  Red Paint.

Matthew

  • Douchebag
  • Addicted
  • *
  • Posts: 567
    • View Profile
Re: Adding "State Changed" Event to Floorplan
« Reply #5 on: January 09, 2008, 03:52:57 pm »
I think we should just patch up the existing 0710 floorplan support to add the specific features as Chris/Ender specified. But we should meanwhile discuss how to redesign floorplan support of these states/events/devices, and in general, for a next version.

If we quickly patch 0710 like that, we can move promptly to the redesign. And if 0710 takes much longer to release, who knows - the redesign might make it into "0710" - especially of we have to start calling it "0804" :).

Matthew

  • Douchebag
  • Addicted
  • *
  • Posts: 567
    • View Profile
Re: Adding "State Changed" Event to Floorplan
« Reply #6 on: January 09, 2008, 04:25:51 pm »
k.  My attempts in mantis were to get the ball rolling.

I'm not a C++ programmer. I admit it.  but I AM able to get things 'started'.

I didn't mean to step on toes.. my interpretation is almost exactly the same as Bulek's...
'We have Authority AND blessing of pluto to attempt it..'
my coding may be in error, at least it's a start...

I don't feel like you've stepped on my toes at all. But the main benefit of C++ experience is to know that it requires design. That's also the main benefit of programming in C++: since it requires design, you get design in your code. Which improves the code independently of any intrinsic language features.

But like I said, there's already design inherent in the code we're updating. So the extra design for the change should be minimal, and probably already mostly done by Chris/Ender's directions. However, implementing it by throwing some new, undesigned C++ code at it, then debugging starting with that code, is a recipe for unexpected consequences. We should just fix the existing code.

FWIW, if someone can help me finally get past the problems I'm having getting 0710 to install from a DVD ISO file, I can move on to help write this Floorplan state fix and finish it.

Matthew

  • Douchebag
  • Addicted
  • *
  • Posts: 567
    • View Profile
Re: Adding "State Changed" Event to Floorplan
« Reply #7 on: January 09, 2008, 08:08:03 pm »
FWIW, if someone can help me finally get past the problems I'm having getting 0710 to install from a DVD ISO file, I can move on to help write this Floorplan state fix and finish it.

OK, I'm up and running with 0710b2 :). As soon as I get some jollies finally using this long-awaited beast, I'll get up the dev environment to revise its src and test it against the (reinstallable) baseline.

Matthew

  • Douchebag
  • Addicted
  • *
  • Posts: 567
    • View Profile
Re: Adding "State Changed" Event to Floorplan
« Reply #8 on: January 13, 2008, 02:58:43 pm »
FWIW, if someone can help me finally get past the problems I'm having getting 0710 to install from a DVD ISO file, I can move on to help write this Floorplan state fix and finish it.

OK, I'm up and running with 0710b2 :). As soon as I get some jollies finally using this long-awaited beast, I'll get up the dev environment to revise its src and test it against the (reinstallable) baseline.

OK, I've poked around enough in 0710 to get started. And I've downloaded the source from the Charon Media SVN according to the wiki "Source Code" article. I do get some build errors (in KDE, launch_manager, and SimplePhone), but I'm going to start working on this "State Changed Event to Floorplan" C++ code anyway. Probably have something like a first cut, or call for help on some roadblock, either tonight/Eastern or tomorrow.

I also want to add Bluetooth speakers to device and Floorplan management. If I can get some help making the "new Bluetooth device" detection monitor call depended LMCE devices like SlimServer the way that the DHCPd plug & play detection monitor does, as I ask in that Bluetooth speakers topic, I'd like to make Floorplan management of them depend on the revision we're making to the Floorplan/event integration.

bulek

  • Administrator
  • wants to work for LinuxMCE
  • *****
  • Posts: 909
  • Living with LMCE
    • View Profile
Re: Adding "State Changed" Event to Floorplan
« Reply #9 on: January 13, 2008, 03:34:42 pm »
FWIW, if someone can help me finally get past the problems I'm having getting 0710 to install from a DVD ISO file, I can move on to help write this Floorplan state fix and finish it.

OK, I'm up and running with 0710b2 :). As soon as I get some jollies finally using this long-awaited beast, I'll get up the dev environment to revise its src and test it against the (reinstallable) baseline.

OK, I've poked around enough in 0710 to get started. And I've downloaded the source from the Charon Media SVN according to the wiki "Source Code" article. I do get some build errors (in KDE, launch_manager, and SimplePhone), but I'm going to start working on this "State Changed Event to Floorplan" C++ code anyway. Probably have something like a first cut, or call for help on some roadblock, either tonight/Eastern or tomorrow.
...

Great, I'll try to help you as much as I can...

regards,

Bulek.
Thanks in advance,

regards,

Bulek.

ddamron

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 962
    • View Profile
    • My LinuxMCE User Page
Re: Adding "State Changed" Event to Floorplan
« Reply #10 on: February 03, 2008, 06:11:49 am »
Is there any progress on this?

Regards,

Dan
The only intuitive interface is the nipple.  After that it's all learned.
My other computer is your windows box.
I'm out of my mind.  Back in 5 minutes.
Q:  What's Red and smells like blue paint?

A:  Red Paint.