ruebox / openhab2-addons

Add-ons for openHAB 2.x
Eclipse Public License 1.0
16 stars 6 forks source link

Snapshot - 100418 #35

Closed ruebox closed 6 years ago

ruebox commented 6 years ago

New snapshot with the following fixes based on commit 2991ac3660353353ae2587d2ad2be9e795196236 is available.

! Please remove all configured things first!

Improvements:

Fixes:

Please checkout the jar and provide feedback what is working and what not.

Note how to identify update channels:

  1. Configure bridge with debug logging: image image
  2. Perform an action of a single device
  3. Open update.csv e.g /tmp/update.csv
  4. check the events for the specific device serial number
  5. Report correct odp-channel to @ruebox for a deviceId/type and action

Please use the new update.csv to provide me more insights on the updated channels for the different devices your have: e.g.

Updated percentage of raffstore with deviceId=B001:
2018.04.10.22.01.11 ; ABB260851E51 ; ch0003 ; odp0001 ; 14 ; 

Thx in advance for your support and patient. Hope we are reaching the baseline on stability and well working things :-)

org.openhab.binding.freeathome-2.0.0-SNAPSHOT-100418.jar.zip

TheSpirit commented 6 years ago

did a quick test with my roller shutter deviceId=1013. moving via percentage works. but if i move the blinds via the local button, the percentage in openhub is not updated. how can i help you with this problem? where can i find the update.csv?

lassem commented 6 years ago

I can't seem to produce the update.csv file.

ruebox commented 6 years ago

@lassem @TheSpirit: I updated the "release note" with instructions how to generate the update.csv.

@TheSpirit I would assume that the update might not work yet, as your deviceId might have a different odp-channel than my raffstores with deviceID=B001.

It would be great if you could provide me the result of update.csv and the deviceID. Thx.

TheSpirit commented 6 years ago

just tried like you told, but there is no update.csv generated

ruebox commented 6 years ago

@TheSpirit Do you see update_X.xml at /tmp/

TheSpirit commented 6 years ago

@ruebox there is no update_X.xml at /tmp/

ruebox commented 6 years ago

@TheSpirit strange. It is just working for me. If debug logging is activated, it should work. Did you check to restart the instance ...

TheSpirit commented 6 years ago

@ruebox debug logging is activated. How can I restart the instance?

ruebox commented 6 years ago

I mean just stop and start openhab ... I will check it ...

lassem commented 6 years ago

I have debug logging as well and have restarted the service on my ubuntu 16.04 using sudo systemctl restart openhab2.service but still no update.csv file.

TheSpirit commented 6 years ago

@ruebox Did this a few times already

lassem commented 6 years ago

I do get getAll.xml and settings.json fwiw.

TheSpirit commented 6 years ago

@lassem same here

ruebox commented 6 years ago

Hmm strange. are there any errors in the log? Just give me some minutes.

ruebox commented 6 years ago

Did you remove the bridge and readded it again or just installed the new binding and restarted oh

Note: If you store the openhab thingId in clipboard and reuse it after adding the bridge again. It is properly connected to already existing things.

lassem commented 6 years ago

This chunk of code doesn't by any chance exclude anything? https://github.com/ruebox/openhab2-addons/blob/c7e5ea52a30d1b1d2d1988a2545fd9322a83ad90/addons/binding/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathome/handler/FreeAtHomeRaffStoreHandler.java#L125

ruebox commented 6 years ago

is your logdir /tmp/ with all the slashes?

lassem commented 6 years ago

I can try to re-add the bridge. And yes /tmp/ is my logdir.

lassem commented 6 years ago

Still nothing :-/ I've set up 1 thermostat and 1 screen actuator.

ruebox commented 6 years ago

The logs are only written if you get update messages from xmpp server ... Please just check what happens if you change the target temperature at the thermostat

lassem commented 6 years ago

I have this side-project where I grab updates from Free@Home and push them to nibeuplink api (my heatpump). In order to receive updates via XMPP I had to announce my presence:

 // using xmpp.rocks
 private void announcePresence() {
        client.sendPresence(new Presence());
    }

You don't have to do that?

lassem commented 6 years ago

My thermostats post update-events roughly every 5s so that should not be a problem. I will however try.

lassem commented 6 years ago

Still no update.csv .... This is so weird.

ruebox commented 6 years ago

should work like this ... at least I get log messages in the oh log if an update event occurs. Do you see it in the logs?

m_XmppClient.addInboundPresenceListener(e -> logger.debug("Received: " + e.getPresence()));
m_XmppClient.addInboundPresenceListener(e -> onPresenceEvent(e));

    private void onPresenceEvent(PresenceEvent e) {
        Presence presence = e.getPresence();
        // EntityCapabilities c = presence.getExtension(EntityCapabilities.class);
        if (presence.getType() == Presence.Type.SUBSCRIBE) {
            logger.debug(presence.toString());
        }
        m_XmppClient.getManager(PresenceManager.class).approveSubscription(presence.getFrom());
        logger.debug(presence.toString());

    }
lassem commented 6 years ago

openhab.log.zip

Something is going on.

TheSpirit commented 6 years ago

I just saw that my roller device has the channel “percentage” but as type DIMMER and not as type ROLLERSHUTTER. Why is the type DIMMER? If the type is DIMMER I am unable to link it with other items of type rollershutter.

ruebox commented 6 years ago

@lassem @TheSpirit thanks for the feedback. I will generate a new version to get more insights to the update mechanisms.

Please find some more comments on pubsub/TalkBack on #11

TheSpirit commented 6 years ago

just checked if the channel and ouput number is correct to get update from the sys app to openhab. everything looks fine, but i don´t get any update within openhab when pressing the button of my ruffstore

TheSpirit commented 6 years ago

any update?

ruebox commented 6 years ago

Hi there, Sorry for the silence ... Just quite busy for the moment.Try to catch up the presence events during the week to provide a new snapshot perhaps before the weekend Best

ruebox commented 6 years ago

close due to new snapshot #40