visonic icon indicating copy to clipboard operation
visonic copied to clipboard

Using this integration and the PowerLink module?

Open AdarWa opened this issue 1 year ago • 9 comments

Hi, I currently have the PowerLink module installed in my PowerMaster-30 alarm. I would like to use this integration but still keep my PowerLink module. I noticed that there is a Dual RS232 Port on my alarm and found some official Visonic documents that say that two devices can use this Dual RS232 Port simultaneously, but I couldn't find any information about the pinout of this port. So I would appreciate it if you could help me with the pinout of the Dual RS232 port.

Thanks! Adar

AdarWa avatar Dec 18 '23 19:12 AdarWa

Sorry but at this current time you cannot use both Powerlink Module and an additional device to use with this integration, not that I'm aware of. I have experimented with both my PowerMax Pro Part and my test PowerMaster 30 and either:

  • The wiring on the main motherboard copies the same physical (copper tracks) interface between the 2 connectors (so only 1 can be used at a time) or,
  • One of the connectors can only be used for EEPROM download and nothing more (although I didn't try EEPROM upload), in other words it cannot be used with the powerlink protocols I need for my integration.

I can understand Visonic not doing this, to manage 2 or more full Powerlink interfaces at the same time would mean a significant amount of extra software to coordinate and manage conflict.

EDIT: I meant to include this link that explains more

Having said all that I'm working on some software for an ESP32 device that I hope will provide:

  • Full Powerlink Module functionality (as you say you have now)
  • A small capability with the Home Assistant integration, this is likely to only support getting the Sensors in HA at the start but who knows.

davesmeghead avatar Dec 18 '23 20:12 davesmeghead

Hi, Thanks for the fast reply! I understand now that connecting both the PowerLink and the TTL to ethernet is not possible. Is it possible to get alarm status information(Disarmed, Armed Away or Armed Home) by tapping to the PowerLink channel(without transmitting anything, only recieving)? It seems like it isn't implemented yet, but I'll be happy to try and implement it, if it's possible.

Best Regards, Adar

AdarWa avatar Dec 19 '23 08:12 AdarWa

Sorry but at this current time you cannot use both Powerlink Module and an additional device to use with this integration, not that I'm aware of. I have experimented with both my PowerMax Pro Part and my test PowerMaster 30 and either:

  • The wiring on the main motherboard copies the same physical (copper tracks) interface between the 2 connectors (so only 1 can be used at a time) or,
  • One of the connectors can only be used for EEPROM download and nothing more (although I didn't try EEPROM upload), in other words it cannot be used with the powerlink protocols I need for my integration.

I can understand Visonic not doing this, to manage 2 or more full Powerlink interfaces at the same time would mean a significant amount of extra software to coordinate and manage conflict.

EDIT: I meant to include this link that explains more

Having said all that I'm working on some software for an ESP32 device that I hope will provide:

  • Full Powerlink Module functionality (as you say you have now)
  • A small capability with the Home Assistant integration, this is likely to only support getting the Sensors in HA at the start but who knows.

Regarding your last remark-will it include the ability to arm / disarm or only “read only”?

EyalRotem avatar Dec 19 '23 08:12 EyalRotem

Regarding your last remark-will it include the ability to arm / disarm or only “read only”?

My answer goes back to what I said about Visonic not managing 2 or more full Powerlink interfaces. By having 1 behaving as a full Powerlink Interface and the second (or more) being read-only then there is no management to do. We cannot change the Powerlink hardware module so it will get the full interface, leaving my integration and HA read-only.

However, although doing what I've just said is my goal, I do intend to allow users to try both as full interfaces and take the consequences i.e. both as full interfaces with no management of their interactions.

Please remember that I have no way of testing the powerlink hardware interfacing as I do not have an account or use Visonic Go.

davesmeghead avatar Dec 19 '23 09:12 davesmeghead

Hi, Thanks for the fast reply! I understand now that connecting both the PowerLink and the TTL to ethernet is not possible. Is it possible to get alarm status information(Disarmed, Armed Away or Armed Home) by tapping to the PowerLink channel(without transmitting anything, only recieving)? It seems like it isn't implemented yet, but I'll be happy to try and implement it, if it's possible.

Best Regards, Adar

In addition to my question, does the IP RS-232 interface sends the alarm status on request? Intervals? On events?

Thanks!

AdarWa avatar Dec 19 '23 10:12 AdarWa

Most things are command / response. We send a command in to the panel to ask for its status for a specific thing and it send a message back with the status. The panel also sends messages out when things happen inside the panel on state changes.
I can therefore get the alarm status information but need to be careful as 2 devices could be sending requests at the same time. So even if I make 1 read-only connection, it is not really read-only as there are cases where I would need to ask the panel for its status and this would need to be coordinated with the other read-write (full powerlink) connection.

davesmeghead avatar Dec 19 '23 12:12 davesmeghead

Can I ask, are you in a position that you have a Visonic Go app connection with a Powerlink 3.1 module, and also have an ESP32 device that you could use with Arduino code? If so then I could send you some test code to try

davesmeghead avatar Dec 19 '23 12:12 davesmeghead

Yes I am. As long as it's only recieving(I don't want that accidentally both will be transmitting at the same time), Sure.

AdarWa avatar Dec 19 '23 19:12 AdarWa

Hi again, a bit of an update if anyone is still subscribed to this thread.

I have a working prototype. It uses "Standard Mode" in the integration so it is not able to have full Powerlink capability, I hope this is obvious but the Powerlink hardware has the Powerlink connection/interaction with the panel. When the integration first starts the reaction time to commands is slow but after a few minutes I can either arm/disarm using the VisonicGo app or from within Home Assistant, with all sensors showing in Home Assistant as well.

I have used an ESP32 microcontroller device using 2 software UART connections, one to the powerlink hardware and one to the panel. I then enable a wifi server in the ESP32 so the integration can connect from Home Assistant, although I have been mainly using the "complete" utility from the examples directory for testing. I am currently powering the ESP32 from the USB on my PC which also has Arduino IDE running to develop and upload the code.

image

The thing that I'm still working on is getting the baud rates right. Once this happens it all seems to work but when first powered on the powerlink and the panel seem to negotiate the baud rate between each other with some weird data and me putting the ESP32 in between them causes some confusion.

I have been working on a few other things in the integration anyway (more robust, decoding more powermaster B0 data, more flexible, reducing common code to functions etc) so it's quite a big change to the integration code as well.

I tried writing the interface in python and using CircuitPython with a different board but I couldn't make it reliable enough, it crashed after about 1 to 2 hours. So I have stuck with Arduino IDE and written code for that instead. The CircuitPython route would have been easier to load the code, you plug the device in to your PC USB and it comes up as an external drive to simply copy the files on to.

If anyone out there is interested in setting this up I will:

  • Create a new repository with the arduino code I have to upload to an ESP32, with help on which pins to use. I may just upload the code in this issue to start with
  • Create a branch in the integration repository with the significant changes to the integration code I've made, you will need this to use it like this as there are specific changes to get this setup to work in HA.
  • Once I've tidied it up I can take photos of my hardware, showing the wires between the ESP32, the panel and the powerlink.

What you will need to do and be fairly confident in doing is:

  • The above simple diagram has to make sense to you or give up now!
  • Buy or already have an ESP32 microcontroller, a one that can have wifi and 2 software / hardware UARTs (most can)
  • Buy or already have little connecting wires like these to be able to wire it all together
  • Already have a powerlink module, I have used a Powerlink 3.1 so I'm not sue if earlier versions will work
  • That you can use the Arduino IDE, to load in the file and upload it to the ESP32
  • Connect the wiring up, the diagram above is pretty much it without the pin numbers on the ESP32 and 2 connectors (remember you already know these pins as you've used them to connect your current device to the panel)
  • Be able to test it i.e. have a VisonicGo app with a working connection to the panel using the Powerlink hardware. This must work first as we then split the connection between the powerlink and panel and put an ESP32 in between them.
  • Finally, this is not an "off the shelf" solution that you can plug together once and it'll keep working, this is a work in progress and you need to be willing to test it and then maybe put your system back to how it is now

I'm normally very helpful where I can be with all users of this integration. However with this I'm not really willing to go in to any simple discussions on setup. If you don't understand the above diagram then you're going to be lost fairly quickly, also if you don't understand what I mean by the Arduino IDE and uploading code to an ESP32 then again, lost fairly quickly. Please be confident that you are able to set this up, maybe on a temporary basis, and that you can provide me with feedback on whether you get it working or not, and if not then what the problems are.

To end on a positive, any willing and able volunteers out there in Visonic land?

EDIT: One final note. My eventual goal is to create a library that can be used from ESPHome. That way it's a simple configuration in ESPHome to upload to the ESP32 and set it up.

davesmeghead avatar Feb 16 '24 15:02 davesmeghead

Closing this issue as it's a repeat of this https://github.com/davesmeghead/visonic/issues/88

davesmeghead avatar Aug 25 '24 09:08 davesmeghead