-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
server_startup('mqtt') undefined subroutine? #729
Comments
What is your setup? using the latest master I couldn’t replicate your issue;
MH doesn’t come with the dependancy Net::MQTT::Message, so
cpan to install Net::MQTT::Message
user code:
require mqtt; #noloop
$mqtt1 = new mqtt('mqtt', ‘127.0.0.1', 1883, 'home/#', "", "", 121);
$water = new mqtt_Item($mqtt1, "home/water");
and I see mqtt starting up in the logs:
08/26/17 04:54:14 PM *** Creating mqtt on 127.0.0.1:1883 home/#
08/26/17 04:54:14 PM *** Opening MQTT (mqtt) connection to 127.0.0.1/1883/home/#
08/26/17 04:54:14 PM *** Host = 127.0.0.1
08/26/17 04:54:14 PM *** Port = 1883
08/26/17 04:54:14 PM *** Topic = home/#
08/26/17 04:54:14 PM *** User =
08/26/17 04:54:14 PM *** Password =
08/26/17 04:54:14 PM *** Keep Alive = 121
08/26/17 04:54:14 PM *** mqtt mqtt_connect Socket (127.0.0.1:1883,121)
08/26/17 04:54:14 PM *** mqtt Socket check (121) [ ]: Connected
08/26/17 04:54:14 PM *** mqtt mqtt Received: ConnAck/at-most-once Connection Accepted
08/26/17 04:54:14 PM *** mqtt mqtt Sub 1 Received: (--No $$msg{string}--)
08/26/17 04:54:14 PM *** mqtt mqtt Initializing MQTT connection ...
08/26/17 04:54:14 PM *** mqtt added MQTT check_for_data ...
08/26/17 04:54:14 PM Oops1: Use of uninitialized value in concatenation (.) or string at ../lib/mqtt.pm line 776.
08/26/17 04:54:14 PM *** mqtt mqtt set mqtt: [(on), (mqtt=HASH(0x7fdf2420c228)), ]
08/26/17 04:54:14 PM *** mqtt mqtt set mqtt: isa mqtt
… On Aug 26, 2017, at 4:13 PM, dpatelli ***@***.***> wrote:
Attempting to use mh with a mqtt server. Configured using what limited info I could find.
Startup error on &mqtt::server_startup('mqtt'): Undefined subroutine &mqtt::server_startup called at (eval 454) line 1.
at ./mh line 31.
main::__ANON__('Undefined subroutine &mqtt::server_startup called at (eval 45...') called at (eval 454) line 1
eval '&mqtt::server_startup('mqtt')
;' called at ./mh line 968
main::setup called at ./mh line 7764
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <#729>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AExbSDFt-13WyEs023MD-bC3dpNIDqyTks5scJhtgaJpZM4PDopc>.
|
I had included the MQTT dependencies, but did not include any code in /code/mysutff/my.pl. I had found a example/reference about putting something like this into my ./mht file:
I added your example (with changes to point to my mqtt broker) and it seemed to at least connect to the broker. Not sure how it should all work, but I'll keep plugging along. I've been playing with misterhouse for over 10 years with X10 and am still running an old version which I made a Star Trek LCARS interface for it. Most of my X10 stuff has long died with the exception of motion detectors and thermostat -- Glad to see the project did not die out. Found light switches which are based on ESP8266s, reflashed with custom code to talk mqtt protocol. Been playing with them for a few months... Was very happy to see mqtt support for the new version of MH, so today I spun up another server and installed, Docs seem to be lacking (or my google-fu failed me) on the mqtt interfacing. Thank you |
Attempting to use mh with a mqtt server. Configured using what limited info I could find.
Startup error on &mqtt::server_startup('mqtt'): Undefined subroutine &mqtt::server_startup called at (eval 454) line 1.
at ./mh line 31.
main::ANON('Undefined subroutine &mqtt::server_startup called at (eval 45...') called at (eval 454) line 1
eval '&mqtt::server_startup('mqtt')
;' called at ./mh line 968
main::setup called at ./mh line 7764
The text was updated successfully, but these errors were encountered: