New 1.7 binding not working in OH2

257 views
Skip to first unread message

smartp...@gmail.com

unread,
Jun 29, 2015, 6:08:15 PM6/29/15
to open...@googlegroups.com
Hi

As requested, I am now testing my 1.x binding in openHAB 2 before submissting a PR.
Unfortunately, OH2 is new for me and I could have made a basic mistake.

I created a simple setup using only two bindings, NTP and my new powermax binding to be tested.
I have only one sitemap file and one item file that were extracted form my 1.x files.

When starting OH2, I see that my binding is correctly started, the configuration file is correctly read because the serial connection to the alarm system is established and all messages are correctly read and handled by the binding. The problem I have is that my items are not correctly set by the binding with a message telling me that the item is unknown ! The problem is the same for all items.

Here is what I got in my logs:

2015-06-29 20:42:13 [INFO ] [.e.s.m.c.i.ModelRepositoryImpl:86   ] - Loading model 'maisonOH2.sitemap'
2015-06-29 20:42:31 [DEBUG] [.s.u.c.i.servlet.WebAppServlet:135  ] - reading sitemap maison
2015-06-29 20:42:32 [INFO ] [.e.s.m.c.i.ModelRepositoryImpl:86   ] - Loading model 'maisonOH2.items'
2015-06-29 20:42:37 [DEBUG] [.e.s.m.i.i.GenericItemProvider:151  ] - Processing binding configs for items from model 'maisonOH2.items'
2015-06-29 20:42:38 [DEBUG] [o.b.p.internal.PowerMaxBinding:168  ] - bindingChanged(): Item Name: PorteEntree
2015-06-29 20:42:38 [WARN ] [.events.EventPublisherDelegate:85   ] - Could not process command event 'CLOSED' as item 'PorteEntree' is unknown
2015-06-29 20:42:38 [DEBUG] [o.b.p.internal.PowerMaxBinding:168  ] - bindingChanged(): Item Name: BatteriePorteEntree
2015-06-29 20:42:38 [WARN ] [.events.EventPublisherDelegate:85   ] - Could not process command event '100' as item 'BatteriePorteEntree' is unknown
2015-06-29 20:42:38 [DEBUG] [o.b.p.internal.PowerMaxBinding:168  ] - bindingChanged(): Item Name: FenetreCuisine
2015-06-29 20:42:38 [WARN ] [.events.EventPublisherDelegate:85   ] - Could not process command event 'CLOSED' as item 'FenetreCuisine' is unknown
2015-06-29 20:42:38 [DEBUG] [o.b.p.internal.PowerMaxBinding:168  ] - bindingChanged(): Item Name: BatterieFenetreCuisine
2015-06-29 20:42:38 [WARN ] [.events.EventPublisherDelegate:85   ] - Could not process command event '100' as item 'BatterieFenetreCuisine' is unknown
2015-06-29 20:42:38 [DEBUG] [o.b.p.internal.PowerMaxBinding:168  ] - bindingChanged(): Item Name: Fenetre1Salon
2015-06-29 20:42:38 [WARN ] [.events.EventPublisherDelegate:85   ] - Could not process command event 'CLOSED' as item 'Fenetre1Salon' is unknown

...

