EXEC Binding - Pilight commands dont work

You can use all kinds of “transformation” for parsing the payload. Easiest would be, if you can configure the homematic for a JSON payload. But Regex works also:

https://docs.openhab.org/addons/transformations.html

Number Temperature "Temperature [%.1f °C]"   { http="<[http://YOURHOMEMATICIPURL):<refreshintervalinmilliseconds>:<transformationrule>]" }
http="<[http://YOURHOMEMATICIPURL:60000:REGEX(.*\"actualTemperature\((.*)\).*)]"

(thatone is untested and I’m not the REGEX-expert. but I remember, my CCU2 having JSON already, so homematic IP should also have JSON - which would be easier to parse)

Number Temperature "Temperature [%.1f °C]"   { http="<[http://YOURHOMEMATICIPURL):<refreshintervalinmilliseconds>:<transformationrule>]" }
http="<[http://YOURHOMEMATICIPURL:60000:JSONPATH($.actualTemperature)]"

Problem is that Homematic IP has not a official API like Homematic, the python script emulates the smartphone functions.

ok - then you have to see, if my Regex-skills were good enough! :wink:

Installed the mysql peristent but connection dont work, did exact things from the tutorial:

22:31:00.282 [WARN ] [ysql.internal.MysqlPersistenceService] - mySQL: No connection to database. Can not persist item ‘Test_HumidityMYSQL (Type=NumberItem, State=92)’! Will retry connecting to database when error count:0 equals errReconnectThreshold:0
22:31:00.300 [ERROR] [ysql.internal.MysqlPersistenceService] - mySQL: Failed connecting to the SQL database using: driverClass=com.mysql.jdbc.Driver, url=jdbc:mysql://192.168.1.108:3306/openhab, user=openhab, password=*********************
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

mysql.cfg
the database url like ‘jdbc:mysql://:/’ (without quotes)
url=jdbc:mysql://192.168.1.108:3306/openhab

the database user

user=openhab

the database password

password=****************************

most likely you don’t have permission to connect to the MySQL database. This can have various reason, please have a look (my guess is 5 or internal restrictions) - Do you run your MySQL-Server on your openHAB2-server or externally?

If you get a SQLException: Connection refused or Connection timed out or a MySQL specific CommunicationsException:
Communications link failure, then it means that the DB isn’t reachable at all. This can have one or more of the following causes:

  1. IP address or hostname in JDBC URL is wrong.
  2. Hostname in JDBC URL is not recognized by local DNS server.
  3. Port number is missing or wrong in JDBC URL.
  4. DB server is down.
  5. DB server doesn’t accept TCP/IP connections.
  6. DB server has run out of connections.
  7. Something in between Java and DB is blocking connections, e.g. a firewall or proxy.

To solve the one or the other, follow the following advices:

  • Verify and test them with ping.
  • Refresh DNS or use IP address in JDBC URL instead.
  • Verify it based on my.cnf of MySQL DB.
  • Start the DB.
  • Verify if mysqld is started without the --skip-networking option.
  • Restart the DB and fix your code accordingly that it closes connections in finally.
  • Disable firewall and/or configure firewall/proxy to allow/forward the port.

Installed the mysql db on my nas with the ip 192.168.1.108 , there is already running a kodi db which is rechable from every kodi client in the network.
adress is pingable from pi.

So, did you create a database with name openhab?
Did you create a user with full access to the database?
Did you set permissions for the user to access the db from network?

Hi,

yes created the user and the db with name openhab
granted all rights / global rights to that user

And i found out that the synology msql uses port 3307, found in in the myphpadmin settings - but also didnt helped :slight_smile:

I noticed right now that phpymyadmin shows me that iam using mariadb, which is not mysql, so perhaps i should try it with another config ?

Did you set permissions for the user to access the db from network?
Which rights do you exactly mean, i need to set ?

These are the settings for my openhab user.:


Keep attention to the 2nd option 192.168.10.% this is the network the sql database and openhab reside in.

Looks it worked now, but the chart is empty. (No Errors more in Openhab Log)

If i select Default Setting in the charts widget, it should use the mariadb ?
To get any item i want is chart shown it needs to be entered in the jdbc.persist file ?



As your default persistence is jdbc, it should work out of the box.
Take a look at the database itself. There should be a table for each item persisted in jdbc.

mariadb is a fork of mysql - and works (at least for our low-level purposes) exactly like MySQL. I also have MariaDB on my Synology running and I am using the mysql-persistence. You have to tell openHAB to use it just like mysql. Meaning, if using HABPanel, it should look like this:

if your using the “Default”-Chart, it will then show only one graph - and only if there are items persisted. So, as Udo said, please have a look, whether there are any items in your DB at all. It seems as there aren’t - Then you have to check your .persist file, if you told your item (or Group for that item) to persist “onChange”, as I guess this is what you want. Otherwise you only have items states at e.g. midnight

Yes there are 6 items in the DB.

mysql_02


For testing i entered my energy usage items (TPLINKSMARTHOME PLUGS HS110) in the persistfile, but it don’t creates anything in the DB. Do i only need to add the existing Items in the *.persists file , thats all ?


I think your HmIP Device is connected to a CCU … ? for example the XML Api works for this Device too… or i’am not right ?

Nope only have Homepatic IP Gateway , ist not the CCU. I think you are confusing something :slight_smile: Homematic IP ist not TPLINK or on what you a referencing ?

My Example devices are from TPLink Smarthome , HS110 devices they are detected automaticly in openhab2 - there is a Binding for that.

Okay … Why Access Point … ? The Integration of HmIP with a CCU2 in Openhab works well …

Sure , but i bougth the new homematic ip :slight_smile:

Yes … But the HmIP works also with the CCU2 … that is what I said :wink:

and CCU2 can integrate to Openhab … und than you have all Functions you want… and no HmIP Cloud Problems :wink:

yes sure, but i dont have any ccu2 and i dont want du buy another smarthome bridge and thats not my problem at the moment :slight_smile:

My Answers are mentioned to this…

Sorry that I wanted to show you a working way … Then use the HmIP access point, which is not integrated in Openhab. What is this for a home automation, please? Openhab should be the central unit … and not a Work A Round …