The fact that your set up only supports 1 connection at a time is going to be a problem. I think you need to get that fixed. I wouldn’t be surprised if that’s causing these sync issues you are experiencing. You could have 2 apps fighting against each other for access to the connection. I’m pretty sure Brian used a Global Cache iTach if I remember correctly. That supports 8 simultaneous connections. Research what you buy. There are going to be several options out there that only support 1 connection. Even the early Global Cache products like the GC-100 only supported 1 connection. Newer ones like iTach, Flex, & Global Connect all support multiple simultaneous connections.
Well sure enough, that looks to be the ticket.
For those coming here in the future who use ser2net, there is a parameter with ser2net called ‘max-connections’ that defaults to 1. When I increased that, it works perfectly well now. Anything I do on my phone shows up near instantly on the simulator, and vice versa.
It does not sync physical button pushes on the keypad, but I am guessing that is because the Monoprice does not send those changes over the socket. So I probably just need to uninstall the physical keypads! (or set up a refresh interval)
For reference, my setup is:
Monoprice Controller -> USB to Serial Cable (PL2303 chipset) -> Raspberry Pi set up with ser2net -> ser2net broadcasts on the port I select
Just want to chime in to confirm everything Bill already said. I’m using the Global Cache iTach RS232 which allows for 8 simultaneous connections. Commands sent to the matrix via keypad can be picked up during the next pole. I’ve installed 5 or 6 of these systems now and while there has been a few tweaks and improvements along the way - it’s a very solid integration and an affordable choice.
Good insights - thank you.
To clarify - are you saying that a physical keypad command will only be synced the next time something triggers a TCPClient poll? Or that a physical keypad command will automatically come down on the socket? Neither is happening for me, and I may need to dig into why that is in my setup.
A physical keypad entry will register with the matrix immediately - but THR is only going to pick up that new value the next time it poles the matrix.
Got it, ok. I’ll have to earmark the Global Cache devices for a future project. They sound interesting.
I’m kind of with @amingle. I’m not sure they will be picked up. You probably have to resend the same status request commands that are in the “connect” method. They will likely be picked up eventually when something else changes in the system.
I know for a lot of systems like these changes made with physical keypads are not automatically broadcast as events. Maybe there was a setting in their software we had to enable. I don’t remember exactly.
Ok, then I feel less crazy. I just looked through the manual again (such as it is), and I’m not seeing anything that leads me to believe the keypads will broadcast events. Honestly, the simplest thing for me is to take the keypads out so the family just uses HR. (Means I will have some drywall work to do…)
All of my TCPClient-connected devices are syncing well across multiple Home Remote devices (for instance, my and my wife’s phones). But I still do not have a good solution for syncing my Roku TV, because it is an HTTPClient device. Events, including power on, do not appear to be broadcast. Surely there has to be a better solution than just polling for power state every 1 second.
For the LG TV integration I did earlier this year, I used SSDP “alive” & “byebye” events to monitor power state. Once I develop an official Roku integration, I plan on doing the same. It’s not possible to listen to those events with Plugins. There are certain limitations.
If you’ve already gone through the trouble of getting the CAT wire run and keypads installed - I wouldn’t go through further trouble to remove everything IMO. I do have installations who use both: Keypads & THR - and can honestly say it’s never been an issue with displaying accurate values. Volume adjustments are probably infrequent enough and since THR polls each time it launches or refreshes that particular page - it’s always been a non-issue. Your use-case may be such that you do end up removing them.
Personally I designed a mount for them which consumes 3U of rack space, so I put all 6 room controllers there since they come with the unit and I’d feel silly throwing them away. The designers I work with say they are too ugly to let me put them in the rooms most of the time
If you have extra rack-space that could be an option for you.
This is out of my current skillset, but that’s now become my task for tonight - see what I can learn about SSDP. Is there somewhere I can see the backend code in how you implemented it to take a shot at it?
Ha that’s fair. I like your rack layout. That looks nice. Being that my wife is the “designer I work with”, they’ll probably end up going. But great idea to move them downstairs to the rack.
Bonus points for removing the keypads and converting the CAT cables in your walls into recessed iPads utilizing the CAT wire for POE->USB to keep them powered. Currently my favorite tech addition to a room.
If you end up needing the rack-mount let me know. It was designed in fusion360 and I 3D print mine in PETG and assemble with some superglue on the back side.
That’s a fascinating concept - never even thought about POE USB chargers.
Appreciate all the insights and ideas. It’s great to see all the creativity.
Brian,
Would you mind if you post your 3D print mount here or email me?
Bill,
I can make a refresh button to capture the change form the monoprice multizone amp.
how do i make auto refresh in every minute or so?
I tried to use Event trigger, but no sucssess.
I believe that it’s very simple thing with script, but just don’t know…
thank you
The preferred spot would be inside the plugin. You can add your refresh commands to the “onPoll” function of the plugin. The EventTrigger is for handling Button clicks, etc. Not for handling automated polling.
yes I am thinking to put “App.Refresh(60000);” in the plugin script.
but don’t know what exact line to put under onPoll.
sorry about ignorant question.
You can’t do that. I was recommending you rewrite the plugin to send those raw TCP status requests in onPoll
. It could be just as simple as copying those socket.send()
calls in onConnect
.
Thank you Bill,
I just understood what you said and got it work now.
Thank you.