Comments (2)
from misterhouse.
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:
# MQTT stuff
CODE, require mqtt; #noloop
#
CODE, $mqtt_1 = new mqtt('mqtt_1', '192.168.1.21', 1883, 'telemetry/#', "", "", 121);
#CODE, $mqtt_2 = new mqtt('mqtt_2', 'test.mosquitto.org', 1883, 'home/test/#', "", "", 122);
#CODE, $mqtt_3 = new mqtt('mqtt_3', '127.0.0.1', 1883, 'home/network/#', "", "", 122); #noloop
#
CODE, $CR_Temp = new mqtt_Item($mqtt_1, "home/ha/text/x10/1");
#CODE, $M2_Temp = new mqtt_Item($mqtt_2, "test.mosquitto.org/test/x10/1");
#CODE, $M3_Temp = new mqtt_Item($mqtt_3, "home/network/test/x10/1");
#
CODE, $CR_Temp->set("On");
#CODE, $M2_Temp->set("Off");
#CODE, $M3_Temp->set("On");
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
Dan
from misterhouse.
Related Issues (20)
- Running master from zipfile gives fatal message HOT 2
- NOAA website changes broke lib/site/Geo/WeatherNOAA.pm and get_weather (see issue #631) HOT 2
- Stacked set not updating device state HOT 1
- High CPU usage when browsing in ia7 HOT 1
- Mh 4.3 ia7 floorplan icon placement still needs work HOT 1
- Ia7 browse types generates 6-10 json calls/s HOT 1
- ia7 slider does not work on android HOT 3
- ia7 floorplan slider HOT 8
- Can't Regexp::Common::FIRSTKEY at /opt/mh/bin/../lib/json_server.pl line 988. HOT 17
- [SCHEDULE] logging every new minute HOT 6
- "Keys on Scalar" Syntax in json_server.pl Causes Fatal Error in Later Perl Versions
- Oops1: Variable "$xml" is not imported at (eval 640) line 718 HOT 1
- Network item - using WOL blocks status HOT 4
- Perl errors with unescaped brace in regular expression
- perl issue - Generic item
- perl issue: code select and unselect HOT 1
- Need help with install HOT 3
- ia7 cannot display group when state value of a member is a number HOT 2
- Two Tasmota_HTTP_Item.pm async mode issues
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from misterhouse.