2015-06-29 20:42:39 [DEBUG] [o.b.p.internal.PowerMaxBinding:168  ] - bindingChanged(): Item Name: AlarmeArmee
2015-06-29 20:42:39 [WARN ] [.events.EventPublisherDelegate:85   ] - Could not process command event 'Disarmed' as item 'AlarmeArmee' is unknown
2015-06-29 20:42:40 [DEBUG] [o.b.p.internal.PowerMaxBinding:168  ] - bindingChanged(): Item Name: AlarmeArmee2
2015-06-29 20:42:40 [WARN ] [.events.EventPublisherDelegate:85   ] - Could not process command event 'OFF' as item 'AlarmeArmee2' is unknown
2015-06-29 20:42:40 [DEBUG] [o.b.p.internal.PowerMaxBinding:168  ] - bindingChanged(): Item Name: AlarmeMode
2015-06-29 20:42:40 [WARN ] [.events.EventPublisherDelegate:85   ] - Could not process command event 'Disarmed' as item 'AlarmeMode' is unknown
2015-06-29 20:42:40 [DEBUG] [o.b.p.internal.PowerMaxBinding:168  ] - bindingChanged(): Item Name: PGM
2015-06-29 20:42:40 [WARN ] [.events.EventPublisherDelegate:85   ] - Could not process command event 'OFF' as item 'PGM' is unknown
2015-06-29 20:42:40 [DEBUG] [o.b.p.internal.PowerMaxBinding:168  ] - bindingChanged(): Item Name: Powermax_panel_mode
2015-06-29 20:42:40 [WARN ] [.events.EventPublisherDelegate:85   ] - Could not process command event 'Standard' as item 'Powermax_panel_mode' is unknown
...



Hre is the content of my sitemap:

sitemap maison label="Accueil"
{
    Frame {
        Text label="Sécurité" icon="lock" {
            Text item=PorteEntree valuecolor=[=="OPEN"="red"]
            Text item=FenetreCuisine valuecolor=[=="OPEN"="red"]
            Text item=Fenetre1Salon valuecolor=[=="OPEN"="red"]
            Text item=Fenetre2Salon valuecolor=[=="OPEN"="red"]
            Text item=FenetreSalleAManger valuecolor=[=="OPEN"="red"]
            Text item=DetecteurSalon valuecolor=[=="OPEN"="red"]
            Text item=DetecteurGarage valuecolor=[=="OPEN"="red"]
            Text item=DetecteurPallier valuecolor=[=="OPEN"="red"]
            Text item=DetecteurChambre valuecolor=[=="OPEN"="red"]
            Switch item=AlarmeArmee mappings=[Disarmed="Désarmé", Armed="Armé"] valuecolor=[=="Armed"="green"]
            Switch item=AlarmeArmee2 mappings=[OFF="Désarmé", ON="Armé"]
            Switch item=AlarmeMode mappings=[Disarmed="Désarmé", Stay="Partiel", Armed="Armé"] valuecolor=[=="Armed"="green",=="Stay"="orange"]
            Group item=GPowerMax label="Alarme"
        }
        Text label="Batteries faibles" {
            Text item=BatteriePorteEntree visibility=[BatteriePorteEntree<100] valuecolor=[<=18="red",<=30="orange",==100="green"]
            Text item=BatterieFenetreCuisine visibility=[BatterieFenetreCuisine<100] valuecolor=[<=18="red",<=30="orange",==100="green"]
            Text item=BatterieFenetre1Salon visibility=[BatterieFenetre1Salon<100] valuecolor=[<=18="red",<=30="orange",==100="green"]
            Text item=BatterieFenetre2Salon visibility=[BatterieFenetre2Salon<100] valuecolor=[<=18="red",<=30="orange",==100="green"]
            Text item=BatterieFenetre1SalleAManger visibility=[BatterieFenetre1SalleAManger<100] valuecolor=[<=18="red",<=30="orange",==100="green"]
            Text item=BatterieDetecteurSalon visibility=[BatterieDetecteurSalon<100] valuecolor=[<=18="red",<=30="orange",==100="green"]
            Text item=BatterieDetecteurGarage visibility=[BatterieDetecteurGarage<100] valuecolor=[<=18="red",<=30="orange",==100="green"]
            Text item=BatterieDetecteurPallier visibility=[BatterieDetecteurPallier<100] valuecolor=[<=18="red",<=30="orange",==100="green"]
        }
    }
    Frame label="Date" {
        Text item=Date
    }
    Frame label="Pièces maison" {
        Group item=Rdc
        Group item=Etage
    }
}


And here is my item file:

Group All
Group GPersist (All)
Group GVoice

// Categéries

Group GSecurite "Sécurité" <lock> (All)
Group GPowerMax "Alarm" (All)
Group GBatterie "Batteries" (All)

// Pièces

