Jump to content

Vera Home Automation Plugin (Emby Vera)


chef
 Share

Recommended Posts

But, as soon as I add and configure it... The UUID isn't saved to the XML under the setup device. I guess that is the proplem. I will try and manually enter it and see if it fixes my issue.

 

Manually added it, saved. As soon as the device is sensed... The XML looses the UUID.

 

Edited and saved (manually cut pasted the uuid and saved)...

<SavedDeviceProfiles>    <SavedDevice>      <DeviceName>THEATERXBOX</DeviceName>      <DeviceId>uuid:925885d2-cebf-4416-a312-1067eedd8690</DeviceId>      <MoviesPlaybackStarted />      <MoviesPlaybackStopped />      <MoviesPlaybackPaused />      <MoviesPlaybackUnPaused />      <SeriesPlaybackStarted />      <SeriesPlaybackStopped />      <SeriesPlaybackPaused />      <SeriesPlaybackUnPaused />      <MusicPlaybackStarted />      <MusicPlaybackStopped />      <MusicPlaybackPaused />      <MusicPlaybackUnPaused />      <SessionStarted>Black Lights On</SessionStarted>      <SessionEnded>Black Lights Off</SessionEnded>      <UserAuthenticated />    </SavedDevice>
After the Xbone is powered off...
<SavedDeviceProfiles>    <SavedDevice>      <DeviceName>THEATERXBOX</DeviceName>      <DeviceId />      <MoviesPlaybackStarted />      <MoviesPlaybackStopped />      <MoviesPlaybackPaused />      <MoviesPlaybackUnPaused />      <SeriesPlaybackStarted />      <SeriesPlaybackStopped />      <SeriesPlaybackPaused />      <SeriesPlaybackUnPaused />      <MusicPlaybackStarted />      <MusicPlaybackStopped />      <MusicPlaybackPaused />      <MusicPlaybackUnPaused />      <SessionStarted>Black Lights On</SessionStarted>      <SessionEnded>Black Lights Off</SessionEnded>      <UserAuthenticated />    </SavedDevice>
When the Xbone is turned back on, the above saved configuration is what the app is using. Can you fix this @@chef Edited by Xzener
  • Like 1
Link to comment
Share on other sites

Oops... I just edited the above post, the XML got jumbled up. Basically, the app isn't saving the uuid to the device configuration.

  • Like 1
Link to comment
Share on other sites

Yep I can fix it.

 

Just out of curiosity...Have you tried to remove the xbox from the saved devices and then re-add it?

  • Like 1
Link to comment
Share on other sites

Argh! It took a while @@Xzener, but I found the problem. I used "Length" instead of "Count" in a line of code.

 

I should have a fix.

 

Also, issue seems to happen if the user "adds" the device from the Device List, and then if they turn the device OFF without finishing the set configuration, then the ID doesn't save.

 

I'll fix that too.

  • Like 1
Link to comment
Share on other sites

@@Xzener.

 

Do you think it would be bad to make it so the device has to be on if you want to edit the scenes you attach to it.

 

For instance, the Xbox One must be running in order to change the Scenes for playback??

 

It isn't absolutely necessary, but it would stop a bunch of coding headaches.

 

I've almost fixed it in any case.

Link to comment
Share on other sites

I would steer around the headaches. If it is better to have the client on, then so be it. Just make sure there is a blurb stating that so people dont think their setup is hosed. Maybe a popup when selecting an offline client reminding them to turn it on... Or, just have an offline indicator with the edit feature greyed out.

  • Like 1
Link to comment
Share on other sites

I went a head and made it so it doesn't matter if the device is on after you set it up, but it must be on the first time you set it up (as usual).

 

My apologize to everyone, but you're going to have to re-setup everything.

 

I have added a "List(Of MediaBrowserNetworkDevice)" to the Profiles Entry in the XML which is how editing can happen without the device ON, but is also how I have tried to fix the ID's not carrying over top the editing page.

 

I really hope this fixes things. I haven't had any issues testing it for the past couple hours, so I can only hope no one runs into problems.

 

@@Xzener, hope the setup isn't a problem. By adding the New List info to the Profiles, the old XML file will probably not work.

 

There is going to be another update soon, with some extra configuration options I have meant to put into the plugin... but I should wait to make sure these fixes actually work. :)

Edited by chef
  • Like 1
Link to comment
Share on other sites

After installing the new update, the devices were not saved... But when I added one, the previously saved settings were already there. Uninstalled/deleted the app and configuration to start from scratch. All is going well now... But my Vera Lite is not communicting with my devices. Ugh!!! If its not one thing its another... Will report back soon.

  • Like 1
Link to comment
Share on other sites

Right! The XML is going to have to be deleted for the new setup. Hopefully that doesn't get to confusing.

 

It was actually some quick thinking that fixed the problem.

 

Usually the .net code will process most of the work, but in order to configure IDs properly I had to create a "name" and "I'd" variable in each HTML button and fill the info with jquery when a new device was added. Then save those variables back to the XML when the button was pressed, to sort out the information back in .net...seemed advanced at the time.

Link to comment
Share on other sites

Well, the app is back to showing ALL connected devices (IE, Edge, Chrome, DLNA, etc) instead of all Emby clients. This makes it super confusing/overwhelming to setup anything.

 

