It’s obviously easier if you use the UI to configure all this - far fewer spelling mistakes and issues with Things files not loading properly. However, I find it much faster using configuration files!
Yes, I’m 100% config files. I use source control and an IDE to work my automation system. Maybe it’s cause I started on 1.x but I just never could get into the inbox/paperui way of doing things.
Great start. I have it pulling info in. What do you have in your vera2online.map?
Have you worked with sending back to Vera? I see everything is set to READONLY in your examples.
Thanks!
Ah, I should have shared that:
0=Online
1=Offline
2=Offline
I lose some of the nuance with the simple online/offline, but I’m not bothered.
There’s definitely one READWRITE Channel in there (SetpointTarget
), and there should be another but I made a mistake which I will correct (Status
for the relay Thing).
I’m not looking for a lot of info out of the Vera. The stuff I was seeing come back already was mostly it. I watch for on/off, temps and such and the one magic one is last poll success as I use it and expire to monitor if a zwave device goes awol. Although, I’m thinking expire is a dead v1 binding too now isn’t it
More testing to follow. THANKS!
It is, but the functionality has been pulled into the core for openHAB 3. Syntax is exactly the same, so it should work straight away for you!
Good to know. I hadn’t looked deeply into that yet as the mios binding was my show stopper. mios1 and expire1 were the two remaining legacy bindings in my setup.
I think your solution is the answer. It will take a bit of rework to convert my items over to using http but reality is it isn’t a whole lot worse than the mios binding if you didn’t use the item generator.
I was able to control an outlet and see read only data. I’ll mess with other items that I need to write back to like dimmers and such but I’m confident this will work.
Well several frustrating hours later.
I’m trying to get lastpollsuccess.
Where did you get your urls from? I tried to extrapolate from what you have.
I’m able to get lastpollsuccess with this in a browser:
In my things I used:
Type datetime: LastPollSuccess "Last Poll Success" [
mode = "READONLY",
stateExtension = "serviceId=urn:micasaverde-com:serviceId:ZWaveNetwork1&id=variableget&Variable=LastPollSuccess"
]
Which I somewhat pieced together using info at:
I get errors in openhab.log saying it cannot find the URL and the url is definitely wrong. It isn’t made up of the baseURL and the extension URL:
Doesn’t make sense, it somehow is modifying the url.
Same as you: from the lu_invoke
URL on my device, and the three links at the bottom of my previous post.
What does your baseURL
look like? Note that my stateExtension
URLs all start with &
- if they didn’t then the binding might put in a /
depending on how your baseURL
ends. Per the documentation:
When concatenating the baseURL and stateExtension or commandExtension the binding checks if a proper URL part separator (/, & or ?) is present and adds a / if missing.
Note also that issues with properly loading Things files after they have saved are still a thing in OH3.
Either restart openHAB, or do this.
Yeah, I had been putting the “&”, must have mixed that up with that particular attempt. I checked this morning and I had the & in my thing. I restarted OH and it started working so I guess I was getting trolled by the loading issue. Thanks!
Hi there,
This is the last piece I need to migrate to OH3 before I shutdown my Oh2.5 instance, but for some reason, despite many, many attempts and trying various options, I can’t get this to work.
Configured through the UI, my thing looks like this
UID: http:url:LandingLight
label: LandingLight
thingTypeUID: http:url
configuration:
authMode: BASIC
ignoreSSLErrors: true
baseURL: http://192.168.1.113:3480/data_request?id=action&output_format=text&DeviceNum=20
refresh: 30
commandMethod: GET
timeout: 3000
bufferSize: 2048
location: Landing
channels:
- id: LoadLevel
channelTypeUID: http:dimmer
label: Load Level
description: ""
configuration:
stateTransformation: "&serviceId=urn:upnp-org:serviceId:Dimming1&id=variableget\
&Variable=LoadLevelStatus"
commandTransformation: "&serviceId=urn:upnp-org:serviceId:Dimming1&action=SetLo\
adLevelTarget&newLoadlevelTarget=%2$s"
But, I get the following log output:
2021-01-27 21:09:28.186 [WARN ] [.transform.SingleValueTransformation] - Transformation service &SERVICEID=URN for pattern upnp-org:serviceId:Dimming1&id=variableget&Variable=LoadLevelStatus not found!
2021-01-27 21:09:32.228 [WARN ] [.transform.SingleValueTransformation] - Transformation service &SERVICEID=URN for pattern upnp-org:serviceId:Dimming1&action=SetLoadLevelTarget&newLoadlevelTarget=%2$s not found!
Any help much appreciated!
Cheers
James
You’re using the wrong parameters. You need stateExtension
and commandExtension
, not the transformation parameters.
Thank you @hafniumzinc, too long staring at the screen!
Updated:
channels:
- id: LoadLevel
channelTypeUID: http:dimmer
label: Load Level
description: ""
configuration:
stateExtension: "&serviceId=urn:upnp-org:serviceId:Dimming1&id=variableget&Vari\
able=LoadLevelStatus"
commandExtension: "&serviceId=urn:upnp-org:serviceId:Dimming1&action=SetLoadLev\
elTarget&newLoadlevelTarget=%2$s"
and all working, although updates are slower than they are with the mios binding - is there a recommended minimum refresh period at all?
I’m also getting the following warnings:
2021-01-28 06:46:15.350 [WARN ] [p.internal.http.HttpResponseListener] - Requesting 'http://192.168.1.113:3480/data_request?id=action&output_format=text&DeviceNum=20&serviceId=urn:upnp-org:serviceId:Dimming1&id=variableget&Variable=LoadLevelStatus' (method='GET', content='null') failed: Total timeout 3000 ms elapsed
2021-01-28 06:46:23.605 [WARN ] [p.internal.http.HttpResponseListener] - Requesting 'http://192.168.1.113:3480/data_request?id=action&output_format=text&DeviceNum=27&serviceId=urn:upnp-org:serviceId:Dimming1&id=variableget&Variable=LoadLevelStatus' (method='GET', content='null') failed: Total timeout 3000 ms elapsed
Are these anything to worry about?
Cheers
James
Great idea on the HTTP binding…I have setup a test Thing / Channel / Item, but the item isn’t updating from NULL. manually checked the base + stateExtenstion url and it works… any ideas?
Thing:
//VERA
Thing http:url:vera "Vera" [
baseURL = "http://192.168.1.1:3480/data_request?DeviceNum=1&serviceId=urn:micasaverde-com:serviceId:ZWaveNetwork1&output_format=text",
refresh = "45",
ignoreSSLErrors = "true"
]
{
Channels:
Type string: NetStatusText "Network Status" [
mode = "READONLY",
stateExtension = "&id=variableget&Variable=NetStatusText"
]
Type string: LastUpdate "Last Update" [
mode = "READONLY",
stateExtension = "&id=variableget&Variable=LastUpdate"
]
}
Item:
//VERA
String strNetStatusText "Z-Wave Network Status" <status> ["Status"] { channel="http:url:vera:NetStatusText" }
String dtVeraLastUpdate "Vera Last Update" <calendar> ["Status"] { channel="http:url:vera:LastUpdate" }
Might have jumped the gun…looks like it is working now…