Group Pieces "Pièces maison" (All)

Group Rdc "Rez de chaussée" <groundfloor> (Pieces)
Group Etage "Etage" <firstfloor> (Pieces)

Group Entree "Entrée" <corridor> (Rdc)
Group Cuisine "Cuisine" <kitchen> (Rdc)
Group SalleSejour "Salle de séjour" <sofa> (Rdc)
Group Veranda "Véranda" <terrace> (Rdc)
Group Garage "Garage" <garage> (Rdc)

Group Pallier "Pallier" (Etage)
Group Bureau "Bureau" <office> (Etage)
Group Chambre "Chambre" <bedroom> (Etage)
Group HomeCinema "Home-cinéma" <sofa> (Etage)


// Date & heure

DateTime Date "Date [%1$tA %1$td %1$tR]" <calendar> { ntp="Europe/Paris:fr_FR" }


// Entrée

Contact PorteEntree "Porte entrée [MAP(fr.map):%s]" <door> (Entree,GSecurite) {powermax="zone_status:1"}
Number BatteriePorteEntree "Batterie porte entrée [%d %%]" (GBatterie) {powermax="zone_battery_level:1"}

// Cuisine

Contact FenetreCuisine "Fenêtre cuisine [MAP(fr.map):%s]" <contact> (Cuisine,GSecurite) {powermax="zone_status:9"}
Number BatterieFenetreCuisine "Batterie fenêtre cuisine [%d %%]" (GBatterie) {powermax="zone_battery_level:9"}


// Salle de séjour

Contact Fenetre1Salon "Fenêtre 1 salon [MAP(fr.map):%s]" <contact> (SalleSejour,GSecurite) {powermax="zone_status:10"}
Number BatterieFenetre1Salon "Batterie fenêtre 1 salon [%d %%]" (GBatterie) {powermax="zone_battery_level:10"}

Contact Fenetre2Salon "Fenêtre 2 salon [MAP(fr.map):%s]" <contact> (SalleSejour,GSecurite) {powermax="zone_status:8"}
Number BatterieFenetre2Salon "Batterie fenêtre 2 salon [%d %%]" (GBatterie) {powermax="zone_battery_level:8"}

Contact FenetreSalleAManger "Fenêtre salle à manger [MAP(fr.map):%s]" <contact> (SalleSejour,GSecurite) {powermax="zone_status:7"}
Number BatterieFenetre1SalleAManger "Batterie fenêtre salle à manger [%d %%]" (GBatterie) {powermax="zone_battery_level:7"}

Contact DetecteurSalon "Détecteur salon [MAP(fr2.map):%s]" <contact> (SalleSejour,GSecurite) {powermax="zone_status:11"}
Number BatterieDetecteurSalon "Batterie détecteur salon [%d %%]" (GBatterie) {powermax="zone_battery_level:11"}

// Garage

Contact DetecteurGarage "Détecteur garage [MAP(fr2.map):%s]" <contact> (Garage,GSecurite) {powermax="zone_status:2"}
Number BatterieDetecteurGarage "Batterie détecteur garage [%d %%]" (GBatterie) {powermax="zone_battery_level:2"}


// Pallier

Contact DetecteurPallier "Détecteur pallier [MAP(fr2.map):%s]" <contact> (Pallier,GSecurite) {powermax="zone_status:12"}
Number BatterieDetecteurPallier "Batterie détecteur pallier [%d %%]" (GBatterie) {powermax="zone_battery_level:12"}


// Sécurité

String AlarmeArmee "Alarme [MAP(fr.map):%s]" (GSecurite) {powermax="partition_arm_mode", autoupdate="false"}
Switch AlarmeArmee2 "Alarme" (GSecurite) {powermax="partition_arm_mode", autoupdate="false"}
String AlarmeMode "Alarme [MAP(fr.map):%s]" (GSecurite) {powermax="partition_detailed_arm_mode", autoupdate="false"}
Switch PGM "PGM (PowerMax)" {powermax="PGM_status"}

// Visonic alarm

