I can add that, if that’s all it is to ensure the password field gets added (it would be comfortable, but default to off for ST users). But if there is more complexity to it then I’d be more tempted to go down the mqtt route, since that way multiple devices could subscribe to alarm status changes.
Suggest you check out the http option, and then let me know, either way ill try and do the Wemos coding so it can still be pre flashed.
Tnx that would be great, but you’re right, it probably needs some more tweaking I’m afraid. I tested posting some JSON to HA, and it works fine if you follow the HA headers and body. How is the JSON post formatted? Does it use one POST per sensor/status or does it POST everything at once? The HA HTTP sensor actually creates a sensor per post, in which the url actually contains the sensor name and the body its state and attributes.
I pretty sure MQTT is the most flexible way to go, because that way you can sent everything at once. Furthermore, MQTT doesnt use the front end password in the body off every post, like te HTTP sensor requires. Besides, I think an MQTT handler would make this solution usable for far more home automation platforms other than ST or HA.
But i get you would need time for that and I’m asking questions about HA integration in a ST forum , which might not be entirely how it should go. I would gladly make a donation if that would help, or even help testing.
Anyhow, I’ll see how far i will get, I’m thankfull for any help i can get.
Regards,
Oliver
Edit:
Took a look at your code, but I’m not very familiar with C++ , but from the looks of it, changing the Json string should be fairly simple. Not sure how to change the IP/port of ST in the source code…I guest this is set by ST?
@opaulzen
So you can go to the webpage with http://IP_OF_WEMOS/config?ip_for_st=192.168.1.100&port_for_st=39500 to set the IP/port that receives status updates and will automatically be sent here after the Wemos is enrolled into the Powermax. The status updates follow one of two different formats and are sent every time the status of the Alarm or Zone changes (respectively):
{“stat_str”:“EVENT”, “stat_update_from”:“WHOTTRIGGERED”} - This would show alarm status as Armed Home/Disarmed/… and which device triggered it like Fob/Keypad/NFC/Wemos/…
{“zone_id”:“ZONEIDTEXT”, “zone_name”:“ZONENAME”, “zone_status”:“ZONESTATE”} - This would show zone information, hence zone 1 (called Kitchen) might change to Open/Closed/Motion/… depending on its type.
You can find full details of the ZONESTATES/EVENTS in the device handler in the first post. If you want to pull all zone types you can go to http://IP_OF_WEMOS/getzonenames and it will return all enrolled zone IDs/names/types.
I have now added two extra config parameters that you can call (in the top request) which allow you to set a password for sending to HA - hence you can add use_password=true and set_password=HA_PASSWORD (must be less than 12 chars - Upper/Lower/Numeric) - This would look like http://IP_OF_WEMOS/config?ip_for_st=192.168.1.100&port_for_st=39500&use_password=true&set_password=MyPass123
I believe with these changes HA should receive all of the comms from the Wemos, you just need to configure a handler to capture/store the device information. I will sort out uploading the firmware shortly and you can update it through the webpage of the Wemos.
@Brandon_tinsley - Can you try connecting the ground wire from the Barrel terminal (the one that seems to go out of photo) to the GND connection that is between the Zone 29/30 connection block and then remove the GND connection to the Serial pinheader on the Powermax+ next to RX/TX (you can actually try leaving it aswell probably).
I’ll see if can get this to work. I think I might encounter some issues parsing and handling the JSON, but i would just have to change the body format.
The idea is that i use a GET (http://ip_of_wemos/status) for creating my sensors with a default status when HA boots. After this i would rely on posts from the Wemos to update the sensors, but for this i might need to reformat the Json body.
If i get this correct, the function “SendJSONMessage” is actually the only thing i would need to change if I want the post message to have a different header/body). I would actually need to adjust the URL the post is done to (ip_for_st/api/sensor.sensor_name) and the body of the POST so it contains state and attributes. I guess all of this is done in the SendJSONMessage function, right?
I this doesn’t work out the way i hope, i could always request status updates every few seconds from the /status page, right?
Regular requests to the status page will put a strain on the Powermax comms as the Visonic is very picky about timing, hence pulling too many webpages can cause the Powermax link to break temporarily (it normally fixes itself after a few mins but best to avoid doing that).
Yes the SendJSONMessage function is the main thing you would need to update as that is the only function which sends restful updates. What needs to change about the body format do you think? Im trying to ensure the main functions stay as standard as possible without too many tweaks, since the same codebase supports a few alarm systems (with more to come I hope), hence customisations for one platform make it less universal.
Well ok, so no requesting regular staus updates then.
I havent hooked up a Wemos to my panel yet, so not sure how the status page will look like if connected. I figure the enroled_zones attribute will give me all zones. Is there also a way to see thecurrent state of those zones, so i can use it to set a start-up state? I will use a REST sensor for this, just need it to not poll again every few seconds after the initial boot. But that shouldnt be a problem.
Updating sensors needs a certain body and specific headers:
Actually the only thing that matters for me is the state, since this is used to trigger anything. This can be any string. Other attributes, like type would be nice to have.
You don’t need to update your code for this, I’ll try to compile these changes myself. I’ll have a look at the code, and might need some syntax help
Hi CJ,
I have ordered the kit (Wemos and Arduino) from your online shop. While the kit arrives, I have coupe of questions. I have Visonic PowerMax Pro. It has both PowerLink and GSM modules installed. Can I still use the Wemos to interface with SmartThings? From the documentation, it seems that one of these modules will have to be removed, but I am not sure.
Second question is: does it require any soldering to the Visonic board? I have done plenty of soldering, but I just wanted to be prepared.
No soldering is needed (only for a few old models of Powermax Express), it plugs in right where the Powerlink plugs in (hence that does need to be removed) - though presumably you arent really using the Powerlink at the moment?
A couple of people are having problems with Powermax Pro’s at the moment (some international models seem unable to pair with the Wemos, though there are a good number without problems). With a bit more info and debugging from people I really hope this can be fixed for everybody!
Thanks for the reply. I am using Powerlink but it is very slow and that is why I was looking at alternatives. It is no big deal to remove Powerlink and install the Wemos/Arduino combo. Once the system is working with SmartThings, it will be a big plus.
I am hopeful that with support from someone as knowledgeable as yourself, we will be able to make it work.
So I have the shipment. Now need to know the connections. The cables included do not seem to match the diagrams given here:
Also, my Powermax Pro model does not seem to have the pins shown in the above link. Even the 12V DC output is not at the pins so labeled because those are not for the US version as per the manual. I was able to find 12.7V DC at DC IN+ and GND terminals.
I can first start by connecting the Wemos to the Arduino and 12V DC and see if I get the WiFi setup. Please let me know how the Wemos and Arduino are connected together with the cables supplied.
I would start with just the Wemos RX/TX cables and power in, then add Arduino if you cannot get the Wemos to pull information from the Powermax panel. The cables will all be there, but perhaps they are slightly different colours.
I would also suggest starting with no external modules, such as GSM/Powerlink/… and then add them in, to ensure they do not interfere.
If the 12.7V DC IN pin is indeed that (i.e. 9 or more volts and DC power) then that will be great. Unfortunately there are many hundreds of Powermax panels, all with slight differences, so it is impossible to provide an exact guide for every model, but it only really needs four cables (PWR, Gnd, RX, TX) so hopefully shouldnt be too difficult.
The Wemos connection is partially working. I can arm home, arm away etc., but cannot disarm. The zone list is empty. So, I introduced the Arduino into the mix, but no change in behavior. There is a second red LED on the Arduino which lights up sometimes, but nothing happens. The status is also shown incorrectly.
Hello cjcharles, could you help me please to make this work?
i have same problems like Gupta_ash in this topic.
“status page shows “Not Ready” to “Programming” to “Disarmed””
no web arming response on the alarm panel side
no zones on status page
wemos powered from panel
But i have Powermax Complete panel 433Mhz Cyprus version.
thanks.
@lllll did yours used to work? As I’m aware you have been quiet for a while and were setting up in the middle of last year. I certainly have never seen a Powermax complete panel with a problem, though I don’t think 433Mhz panels are sold commonly (not aware of a single one) so perhaps that is causing the issues.
As for the issues pairing Arun. I will try and test a few things this weekend, and see if I can detect any similarities between one of my panels and your own.
it takes long-time to prepare:)
can my problem be the same like US Powermax Pro and UK Powermax+ have?
i already ordered arduino from your shop (with address problem:)) hope i will receive it soon.
I have same observations like kichi above and some more:
a) If I power off just the Wemos and then power it on, the website fails to come up. It does not come up till I power cycle the Visonic panel. Then it comes up in seconds.
b) If I install the Wemos board inside the Visonic panel, the panel goes crazy. It reports SYSTEM JAMMED. It is because of WiFi from the Wemos board. Even if I install Wemos outside, the Visonic panel still reports all sensors inactive and emits trouble beeps. I will have to find some place distant from the panel to install Wemos.
c) If the system is in Armed Home status and I change to Arm Away Instant, the stat_str shows ?? The stat_str never changes to reflect true status of alarm and keeps showing ??
CJ, I’ve tried last year and It had problem with my Powermax Pro. so I switch back to Vera Plus instead. Could you confirm if this integration still have problem with Powermax pro? so I could eliminate my Veraplus. Thanks.
hello cjcharles, still doesn’t work:(
maybe, because i have new version visonic powermax complete?(bought mid 2017)
i found one forum, it says that visonic has changed baudrate from 9600 to 38400 after some version of firmware (https://community.openhab.org/t/powermax-binding/2824/225)