Issue with manual thing configuration in Netatmo binding

Hi everybody!

Currently I’m struggeling to configure my Netatmo station properly in OpenHab2 RC 2.10.

So far I’ve configured all things and items as files, only installing the bindings on the PaperUI. However, now I ran into problems with the Netatmo things configuration. At first I would like to explain what I’ve done:

This is my netatmo.thing configuration

Bridge netatmo:netatmoapi:raspi [ clientId="client ID here", clientSecret="client secret here", username = "email address here", password = "password here", readStation=true, readThermostat=false] {
    Thing Netatmo_Innen  	 inside  	[ equipmentId="Mac-Address here", refreshInterval=60000 ]
    Thing Netatmo_Aussen	 outside  	[ equipmentId="encoded serial number here", parentId="Mac-Address of inside module here" ]
}

My netatmo.items file in the items folder looks like the following:

Number Netatmo_Innen_CO2 				"[%d ppm]" 			<carbondioxide> 			{ channel = "netatmo:NAMain:raspi:mac-address:Co2" }
Number Netatmo_Aussen_Temperature 		"[%.1f C]" 										{ channel = "netatmo:NAModule1:raspi:encoded-serial-number:Temperature" }

Now I can see the netatmo binding flagged as “online” in the PaperUI, but none of the things. The items doesn’t work as well.

When I delete the things configuration (only the stations, not the binding itself) and add the inside and outside station in the PaperUI, my items work well. Hence I’m sure that the binding itself is fine and also the item configuration. The error must lay in the things configuration, but I have no clue where.

I hope someone can relate to my issue.
Thanks in advance for your help!

Best Regards,

Percy

I ran into something similar. I think you are not allowed to change the name of the thing type.

It took me a while to find that out, but the NAModule? names seem to be fixed to what is shown in the readme:

NAModule1 = outside
NAModule2 = wind
NAModule3 = rain
NAModule4 = additional indoor station

Try the following:

Bridge netatmo:netatmoapi:raspi [ clientId="client ID here", clientSecret="client secret here", username = "email address here", password = "password here", readStation=true, readThermostat=false] {
    Thing NAMain  	 inside  	[ equipmentId="Mac-Address here", refreshInterval=60000 ]
    Thing NAModule1 	 outside  	[ equipmentId="encoded serial number here", parentId="Mac-Address of inside module here" ]
}
1 Like

Another thing I am currently fighting with: If I want to set the location of a module, I cannot use the syntax above with then “embedded” thing lines. I have to use:

Bridge netatmo:netatmoapi:home
[ clientId = "abc", clientSecret = "xyz", ... ]

Thing netatmo:NAMain:Main "Main	module"	@ "Bedroom"
[ equipmentId="12:34:56:78:90:ab", refreshInterval=60000 ]

Thing netatmo:NAModule1:Outdoor-Terasse	"Outdoor module" @ "Terasse"
[ equipmentId="020000160a8a", parentId="12:34:56:78:90:ab" ]

I can keep everything in one file, e.g. “netatmo.things” on my machine, but the syntax is a bit more verbose and I have to repeat the parentId on each item.

Hi everybody,

my findings (and problems) may be related to this.
I tried to configure my netatmo.things file as @hakan did, because I wanted to use “custom” names for the things.
However, my modules remain offline. When I take a look into the inbox, the automatic generated things look like this:

netatmo:NAModule1::<serial#-without-dots>

So I thought the thing definition in this case should look like this

Thing netatmo:NAMain::main “Main module” @ “Bedroom”
[ equipmentId=“12:34:56:78:90:ab”, refreshInterval=60000 ]
Thing netatmo:NAModule1::outdoor “Outdoor module” @ “Terasse”
[ equipmentId=“020000160a8a”, parentId=“12:34:56:78:90:ab” ]

Unfortunately, this does not work as well.

Edit:
Netatmo debug log helped me to find a solution.
Here is an netatmo.things example - hope this helps:

// Bridge configuration:
Bridge netatmo:netatmoapi:home “Netatmo API” [ clientId=“client_id”, clientSecret=“client_secret”, username = “mail”, password = “password”, readStation=true, readThermostat=false] {
// Thing configuration:
Thing netatmo:NAMain:home:main “Netatmo Main” @ “room” [ equipmentId=“main_station_id”, [refreshInterval=60000] ]
Thing netatmo:NAModule1:home:outside “Netatmo Outside” @ “room” [ equipmentId=“station_id”, parentId=“main_station_id” ]
// In case you are using a second indoor module
Thing netatmo:NAModule2:home:inside1 “Netatmo Module1” @ “room” [ equipmentId=“station_id”, parentId=“main_station_id” ]
}

Many thanks to all of you, with your help I got it working!

My current solution is based on jotpehenn’s suggestion, with one important addition:

In the things configuration I changed the names of the stations to NAMain and NAModule1:

Bridge netatmo:netatmoapi:raspi [ clientId="client ID here", clientSecret="client secret here", username = "email address here", password = "password here", readStation=true, readThermostat=false] {
    Thing NAMain  	     inside  	[ equipmentId="Mac-Address here", refreshInterval=60000 ]
    Thing NAModule1 	 outside  	[ equipmentId="encoded serial number here", parentId="Mac-Address of inside module here" ]
}

Now the things appear in the PaperUI. But my items still didn’t work until I changed my items configuration:

Number Netatmo_Innen_CO2 				"[%d ppm]" 			<carbondioxide> 			{ channel = "netatmo:NAMain:raspi:inside:Co2" }
Number Netatmo_Aussen_Temperature 		"[%.1f C]" 										{ channel = "netatmo:NAModule1:raspi:outside:Temperature" }

Instead of the mac-address and the encoded serial number, I now used the keywords “inside” and “outside” in the path of the channels. After applying these changes my items work fine.

i was hunting for errors for hours.

thanks to this post i was able to find the error.
On page
http://docs.openhab.org/addons/bindings/netatmo/readme.html#configure-things
there is show an example whereas refreshInterval=60000 is in brackets: [refreshInterval=60000].
It definitely does not work with those brackets!

Cheers

1 Like

Your naming above throws some errors in SmartHomeDesigner:

mismatched input '@' expecting '}'

Does this really work for naming and location?

I have the same Problem…
My Things are ready and online.
But my Items do not show up anywhere. Not even in the console.
(If i use the PaperUI everything works well)
This is my Things config:

// Bridge configuration
Bridge netatmo:netatmoapi:home [ clientId="xxxxxxxxxx", clientSecret="xxxxxxxxxxxx", username = "xxxxxxxxxx", password = "xxxxxx", readStation=true, readHealthyHomeCoach=false, readThermostat=false, readWelcome=false] {

        // Thing configuration:
        Thing netatmo:NAMain:home:inside "Netatmo Wohnzimmer" @ "Wohnzimmer" [ id="xx:xx:xx:xx:xx:xx" ]
        Thing netatmo:NAModule1:home:outside "Netatmo Garten" @ "Garten" [ id="yy:yy:yy:yy:yy:yy", parentId="xx:xx:xx:xx:xx:xx" ]

}

And this my Items config:

# Indoor Module
Number   NetatmoWohnzimmerTemperatur        "Temperature [%.2f °C]"     <temperature>           (ErdgeschossWohnzimmer, gTemperature)      {channel="netatmo:NAMain:home:inside:Temperature"}
Number   NetatmoWohnzimmerCo2               "Co2 [%.0f ppm]"            <carbondioxide>         (ErdgeschossWohnzimmer)                    {channel="netatmo:NAMain:home:inside:Co2"}

#Outdoor Module
Number   NetatmoAussenTemperatur            "Temperatur [%.2f °C]"      <temperature>           (ErdgeschossGarten, gTemperature)          {channel="netatmo:NAModule1:home:outside:Temperature"}

Does anyone have any ideas?

OKAY!
That was stupid!
I used the # for Commenting. like the Example in https://docs.openhab.org/addons/bindings/netatmo/readme.html
But # is an illegal Character. I replaced it with // and all worked.
Please update the Docs!