String Powermax_panel_mode "Panel mode [%s]" (GPowerMax) {powermax="panel_mode"}
String Powermax_partition_status "Partition status [%s]" (GPowerMax) {powermax="partition_status"}
Switch Powermax_partition_ready "Partition ready" (GPowerMax) {powermax="partition_ready"}
Switch Powermax_partition_alarm "Partition alarm" (GPowerMax) {powermax="partition_alarm"}
Switch Powermax_panel_trouble "Panel trouble" (GPowerMax) {powermax="panel_trouble"}
Switch Powermax_panel_alert_in_mem "Panel alert in memory" (GPowerMax) {powermax="panel_alert_in_memory"}
String Powermax_partition_arm_mode "Arm mode [%s]" (GPowerMax) {powermax="partition_arm_mode", autoupdate="false"}
Switch Powermax_partition_arm_mode2 "Arm mode" (GPowerMax) {powermax="partition_arm_mode", autoupdate="false"}
String Powermax_partition_detailed_arm_mode "Detailed arm mode [%s]" (GPowerMax) {powermax="partition_detailed_arm_mode", autoupdate="false"}

Switch Powermax_zone1_status "Zone 1 status" (GPowerMax) {powermax="zone_status:1"}
Contact Powermax_zone1_status2 "Zone 1 status [MAP(fr.map):%s]" (GPowerMax) {powermax="zone_status:1"}
DateTime Powermax_zone1_last_trip "Zone 1 last trip [%1$tH:%1$tM]" (GPowerMax) {powermax="zone_last_trip:1"}
Switch Powermax_zone1_bypassed "Zone 1 bypassed" (GPowerMax) {powermax="zone_bypassed:1"}
//Switch Powermax_zone1_armed "Zone 1 armed" (GPowerMax) {powermax="zone_armed:1"}
Switch Powermax_zone1_low_battery "Zone 1 low battery" (GPowerMax) {powermax="zone_low_battery:1"}
Number Powermax_zone1_battery "Zone 1 battery [%d %%]" (GPowerMax) {powermax="zone_battery_level:1"}

Switch Powermax_zone2_status "Zone 2 status" (GPowerMax) {powermax="zone_status:2"}
Contact Powermax_zone2_status2 "Zone 2 status [MAP(fr2.map):%s]" (GPowerMax) {powermax="zone_status:2"}
DateTime Powermax_zone2_last_trip "Zone 2 last trip [%1$tH:%1$tM]" (GPowerMax) {powermax="zone_last_trip:2"}
Switch Powermax_zone2_bypassed "Zone 2 bypassed" (GPowerMax) {powermax="zone_bypassed:2"}
//Switch Powermax_zone2_armed "Zone 2 armed" (GPowerMax) {powermax="zone_armed:2"}
Switch Powermax_zone2_low_battery "Zone 2 low battery" (GPowerMax) {powermax="zone_low_battery:2"}
Number Powermax_zone2_battery "Zone 2 battery [%d %%]" (GPowerMax) {powermax="zone_battery_level:2"}

Switch Powermax_zone7_status "Zone 7 status" (GPowerMax) {powermax="zone_status:7"}
Contact Powermax_zone7_status2 "Zone 7 status [MAP(fr.map):%s]" (GPowerMax) {powermax="zone_status:7"}
DateTime Powermax_zone7_last_trip "Zone 7 last trip [%1$tH:%1$tM]" (GPowerMax) {powermax="zone_last_trip:7"}
Switch Powermax_zone7_bypassed "Zone 7 bypassed" (GPowerMax) {powermax="zone_bypassed:7"}
//Switch Powermax_zone7_armed "Zone 7 armed" (GPowerMax) {powermax="zone_armed:7"}
Switch Powermax_zone7_low_battery "Zone 7 low battery" (GPowerMax) {powermax="zone_low_battery:7"}
Number Powermax_zone7_battery "Zone 7 battery [%d %%]" (GPowerMax) {powermax="zone_battery_level:7"}

Switch Powermax_zone8_status "Zone 8 status" (GPowerMax) {powermax="zone_status:8"}
Contact Powermax_zone8_status2 "Zone 8 status [MAP(fr.map):%s]" (GPowerMax) {powermax="zone_status:8"}
DateTime Powermax_zone8_last_trip "Zone 8 last trip [%1$tH:%1$tM]" (GPowerMax) {powermax="zone_last_trip:8"}
Switch Powermax_zone8_bypassed "Zone 8 bypassed" (GPowerMax) {powermax="zone_bypassed:8"}
//Switch Powermax_zone8_armed "Zone 8 armed" (GPowerMax) {powermax="zone_armed:8"}
Switch Powermax_zone8_low_battery "Zone 8 low battery" (GPowerMax) {powermax="zone_low_battery:8"}
Number Powermax_zone8_battery "Zone 8 battery [%d %%]" (GPowerMax) {powermax="zone_battery_level:8"}

Switch Powermax_zone9_status "Zone 9 status" (GPowerMax) {powermax="zone_status:9"}
Contact Powermax_zone9_status2 "Zone 9 status [MAP(fr.map):%s]" (GPowerMax) {powermax="zone_status:9"}
DateTime Powermax_zone9_last_trip "Zone 9 last trip [%1$tH:%1$tM]" (GPowerMax) {powermax="zone_last_trip:9"}
Switch Powermax_zone9_bypassed "Zone 9 bypassed" (GPowerMax) {powermax="zone_bypassed:9"}
//Switch Powermax_zone9_armed "Zone 9 armed" (GPowerMax) {powermax="zone_armed:9"}
Switch Powermax_zone9_low_battery "Zone 9 low battery" (GPowerMax) {powermax="zone_low_battery:9"}
Number Powermax_zone9_battery "Zone 9 battery [%d %%]" (GPowerMax) {powermax="zone_battery_level:9"}

Switch Powermax_zone10_status "Zone 10 status" (GPowerMax) {powermax="zone_status:10"}
Contact Powermax_zone10_status2 "Zone 10 status [MAP(fr.map):%s]" (GPowerMax) {powermax="zone_status:10"}
DateTime Powermax_zone10_last_trip "Zone 10 last trip [%1$tH:%1$tM]" (GPowerMax) {powermax="zone_last_trip:10"}
Switch Powermax_zone10_bypassed "Zone 10 bypassed" (GPowerMax) {powermax="zone_bypassed:10"}
//Switch Powermax_zone10_armed "Zone 10 armed" (GPowerMax) {powermax="zone_armed:10"}
Switch Powermax_zone10_low_battery "Zone 10 low battery" (GPowerMax) {powermax="zone_low_battery:10"}
Number Powermax_zone10_battery "Zone 10 battery [%d %%]" (GPowerMax) {powermax="zone_battery_level:10"}

Switch Powermax_zone11_status "Zone 11 status" (GPowerMax) {powermax="zone_status:11"}
Contact Powermax_zone11_status2 "Zone 11 status [MAP(fr2.map):%s]" (GPowerMax) {powermax="zone_status:11"}
DateTime Powermax_zone11_last_trip "Zone 11 last trip [%1$tH:%1$tM]" (GPowerMax) {powermax="zone_last_trip:11"}
Switch Powermax_zone11_bypassed "Zone 11 bypassed" (GPowerMax) {powermax="zone_bypassed:11"}
//Switch Powermax_zone11_armed "Zone 11 armed" (GPowerMax) {powermax="zone_armed:11"}
Switch Powermax_zone11_low_battery "Zone 11 low battery" (GPowerMax) {powermax="zone_low_battery:11"}
Number Powermax_zone11_battery "Zone 11 battery [%d %%]" (GPowerMax) {powermax="zone_battery_level:11"}

