jwiseman
(Mr. Wiseman (OH 4.3.0 Snapshot on Pi4))
1
I upgraded to 4.3.0 Stable when it was released and just realized that the PushOver binding is failing when you send stuff it.
It works fine testing within the Thing configuration, but if you send stuff to it (with or without) an image it goes into an offline state and says “message cannot be blank”
Removed Thing definition and created a new Thing through the GUI
Sending only Text
Sending only Text with an Image
Created a new pushover account with new tokens
I use variables in my sending with the pushover binding, use to work, maybe it doesn’t now?
var String PushOverMIME = 'image/jpeg'
val pushOverActions = getActions("pushover","pushover:pushover-account:account")
var String subjectemailhomealarmSMS = "House Alarm"
var String bodyemailhomealarmSMS = "House Alarm power is OFF. Is it raining?"
val String attachment = "/etc/openhab/html/images/OH400x400.jpg"
val String attachmentUrlListPushOver = attachment
pushOverActions.sendAttachmentMessage(bodyemailhomealarmSMS, subjectemailhomealarmSMS, attachmentUrlListPushOver, PushOverMIME)
pushOverActions.sendMessage(bodyemailhomealarmSMS, subjectemailhomealarmSMS)
I tested your code and adapted it to my system (openHAB 4.3.2), it seems to work fine, image is send, no error message:
var String PushOverMIME = 'image/jpeg'
val pushOverActions = getActions("pushover", "pushover:pushover-account:pushover")
var String subjectemailhomealarmSMS = "House Alarm"
var String bodyemailhomealarmSMS = "House Alarm power is OFF. Is it raining?"
val String attachment = "/opt/openhab/conf/html/dahua1/ipcamera.gif"
val String attachmentUrlListPushOver = attachment
pushOverActions.sendAttachmentMessage(bodyemailhomealarmSMS, subjectemailhomealarmSMS, attachmentUrlListPushOver, PushOverMIME)
pushOverActions.sendMessage(bodyemailhomealarmSMS, subjectemailhomealarmSMS)
Edit: I had no problems in 4.3.0 either
jwiseman
(Mr. Wiseman (OH 4.3.0 Snapshot on Pi4))
3
Can you send me your screenshot of your thing configuration in the GUI?
It is the first time I see the Thing actions, though
jwiseman
(Mr. Wiseman (OH 4.3.0 Snapshot on Pi4))
7
I’ve created a new Thing and instead of copying the OLD thing ID, using a completely new one. Thats the only thing I see that is different between ours.
Pushing changes now.
Best, Jay
jwiseman
(Mr. Wiseman (OH 4.3.0 Snapshot on Pi4))
8
Still have the issue, once I send anything to pushover via a DSL script, it goes offline and says “message cannot be blank” at the Thing level status.
Within the Thing itself, I can use the Thing testing area at the bottom and send messages w/o any issues.
I’ve turned on DEBUG now to see if theres something I can see.
Maybe some hidden character somewhere?
I would copy the code to an ASCII editor (Notepad++) and select “Show all characters”.
jwiseman
(Mr. Wiseman (OH 4.3.0 Snapshot on Pi4))
10
I use NotePad++ to code in. Just did that, only seeing LF at the end of each line.
DEBUG mode is on now, waiting for a rule to trigger pushover stuff. DEBUG is reporting everything from the startup process.
Best, Jay
jwiseman
(Mr. Wiseman (OH 4.3.0 Snapshot on Pi4))
11
Looks like the pushover server is sending that message back to OH and it’s taking the binding offline also.
2025-01-16 13:51:24.777 [DEBUG] [hover.internal.config.PushoverConfigOptionProvider] - bundle org.openhab.binding.pushover:4.3.0 (314)[org.openhab.binding.pushover.internal.config.PushoverConfigOptionProvider(380)] : Changed state from active to active
2025-01-16 14:11:14.009 [DEBUG] [pushover.internal.connection.PushoverAPIConnection] - Pushover server responded with status code 400: {"message":"cannot be blank","errors":["message cannot be blank"],"status":0,"request":"a95417c7-2cba-4bc9-aeb7-0e31dc997923"}
2025-01-16 14:11:14.050 [DEBUG] [pushover.internal.connection.PushoverAPIConnection] - Pushover server responded with status code 400: {"message":"cannot be blank","errors":["message cannot be blank"],"status":0,"request":"0cff64b4-7995-4e6e-98e0-274b20ef8f2a"}
jwiseman
(Mr. Wiseman (OH 4.3.0 Snapshot on Pi4))
13
Spent 3 days trying to figure this out, even used past bindings, same results with OH 4.3.0
I believe I have identified why the pushover binding goes into an error state (“message cannot be blank”) when passing this variable body = “” into the message.
var String subject = “HEAT Alarm”
var String body = “”
pushOverActions.sendMessage(body, subject)
The pushover binding is NOT handing this error coming back from pushover server properly taking the binding offline.
→ Pushover server responded with status code 400 ←
I know you can pass @Nullable into these fields instead of a variable, in my opinion the binding should handle this “” vs. taking it offline.
The question is now, why did you get that error in your example where that field is not empty …
var String bodyemailhomealarmSMS = "House Alarm power is OFF. Is it raining?"
...
pushOverActions.sendMessage(bodyemailhomealarmSMS, subjectemailhomealarmSMS)
jwiseman
(Mr. Wiseman (OH 4.3.0 Snapshot on Pi4))
15
That example works, i just grab an example of my code randomly not knowing what was causing it.
Try that same example but make the body “” and it should take the binding offline now.