Capture_zps1l1hwwit.png

Edited by Xzener
Link to comment
Share on other sites

The pic shows many conected devices. There are no running clients, the only useful item is DLNA. All others are just confusing me.

 

So are we supposed to setup the device as opposed to a specific emby client? So, any emby client on the device (MBT, Kodi, Win8.1, etc) have the same Vera commands sent to the Zwave devices in the room?? I'm confused.

 

The initial problem is fixed for the Xbone, well done @@chef... Just confused on how to re-setup my theater room. I will figure it out... I assume its "THEATERROOM". Yep, that's the one.

 

Everything is working as it should now. Nice work Chef.

Edited by Xzener
Link to comment
Share on other sites

That is a huge list! Are all those devices real or are they duplicated?

 

It is set up by client. I keep saying devices because I am use to using X one and chromecast DLNA. I could try to shorten the list to actual devices.

Edited by chef
Link to comment
Share on other sites

I have a server, 2 HTPCs, 2 laptops, 3 tablets, phones... The list goes on. None of these except for Edge and IE had active clients running. The Xbones are DLNA so that makes sense. I'm guessing the others are UUIDs of the powered on devices?? It would be a much shorter list if they were active Emby clients. But if that isn't possible, it's fine. My setup is now good to go. Thanks for the quick fix.

  • Like 1
Link to comment
Share on other sites

So, if you guys use Xbox One and only just revived the new dashboard update, then be aware that the Xbox one changes its uuid number after the update. You will have to set up Vera to connect with the new uuid. Meaning just set up the Xbox again the the configuration editor with your scenes.

Link to comment
Share on other sites

Yep. But, there is still a problem. At least on my end. Will report back soon. Off to work.

Yes, The Xbox one rotates it uuid now, frustrates the hell outta me, I have a fix for the Vera plugin.

 

The only thing to remember with this fix, is that you can't have two devices in your network with the same name. Probably shouldn't anyway. I'll post it later after work:)

Edited by chef
Link to comment
Share on other sites

This is frustrating. The Xbone isn't being detected by the server again. Its on, but the DLNA functionality isn't detected in the running clients. Therefor not seen by your app. How the heck does the W10 Xbox app know what to turn on if the UUID is rotating?? I can detect and turn it on from their app.

 

I can start the Xbone media player, connect and play movies from the server, but the server still doesn't see it??

 

I can confirm the UUID change... I deleted my vera config file, plug cycled my Xbone. The Xbone was then detected by the server. I redid the configuration and its working again. Question is, when and why the UUID is changing. Maybe this is why DLNA is broke with the NXE update??

Edited by Xzener
Link to comment
Share on other sites

This is frustrating. The Xbone isn't being detected by the server again. Its on, but the DLNA functionality isn't detected in the running clients. Therefor not seen by your app. How the heck does the W10 Xbox app know what to turn on if the UUID is rotating?? I can detect and turn it on from their app.

 

I can start the Xbone media player, connect and play movies from the server, but the server still doesn't see it??

 

I can confirm the UUID change... I deleted my vera config file, plug cycled my Xbone. The Xbone was then detected by the server. I redid the configuration and its working again. Question is, when and why the UUID is changing. Maybe this is why DLNA is broke with the NXE update??

I ment to upload the fix last night but the kids are sick. Since the uuid rotates we will have to go by device name only. I uploaded the fix this morning. Let me know if it works by ignoring the uuid.

 

@@Xzener.

 

I also asked the question on the Xbox forums to find out if there are settings to make the ID static.

Link to comment
Share on other sites

  • 2 weeks later...

I fished around the chat for a user to help, but it would seem that people are busy, or running Linux.. lol. 

 

I think it is fixed, but we really need a user to test it.

I hope I don't sound like a dumbass, but does this plugin only work for Windows?  The only reference I've found anywhere is this comment.

 

Thanks

Link to comment
Share on other sites

I hope I don't sound like a dumbass, but does this plugin only work for Windows? The only reference I've found anywhere is this comment.

 

Thanks

Yes, it was written with a Windows IDE.

 

It might be possible to find a Linux IDE and build a version of the plugin, I'may not versed in that environment, but the interface is just jquery and html, so it would just be the classes build in .net.

 

I would gladly offer the code to someone who would want to make the conversion.

Edited by chef
Link to comment
Share on other sites

Ugh... So its not seeing the Xbone again, MBT isn't working either. Maybe its Vera this time... Downloading a patch to fix a recent firmware which user were complaning basic functionality was broken. I will report back.

 

EDIT: Well the server is seeing the Xbone as a DLNA device. The plugin is not listing it under devices. Plug cycled the Xbone, no change. Ok, it wasnt the Vera. Uninstalled/reinstalled the plugin... Its working again.

Edited by Xzener
Link to comment
Share on other sites

Ugh... So its not seeing the Xbone again, MBT isn't working either. Maybe its Vera this time... Downloading a patch to fix a recent firmware which user were complaning basic functionality was broken. I will report back.

 

EDIT: Well the server is seeing the Xbone as a DLNA device. The plugin is not listing it under devices. Plug cycled the Xbone, no change.

Okay let me see what's going on.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...