Switch Powermax_zone12_status "Zone 12 status" (GPowerMax) {powermax="zone_status:12"}
Contact Powermax_zone12_status2 "Zone 12 status [MAP(fr2.map):%s]" (GPowerMax) {powermax="zone_status:12"}
DateTime Powermax_zone12_last_trip "Zone 12 last trip [%1$tH:%1$tM]" (GPowerMax) {powermax="zone_last_trip:12"}
Switch Powermax_zone12_bypassed "Zone 12 bypassed" (GPowerMax) {powermax="zone_bypassed:12"}
//Switch Powermax_zone12_armed "Zone 12 armed" (GPowerMax) {powermax="zone_armed:12"}
Switch Powermax_zone12_low_battery "Zone 12 low battery" (GPowerMax) {powermax="zone_low_battery:12"}
Number Powermax_zone12_battery "Zone 12 battery [%d %%]" (GPowerMax) {powermax="zone_battery_level:12"}

Switch Powermax_PGM_status "PGM status" (GPowerMax) {powermax="PGM_status"}
Contact Powermax_PGM_status2 "PGM status [MAP(fr.map):%s]" (GPowerMax) {powermax="PGM_status"}

Switch Powermax_X10_1_status "X10 1 status" (GPowerMax) {powermax="X10_status:1"}
Contact Powermax_X10_1_status2 "X10 1 status [MAP(fr.map):%s]" (GPowerMax) {powermax="X10_status:1"}


What could be the reason of my problem ?

Kai Kreuzer

unread,
Jun 30, 2015, 11:08:44 AM6/30/15
to open...@googlegroups.com
This looks to me as if you are sending commands from within the BindingProvider when processing binding configuration strings?
If this is the case, that this is imho a bad practice; the items are not yet added to the ItemRegistry, when the binding configurations are processed. Does this work in openHAB 1?

Regards,
Kai


--
You received this message because you are subscribed to the Google Groups "openhab2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openhab2+u...@googlegroups.com.
To post to this group, send email to open...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openhab2/78cc77cb-ea58-4b28-a0dc-6871c51cbf8f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

lolodomo

unread,
Jun 30, 2015, 3:24:03 PM6/30/15
to open...@googlegroups.com
In fact; I am in the method bindingChanged inherited from AbstractActiveBinding<PowerMaxBindingProvider>.

The "problem" I have is that sometimes (depending on platform) my binding is running and starting handling data before the OH items are ready. So I store the data in memory (currentState variable) and as soon as the items are ready, my wish is to update all the items.
Using bindingChangedmethod looked like a good idea and it was apparently working well in OH1.
If not the right trigger to do that, what would be the best practice for a first initialization of items ?


Here is a part of my code:

    @Override
    public void bindingChanged(BindingProvider provider, String itemName) {
        logger.debug("bindingChanged(): Item Name: {}", itemName);

        if (provider.getItemNames().size() >= itemCount) {
            // Not an item removed
            updateItemFronState(itemName, currentState);
        }
        itemCount = provider.getItemNames().size();
    }

    private synchronized void updateItemFronState(String name, PowerMaxState state) {
        //logger.debug("updateItemFronState: {}", state.toString());

        for (PowerMaxBindingProvider provider : providers) {
            for (String itemName : provider.getItemNames()) {
                if ((name == null) || itemName.equals(name)) {
                    State itemState = null;

                    PowerMaxBindingConfig config = provider.getConfig(itemName);
                    Integer num = config.getSelectorIntParam();
                    Item item = config.getItem();

                    switch (config.getSelectorType()) {
                    case PANEL_MODE:
                        if ((item instanceof StringItem)
                                && (state.getPanelMode() != null)) {
                            itemState = new StringType(state.getPanelMode());
                        }
                        break;
                    case PARTITION_STATUS:
                        if ((item instanceof StringItem)
                                && (state.getStatusStr() != null)) {
                            itemState = new StringType(state.getStatusStr());
                        }
                        break;
                    default:
                        break;
                    }

                    if (itemState != null) {
                        eventPublisher.postUpdate(itemName, itemState);
                    }
                }
            }
        }

        currentState.merge(state);
    }

Kai Kreuzer

unread,
Jul 1, 2015, 5:33:59 AM7/1/15
to open...@googlegroups.com
Thanks a lot - I have digged into the code and found out that this is indeed a problem within the compatibility layer, which I will try to address:

So no need to change your code - just wait for the issue to be fixed and then retest.
Thanks for your efforts; this is exactly the kind of thing that I want to find out about :-)

Regards,
Kai

--
You received this message because you are subscribed to the Google Groups "openhab2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openhab2+u...@googlegroups.com.
To post to this group, send email to open...@googlegroups.com.

lolodomo

unread,
Aug 1, 2015, 5:22:12 PM8/1/15
to openhab2
Hi Kau,

I tested again with the last nightly build.

Unfortunately, it still does not work.

Here is a part of my logs:


2015-08-01 22:53:38 [INFO ] [.e.s.m.c.i.ModelRepositoryImpl:86   ] - Loading model 'maisonOH2.items'
2015-08-01 22:53:44 [DEBUG] [.e.s.m.i.i.GenericItemProvider:151  ] - Processing binding configs for items from model 'maisonOH2.items'
2015-08-01 22:53:44 [DEBUG] [o.b.p.internal.PowerMaxBinding:211  ] - bindingChanged(): Item Name: PorteEntree
2015-08-01 22:53:44 [DEBUG] [o.b.p.internal.PowerMaxBinding:212  ] - Provider items count: 1
2015-08-01 22:53:45 [DEBUG] [o.b.p.internal.PowerMaxBinding:211  ] - bindingChanged(): Item Name: BatteriePorteEntree
2015-08-01 22:53:45 [DEBUG] [o.b.p.internal.PowerMaxBinding:212  ] - Provider items count: 2
2015-08-01 22:53:45 [DEBUG] [o.b.p.internal.PowerMaxBinding:211  ] - bindingChanged(): Item Name: FenetreCuisine
2015-08-01 22:53:45 [DEBUG] [o.b.p.internal.PowerMaxBinding:212  ] - Provider items count: 3
2015-08-01 22:53:45 [DEBUG] [o.b.p.internal.PowerMaxBinding:211  ] - bindingChanged(): Item Name: BatterieFenetreCuisine
...
2015-08-01 22:53:47 [DEBUG] [s.c.internal.items.ItemUpdater:76   ] - Received update for non-existing item: Item 'PorteEntree' could not be found in the item registry
...
2015-08-01 22:53:47 [DEBUG] [s.c.internal.items.ItemUpdater:76   ] - Received update for non-existing item: Item 'BatteriePorteEntree' could not be found in the item registry
...
2015-08-01 22:53:47 [DEBUG] [s.c.internal.items.ItemUpdater:76   ] - Received update for non-existing item: Item 'FenetreCuisine' could not be found in the item registry
...
2015-08-01 22:53:47 [DEBUG] [s.c.internal.items.ItemUpdater:76   ] - Received update for non-existing item: Item 'BatterieFenetreCuisine' could not be found in the item registry
...
2015-08-01 22:53:53 [DEBUG] [.e.s.m.i.i.GenericItemProvider:130  ] - Read items from model 'maisonOH2.items'


Ok, so during the loading of my items, bindingChanged() is called for each of them and I send an update of the item at this time. The update is rejected because item is not found in the item registry.
At which time, the item is added to the item registry ?

Regards

lolodomo

unread,
Aug 10, 2015, 2:59:41 AM8/10/15
to openhab2
Hi Kai.

What's your analysis of my problem ?

Kai Kreuzer

unread,
Aug 10, 2015, 11:01:02 AM8/10/15
to openhab2

What's your analysis of my problem ?


I have no clue. What I see is that in openHAB 1, the items are added to the registry after notifying the binding readers as well: https://github.com/openhab/openhab/blob/aa453bf29b313dcd216d0adb839363be56ab4080/bundles/model/org.openhab.model.item/src/org/openhab/model/item/internal/GenericItemProvider.java#L390
So I don't know why it works there, but causes a problem on openHAB 2... If you have any idea when debugging, let me know! 
Reply all
Reply to author
Forward
0 new messages